feat: wire nerve check and deduction into crime attempts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Doar Mihai
2026-06-28 16:25:32 +03:00
co-authored by Claude Sonnet 4.6
parent 0e8ece64c3
commit 310dfd4129
2 changed files with 18 additions and 4 deletions
+8 -3
View File
@@ -76,17 +76,22 @@ class Crime extends Model
if ($this->requires_level && $character->level < $this->requires_level) {
return false;
}
// Check energy
if ($character->energy < $this->energy_cost) {
return false;
}
// Check nerve
if ($character->nerve < $this->nerve_cost) {
return false;
}
// Check location (if crime is location-specific)
if ($this->location_id && $character->location_id !== $this->location_id) {
return false;
}
return true;
}