fix(combat): correct hex and AoE DCs, DR bypassed by spells
This commit is contained in:
@@ -395,14 +395,14 @@ class TestSpellDcScalesWithLevel:
|
||||
|
||||
|
||||
class TestSpellDamageWithDr:
|
||||
"""Given: a target with DR vs the spell's damage type
|
||||
"""Given: a target with DR 5/- (bypassed by nothing)
|
||||
When: a spell deals damage
|
||||
Then: DR is applied after save halving."""
|
||||
Then: DR does NOT reduce spell damage (PF1e: spells/energy bypass DR)."""
|
||||
|
||||
def test_dr_reduces_spell_damage(self) -> None:
|
||||
def test_dr_does_not_reduce_spell_damage(self) -> None:
|
||||
caster = _make_caster()
|
||||
target = _make_target(hp_max=200)
|
||||
# DR 5/- (bypassed by nothing) applies to all damage including fire
|
||||
# DR 5/- does NOT apply to spell damage
|
||||
target_with_dr = target.model_copy(update={
|
||||
"dr": DamageReduction(amount=5, bypass=frozenset()),
|
||||
})
|
||||
@@ -411,8 +411,8 @@ class TestSpellDamageWithDr:
|
||||
engine, c, t = _make_engine(caster, target_with_dr, queue)
|
||||
hp_before = t.hp
|
||||
engine._cast_spell(c, t, "Fireball")
|
||||
# Save fails (2), 6d6 rolls all 3 = 18 damage, DR 5/- -> 13 damage
|
||||
assert t.hp == hp_before - 13
|
||||
# Save fails (2), 6d6 rolls all 3 = 18 damage, DR ignored -> 18 damage
|
||||
assert t.hp == hp_before - 18
|
||||
|
||||
|
||||
class TestSummonMonster:
|
||||
|
||||
Reference in New Issue
Block a user