diff --git a/src/pf1e_simulator/conditions.py b/src/pf1e_simulator/conditions.py index de5f99e..f643240 100644 --- a/src/pf1e_simulator/conditions.py +++ b/src/pf1e_simulator/conditions.py @@ -207,9 +207,12 @@ PARALYZED = Condition( ) # 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( name="nauseated", cant_attack=True, + cant_aoo=True, ) # Dazed: can't act, no AC penalty (CRB) diff --git a/tests/test_aoo_defense.py b/tests/test_aoo_defense.py index c7c65d7..aba7738 100644 --- a/tests/test_aoo_defense.py +++ b/tests/test_aoo_defense.py @@ -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._aoo_used.get("guard", 0) == 1 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