Skip to main content

Azure Dragon

Familiar of Purson — Card 4 of 4

HPPWRCPSpeedRange
932C (Companion)Any

Abilities

Heavenly Decree — 4 AP

Heavenly Decree: 4 AP - a: Deal 2pk fixed damage to All Enemy Demons in Target Lane.
Engine Implementation
def _azure_dragon_heavenly_decree_handler(state: GameState, demon: DemonInstance, targets, choices, rng) -> GameState:
"""084_4 Azure Dragon — Heavenly Decree: Deal 2×PWR Fixed Damage to all
Enemy Demons in Target Lane.

choices: {"target_lane": int}
"""
target_lane = None
if choices and "target_lane" in choices:
target_lane = choices["target_lane"]
elif targets:
target_lane = targets[0].lane

if target_lane is None:
return state

pwr = get_effective_pwr(state, demon)
damage_amount = 2 * pwr

opponent = Side.PLAYER_2 if demon.owner == Side.PLAYER_1 else Side.PLAYER_1
enemies_in_lane = [
d for d in state.demons
if d.lane == target_lane and d.owner == opponent
]

new_state = state
for enemy in enemies_in_lane:
enemy_in_state = _find_demon(new_state, enemy.instance_id)
if enemy_in_state is not None:
new_state = deal_fixed_damage(new_state, enemy_in_state, damage_amount)

return new_state

register_ability("084_4", 0, _azure_dragon_heavenly_decree_handler)
Azure Dragon