feat(combat): validate potions, persist telegraph state, and expose both on the combat DTO
Also updates the pre-existing exact-equality playerState assertion in combat-equipment-integration.spec.ts, which broke from the new potionsRemaining field but wasn't listed in the task brief's file scope.
This commit is contained in:
@@ -369,7 +369,12 @@ describe('equipping Räuberklinge increases combat damage (spec §45, §60)', ()
|
||||
|
||||
// The finished combat's playerState snapshot (written once at startCombat)
|
||||
// must not be retroactively rewritten by equipping after the fight ends.
|
||||
expect(state.combats[0].playerState).toEqual({ attack: 6, weaponDamage: 8, armor: 0 });
|
||||
expect(state.combats[0].playerState).toEqual({
|
||||
attack: 6,
|
||||
weaponDamage: 8,
|
||||
armor: 0,
|
||||
potionsRemaining: 2,
|
||||
});
|
||||
|
||||
const reloaded = await combatService.getCombat(CHARACTER_ID, combat.id);
|
||||
expect(reloaded.status).toBe(result.status);
|
||||
|
||||
Reference in New Issue
Block a user