Implement the 009-combatant-hp feature that adds optional max HP and current HP tracking per combatant with +/- controls, direct entry, and persistence

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lukas
2026-03-05 17:18:03 +01:00
parent a9c280a6d6
commit 8185fde0e8
21 changed files with 1367 additions and 2 deletions

View File

@@ -39,10 +39,29 @@ export interface InitiativeSet {
readonly newValue: number | undefined;
}
export interface MaxHpSet {
readonly type: "MaxHpSet";
readonly combatantId: CombatantId;
readonly previousMaxHp: number | undefined;
readonly newMaxHp: number | undefined;
readonly previousCurrentHp: number | undefined;
readonly newCurrentHp: number | undefined;
}
export interface CurrentHpAdjusted {
readonly type: "CurrentHpAdjusted";
readonly combatantId: CombatantId;
readonly previousHp: number;
readonly newHp: number;
readonly delta: number;
}
export type DomainEvent =
| TurnAdvanced
| RoundAdvanced
| CombatantAdded
| CombatantRemoved
| CombatantUpdated
| InitiativeSet;
| InitiativeSet
| MaxHpSet
| CurrentHpAdjusted;