fix(rules): stop steal from taking held weapons
PF1e (APG Steal): "Items held in the hands (such as wielded weapons or wands) also cannot be taken with the steal maneuver—you must use the disarm combat maneuver instead." The model carries no non-held items, so a successful steal now takes nothing and logs "nothing stealable — wielded weapons require disarm". README updated; the retrieve_weapon tests keep locking the restoration mechanism directly. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -355,17 +355,20 @@ def test_dirty_trick_fails_on_natural_1() -> None:
|
||||
assert engine._transcript[-1].endswith("-> FAILED")
|
||||
|
||||
|
||||
def test_steal_takes_melee_weapon() -> None:
|
||||
def test_steal_refuses_wielded_weapon() -> None:
|
||||
# APG Steal: "Items held in the hands (such as wielded weapons or wands)
|
||||
# also cannot be taken with the steal maneuver—you must use the disarm
|
||||
# combat maneuver instead." The target's sword is wielded: the success
|
||||
# steals nothing.
|
||||
a_spec = make_combatant("a", attack_bonus=2)
|
||||
b_spec = make_combatant("b")
|
||||
a = make_state(a_spec, "players", (1, 1))
|
||||
b = make_state(b_spec, "monsters", (1, 2))
|
||||
hp_before = b.hp
|
||||
engine = make_engine([1, 12], [a, b])
|
||||
engine._execute_maneuver(a, b, "steal")
|
||||
assert "b-w" in b.weapon_stolen
|
||||
assert engine.weapon_for(b, a) is None
|
||||
assert b.hp == hp_before
|
||||
assert not b.weapon_stolen
|
||||
assert engine.weapon_for(b, a) is not None # the sword stays usable
|
||||
assert "nothing stealable — wielded weapons require disarm" in engine._transcript[-1]
|
||||
|
||||
|
||||
def test_steal_nothing_to_steal() -> None:
|
||||
@@ -376,7 +379,7 @@ def test_steal_nothing_to_steal() -> None:
|
||||
engine = make_engine([12], [a, b])
|
||||
engine._execute_maneuver(a, b, "steal")
|
||||
assert not b.weapon_stolen
|
||||
assert "nothing to steal" in engine._transcript[-1]
|
||||
assert "nothing stealable" in engine._transcript[-1]
|
||||
|
||||
|
||||
def test_reposition_moves_to_first_free_neighbor() -> None:
|
||||
|
||||
Reference in New Issue
Block a user