fix(rules): nauseated creatures are denied attacks of opportunity

This commit is contained in:
2026-09-16 19:25:35 +02:00
parent 6220edcfd7
commit def8533197
2 changed files with 22 additions and 0 deletions
+3
View File
@@ -207,9 +207,12 @@ PARALYZED = Condition(
) )
# Nauseated: can't attack/cast/concentrate; only single move action (CRB) # Nauseated: can't attack/cast/concentrate; only single move action (CRB)
# SRD "Conditions—Nauseated": "The character is unable to attack, cast
# spells... " — being unable to attack also denies attacks of opportunity.
NAUSEATED = Condition( NAUSEATED = Condition(
name="nauseated", name="nauseated",
cant_attack=True, cant_attack=True,
cant_aoo=True,
) )
# Dazed: can't act, no AC penalty (CRB) # Dazed: can't act, no AC penalty (CRB)
+19
View File
@@ -135,3 +135,22 @@ def test_aoo_not_suppressed_by_partial_concealment() -> None:
assert engine._resolve_aoo(guard_s, runner_s) is False assert engine._resolve_aoo(guard_s, runner_s) is False
assert engine._aoo_used.get("guard", 0) == 1 assert engine._aoo_used.get("guard", 0) == 1
assert not any("suppressed" in line for line in engine._transcript) assert not any("suppressed" in line for line in engine._transcript)
def test_nauseated_guard_makes_no_aoo() -> None:
"""Given: the guard is nauseated (SRD: "unable to attack")
When: the runner provokes an AoO
Then: no opportunity is taken — no die rolled, no budget spent."""
runner = make_combatant("runner", hp=20, ac=12)
guard = make_combatant("guard", hp=20, ac=15, attack_bonus=5)
states = [
make_state(runner, "players", (2, 1)),
make_state(guard, "monsters", (2, 0)),
]
engine = CombatEngine(ScriptedRng([15, 3]), _grid(("....", "....")), states)
runner_s, guard_s = engine._states
_add_condition(guard_s, "nauseated")
assert engine._resolve_aoo(guard_s, runner_s) is False
assert engine._aoo_used.get("guard", 0) == 0
assert len(engine._rng._queue) == 2
assert runner_s.hp == 20