✅ Register and execute
| Category | Ability |
| Status | Passing |
| Test | tests/test_abilities_registry.py::test_register_and_execute |
Register an action handler for Sabnock's Pink Haze (ability 0).
Preconditions
-
P1 Main Phase, P1 has 5 AP
-
Lane 0: P1's Sabnock ("003") — READIED, 0 damage
-
ability[0]: Action (Quick), Pink Haze, 1 AP, tap_required=True
-
Handler registered for ("003", 0): sets a flag via side-effect list
Action
- execute_ability(state, demon, ability_idx=0)
result = execute_ability(state, demon_on_field, ability_idx=0)
Expected Postconditions
-
Handler was called exactly once (flag is True).
-
State returned from execute_ability is a GameState.
Assertions
assert len(called) == 1
assert result is not None
assert hasattr(result, "demons")