fix(rules): pinned creatures cannot attack (definition corrected; apply-gap documented)
This commit is contained in:
@@ -13,6 +13,7 @@ from pf1e_simulator.conditions import (
|
||||
FATIGUED,
|
||||
NAUSEATED,
|
||||
PARALYZED,
|
||||
PINNED,
|
||||
PRONE,
|
||||
STAGGERED,
|
||||
)
|
||||
@@ -326,6 +327,30 @@ class TestNauseatedActionEconomy:
|
||||
)
|
||||
|
||||
|
||||
class TestPinnedCannotAttack:
|
||||
"""Given: a pinned combatant (SRD "Conditions—Pinned": tightly bound,
|
||||
can only attempt to escape — it cannot attack)
|
||||
When: _take_turn is called
|
||||
Then: no attack is resolved."""
|
||||
|
||||
def test_pinned_flag(self) -> None:
|
||||
assert PINNED.cant_attack is True
|
||||
|
||||
def test_pinned_no_attack(self) -> None:
|
||||
hero = _make_hero(bab=6)
|
||||
foe = _make_foe()
|
||||
engine, h, f = _make_engine(hero, foe, [10, 10, 4])
|
||||
h.active_conditions.append(
|
||||
ActiveCondition(condition=PINNED, rounds_left=5, source="test")
|
||||
)
|
||||
engine._roll_initiative()
|
||||
engine._take_turn(h)
|
||||
for entry in engine._transcript:
|
||||
assert "sword vs foe" not in entry, (
|
||||
f"pinned combatant should not attack: {entry}"
|
||||
)
|
||||
|
||||
|
||||
# ── Test 5: paralyzed → no actions + effective DEX 0 (-4 AC) ─────────────────
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user