fix(rules): expose healing_done in per-combatant stats and the CLI report - the channel/spell healing deliberately removed from damage_dealt (2e2873f) was invisible; CombatantStats/_LiveStats gain a healing_done counter booked with the hp actually restored (capped at the target's hp_max, overheal uncounted) by _channel_heal and by spell HealEffect on living targets, while cure-as-damage on undead stays in damage_dealt and the damage counters keep their exact semantics; the runner aggregates and averages the new field and the French report prints it as 'soins prodigués'; +4 tests (channel heal, cure spell, undead cure guard, run_encounter aggregate) +1 CLI assertion

This commit is contained in:
2026-09-19 23:23:00 +02:00
parent 5e7436b210
commit e6021a6dda
8 changed files with 180 additions and 7 deletions
+3
View File
@@ -58,6 +58,7 @@ class CombatantAttrition:
crits: float
damage_dealt: float
damage_taken: float
healing_done: float
@dataclass(frozen=True)
@@ -232,6 +233,7 @@ def run_encounter(
crits=current.crits + stats.crits,
damage_dealt=current.damage_dealt + stats.damage_dealt,
damage_taken=current.damage_taken + stats.damage_taken,
healing_done=current.healing_done + stats.healing_done,
)
attrition = {
cid: CombatantAttrition(
@@ -239,6 +241,7 @@ def run_encounter(
crits=stats.crits / runs,
damage_dealt=stats.damage_dealt / runs,
damage_taken=stats.damage_taken / runs,
healing_done=stats.healing_done / runs,
)
for cid, stats in totals.items()
}