fix(rules): cure spells damage undead instead of healing

SRD Cure Light Wounds: 'Since undead are powered by negative energy,
this spell deals damage to them instead of curing their wounds. An
undead creature can apply spell resistance, and can attempt a Will save
to take half damage.'

- _apply_heal_effect takes the rolled save; an undead target takes the
  rolled healing as damage (halved on a successful save; SR already
  resolved upstream, DR never applies to spell energy, no bleeding stop
  or stabilization). Living targets are bit-identical.
- cure_light/cure_moderate descriptions fixed: the SRD save line is
  'Will half (harmless)', not 'negates'.
- Deafened 20% verbal spell failure DEFERRED to the README « Limites
  hors perimetre »: SpellSpec carries no components data (would need a
  verbal flag on all 108 spells) and sound-based Perception is not
  modeled either.
This commit is contained in:
2026-09-16 15:48:36 +02:00
parent 3e19d2974e
commit cad35e2e13
7 changed files with 109 additions and 6 deletions
+2 -2
View File
@@ -221,7 +221,7 @@ def test_heal_spell_stabilizes_dying_creature() -> None:
eng._rng = ScriptedRng([1]) # 1d8 -> 1: only 1 point cured
result = eng._apply_heal_effect(
HealEffect(formula=parse_dice("1d8")), s, caster_level=1,
empower=False, maximize=False,
empower=False, maximize=False, saved=False,
)
assert result == "+1 HP"
assert s.hp == -2
@@ -253,7 +253,7 @@ def test_heal_to_positive_hp_does_not_stabilize() -> None:
eng._rng = ScriptedRng([8])
eng._apply_heal_effect(
HealEffect(formula=parse_dice("1d8")), s, caster_level=1,
empower=False, maximize=False,
empower=False, maximize=False, saved=False,
)
assert s.hp == 5
assert s.stabilized_hp is None