✅ Azure dragon heavenly decree damages enemies
| Category | Ability |
| Status | Passing |
| Test | tests/test_abilities_familiars.py::test_azure_dragon_heavenly_decree_damages_enemies |
Heavenly Decree deals 2×PWR Fixed Damage to all enemy demons in target lane.
Preconditions
-
Lane 1: P1's Azure Dragon (084_4) — READIED, PWR=3.
-
Lane 1: P2's Duban (001) — 0 damage.
-
Lane 1: P2's another unit (002 Murmur) — 0 damage.
-
P1 AP: 6.
Action
- Execute Heavenly Decree (ability 0) targeting lane 1 (choices={"target_lane": 1}).
from engine.abilities import execute_ability
state = make_game_state()
state.players[Side.PLAYER_1].ap = 6
state.current_player = Side.PLAYER_1
dragon = make_familiar_demon("084_4", lane=1, owner=Side.PLAYER_1)
state = place_demon(state, dragon)
dragon = state.demons[-1]
duban = make_demon("001", lane=1, owner=Side.PLAYER_2)
state = place_demon(state, duban)
duban = state.demons[-1]
murmur = make_demon("002", lane=1, owner=Side.PLAYER_2)
state = place_demon(state, murmur)
murmur = state.demons[-1]
new_state = execute_ability(state, dragon, 0, targets=[], choices={"target_lane": 1})
# Azure Dragon PWR = 3, so 2×3 = 6 fixed damage per enemy
pwr = get_effective_pwr(state, dragon)
expected = 2 * pwr # = 6
murmur_after = next(d for d in new_state.demons if d.unit_id == "002")
Expected Postconditions
-
Duban damage = 6 (2×3 fixed).
-
Murmur damage = 6 (2×3 fixed).
-
Azure Dragon itself has 0 damage (it's in lane 1 but is P1's ally — Heavenly Decree
-
only targets enemy demons, so Azure Dragon is NOT hit by its own ability).
Assertions
assert murmur_after.damage == expected, f"Murmur should have {expected} damage, got {murmur_after.damage}"
# Duban (HP=6) takes 6 Fixed → fatally wounded → removed from board
assert not any(d.unit_id == "001" for d in new_state.demons), (
f"Duban (HP=6) must be removed — {expected} Fixed Damage is fatal"
)
assert "001" in new_state.players[Side.PLAYER_2].graveyard, (
"Duban must be in P2's graveyard"
)