✅ Gear blocked when window closed
| Category | Ability |
| Status | Passing |
| Test | tests/test_response_windows.py::TestGearWindow::test_gear_blocked_when_window_closed |
Gear window is closed. Gear abilities blocked.
Preconditions
- gear_window_open = False
Action
See code below.
from engine.action_timing import _can_perform_for_ability
demon = make_demon("003", lane=0, owner=Side.PLAYER_2)
state = _make_state(demon)
state.gear_window_open = False
gear_ability = {"type": "Action", "timing": "gear", "ap_cost": 0,
"tap_required": False, "one_time_use": False}
ok, reason = _can_perform_for_ability(
state, state.demons[0], gear_ability, AbilityTiming.GEAR
)
Expected Postconditions
- Gear timing check fails
Assertions
assert not ok, "Gear should be blocked when gear_window_open=False"
assert "gear" in reason.lower()