feat: wire nerve check and deduction into crime attempts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
0e8ece64c3
commit
310dfd4129
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user