stun
This commit is contained in:
parent
1f01a94368
commit
aa54131626
@ -8,6 +8,7 @@ interface StatusEffects {
|
||||
regeneration: number
|
||||
burn: number
|
||||
confusion: number
|
||||
stun: number
|
||||
}
|
||||
|
||||
interface PotencyEffects {
|
||||
@ -34,7 +35,8 @@ class BattleUnit {
|
||||
poison: 0,
|
||||
regeneration: 0,
|
||||
burn: 0,
|
||||
confusion: 0
|
||||
confusion: 0,
|
||||
stun: 0
|
||||
}
|
||||
potencyEffects: PotencyEffects = {
|
||||
resistanceChange: [],
|
||||
@ -82,12 +84,14 @@ export class Battle {
|
||||
unit.health -= 5;
|
||||
this.appendLog(`${unit.character.nameShort} took 5 burn damage!`);
|
||||
}
|
||||
this.log += '\n';
|
||||
}
|
||||
}
|
||||
|
||||
checkAlive (units: BattleUnit[]) {
|
||||
for (const unit of units) {
|
||||
if (unit.health <= 0) unit.active = false;
|
||||
this.appendLog(`${unit.character.nameShort} has been defeated!`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ interface Effect {
|
||||
regeneration?: number
|
||||
burn?: number
|
||||
confusion?: number
|
||||
stun?: number
|
||||
resistanceChange?: PotencyStatus
|
||||
accuracyChange?: PotencyStatus
|
||||
speedChange?: PotencyStatus
|
||||
|
Loading…
Reference in New Issue
Block a user