Skip to main content

✅ Nahash forbidden fruit ally attacks marked target for zero ap

CategoryInteraction
StatusPassing
Testtests/test_abilities_actions.py::test_nahash_forbidden_fruit_ally_attacks_marked_target_for_zero_ap

Tests interaction between Nahash, Sabnock, Morax.

Preconditions

  • P1 Main Phase, P1 has 5 AP

  • Lane 0: P1's Nahash (#009) — READIED

  • Lane 0: P1's Demon A (Sabnock #003, PWR=2) — READIED

  • Lane 0: P2's Enemy X (Morax #006, HP=12) — READIED

  • No status effects

Action

  1. Nahash casts Forbidden Fruit on Enemy X (2 AP, exhaust)

  2. Demon A attacks Enemy X

state = execute_ability(state, nahash_p, ability_idx=0, targets=[enemy_x_p])
attack_cost = max(0, ATTACK_AP_COST + target_mod)

Expected Postconditions

  • After step 1: P1 AP = 3 (5 - 2)

  • After step 2: P1 AP = 3 (attack cost 0 — targeting a marked demon)

  • Demon A: EXHAUSTED (attack still exhausts even at 0 AP cost)

  • Enemy X: took Demon A's PWR damage

Assertions

assert state.players[Side.PLAYER_1].ap == 3
assert target_mod == -2
assert attack_cost == 0
assert new_state.players[Side.PLAYER_1].ap == 3
assert demon_a_final.state == DemonState.EXHAUSTED
assert enemy_final.damage > 0