feat(rules): allow a move action in place of a standard action
PF1e CRB (Actions in Combat): a move action can be taken instead of the standard one. The budget filter now converts a second move action onto the standard slot when the move slot is spent and the standard is still free, so (move, stand_up) and (move, move) are legal; a third move (or any further standard) is still surplus. The greedy walk is expressed with a spent-slot map to stay inside the C901 complexity ceiling. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -144,9 +144,19 @@ def test_legal_sequences_are_kept_unchanged() -> None:
|
||||
|
||||
|
||||
def test_two_moves_conflict_but_free_steps_do_not() -> None:
|
||||
# stand_up is a move action: a second move is surplus.
|
||||
# PF1e conversion: a move action taken while the move slot is spent
|
||||
# consumes the standard slot instead — two moves are legal, so
|
||||
# (move, stand_up) is kept whole.
|
||||
actions = (_foe("move"), _foe("stand_up"))
|
||||
assert _action_economy_filter(actions) == (_foe("move"),)
|
||||
assert _action_economy_filter(actions) == actions
|
||||
moves = (_foe("move"), _foe("move"))
|
||||
assert _action_economy_filter(moves) == moves
|
||||
# The third move has neither slot left: standard and move both spent.
|
||||
assert _action_economy_filter((*moves, _foe("attack"))) == moves
|
||||
assert _action_economy_filter((*moves, _foe("full_attack"))) == moves
|
||||
# run is full-round: it cannot follow a move (both slots needed upfront).
|
||||
assert _action_economy_filter((_foe("move"), _foe("run"))) == (_foe("move"),)
|
||||
assert _action_economy_filter((_foe("run"), _foe("move"))) == (_foe("run"),)
|
||||
# 5foot_step is free: two steps do not consume the move slot.
|
||||
steps = (_foe("5foot_step"), _foe("5foot_step"))
|
||||
assert _action_economy_filter(steps) == steps
|
||||
|
||||
Reference in New Issue
Block a user