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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user