feat: add nerve config and Character nerve methods

Add nerve system configuration to config/game.php with start_amount,
max, regen_rate, regen_interval, and midnight_refill settings. Add gym
configuration with energy_cost, daily_cap, and stat_gain. Add nerve
methods to Character model: hasNerve(), consumeNerve(), addNerve(), and
getNervePercentageAttribute(). Update levelUp() to increment max_nerve
by 2. Add nerve_cost to fillable arrays in Crime and CrimeAttempt models.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Doar Mihai
2026-06-28 15:52:41 +03:00
co-authored by Claude Sonnet 4.6
parent 536269cbb5
commit 6182563fa7
4 changed files with 68 additions and 0 deletions
+17
View File
@@ -27,6 +27,7 @@ return [
'attack' => 15,
'travel' => 5,
'train' => 20,
'gym' => 20,
],
],
@@ -40,6 +41,22 @@ return [
'death_threshold' => 0, // Health <= 0 = dead
],
// Nerve system configuration
'nerve' => [
'start_amount' => 100,
'max' => 100,
'regen_rate' => 1, // nerve per tick
'regen_interval' => 300, // seconds (5 minutes)
'midnight_refill' => true,
],
// Gym training configuration
'gym' => [
'energy_cost' => 20,
'daily_cap' => 5, // sessions per stat per day
'stat_gain' => 1, // stat points per session
],
// Combat system configuration
'combat' => [
'base_damage' => 5,