fix(rules): restricted charge - a creature limited to a standard action (staggered/disabled, surprise round) can still charge at 1x speed
This commit is contained in:
@@ -153,14 +153,21 @@ def test_surprise_filter_keeps_one_standard_or_move_plus_free() -> None:
|
||||
|
||||
def test_surprise_filter_collapses_full_attack_and_drops_full_rounds() -> None:
|
||||
# full_attack collapses to a single standard attack (same convention as
|
||||
# the staggered filter); charge/run and a one-round cast are full-round
|
||||
# and illegal; withdraw survives as the Restricted Withdraw standard.
|
||||
# the staggered filter); run and a one-round cast are full-round and
|
||||
# illegal; withdraw survives as the Restricted Withdraw standard, and
|
||||
# charge as the Restricted Charge (SRD "Charge": "If you are able to take
|
||||
# only a standard action on your turn, you can still charge, but you are
|
||||
# only allowed to move up to your speed").
|
||||
full = Action(kind="full_attack", target_id="foe")
|
||||
assert _surprise_filter((full,)) == (Action(kind="attack", target_id="foe"),)
|
||||
assert _surprise_filter((Action(kind="charge", target_id="foe"),)) == ()
|
||||
charge = Action(kind="charge", target_id="foe")
|
||||
assert _surprise_filter((charge,)) == (charge,)
|
||||
assert _surprise_filter((Action(kind="run", target_id="foe"),)) == ()
|
||||
withdraw = Action(kind="withdraw", target_id="foe")
|
||||
assert _surprise_filter((withdraw,)) == (withdraw,)
|
||||
attack = Action(kind="attack", target_id="foe")
|
||||
assert _surprise_filter((charge, attack)) == (charge,)
|
||||
assert _surprise_filter((attack, charge)) == (attack,)
|
||||
summon = Action(kind="cast_spell", target_id="foe", spell_name="Summon")
|
||||
assert _surprise_filter((summon,), cast_time=lambda _a: "one_round") == ()
|
||||
bolt = Action(kind="cast_spell", target_id="foe", spell_name="Bolt")
|
||||
|
||||
Reference in New Issue
Block a user