some progress
This commit is contained in:
@@ -194,7 +194,7 @@ class Character extends Model
|
||||
*/
|
||||
public function getDefenseAttribute(): int
|
||||
{
|
||||
$base = $this->defense;
|
||||
$base = $this->attributes['defense'] ?? 0;
|
||||
$armor = $this->inventory()->where('equipped', true)->whereHas('item', function($q) {
|
||||
$q->where('type', 'armor');
|
||||
})->first();
|
||||
|
||||
Reference in New Issue
Block a user