fix(combat): clear the monster's pending action once it is defeated

This commit is contained in:
Bastian Wagner
2026-08-20 23:10:47 +02:00
parent e2f29d5eb6
commit 1aac3416fa
2 changed files with 3 additions and 1 deletions

View File

@@ -252,6 +252,7 @@ describe('CombatEngineService', () => {
expect(result.state.status).toBe(CombatStatus.WON);
expect(result.state.player.currentHp).toBe(100);
expect(result.state.monster.stats.pendingAction).toBeUndefined();
expect(result.events).toEqual([
{ source: Combatant.PLAYER, target: Combatant.MONSTER, type: CombatEventType.DAMAGE, amount: 14 },
{ source: Combatant.PLAYER, target: Combatant.MONSTER, type: CombatEventType.COMBAT_WON },