fix(combat): apply save negates to targeted spell damage effects

This commit is contained in:
2026-09-05 12:52:58 +02:00
parent cd75a4f2bf
commit 7cb3653750
4 changed files with 100 additions and 10 deletions
+6 -1
View File
@@ -2077,7 +2077,12 @@ class CombatEngine:
raw = effect.formula.roll(self._rng)
if maximize:
raw = effect.formula.max_value()
dmg = max(0, raw // 2) if saved and effect.half_on_save else raw
if saved and effect.half_on_save:
dmg = max(0, raw // 2)
elif saved:
dmg = 0
else:
dmg = raw
if empower:
dmg = int(dmg * 1.5)
target.hp -= dmg