Skip to main content

✅ Execute deducts ap

CategoryAbility
StatusPassing
Testtests/test_abilities_registry.py::test_execute_deducts_ap

Sabnock's Pink Haze costs 1 AP. Owner starts with 5 AP.

Preconditions

  • P1 Main Phase, P1 has 5 AP

  • Lane 0: P1's Sabnock ("003") — READIED, 0 damage

  • ability[0]: Pink Haze, 1 AP, tap_required=True

Action

  • execute_ability(state, demon, ability_idx=0)

Expected Postconditions

  • P1 AP: 4 (5 - 1 for Pink Haze)

  • Original state.players[P1].ap is still 5 (copy-on-write).

Assertions

assert result.players[Side.PLAYER_1].ap == 4
assert state.players[Side.PLAYER_1].ap == original_ap