diff --git a/src/game/engine/stat-list.ts b/src/game/engine/stat-list.ts index fcda6e4..47c5624 100644 --- a/src/game/engine/stat-list.ts +++ b/src/game/engine/stat-list.ts @@ -76,6 +76,14 @@ export class UnitStatList { this.baseStats.set(key, Math.trunc(value)) } + addStat(statNameOrId: string | number, delta: number): void { + const key = this.normalizeStatKey(statNameOrId) + if (key === 'item_allskills') { + this.allSkillsBonus += Math.trunc(delta) + } + this.baseStats.set(key, (this.baseStats.get(key) ?? 0) + Math.trunc(delta)) + } + getBaseStat(statNameOrId: string | number): number { const key = this.normalizeStatKey(statNameOrId) return this.baseStats.get(key) ?? 0