Sword of Wrath
Familiar of Aamon — Card 1 of 1
| HP | PWR | CP | Speed | Range |
|---|---|---|---|---|
| 4 | 3 | 1 | C (Companion) | Local |
Abilities
Passive
Sword of Wrath cannot take damage while Aamon is in play. (Fused Demons have both names.)
Engine Implementation
def _sword_of_wrath_invulnerable_trigger(state: GameState, event: GameEvent, demon: DemonInstance, depth: int) -> GameState | None:
"""096_1 Sword of Wrath — cannot take damage while Aamon is in play.
Intercepts DAMAGE_RECEIVED events targeting the Sword of Wrath and
cancels them if Aamon is still on the field.
"""
if event.target is None or event.target.instance_id != demon.instance_id:
return None
# Check if Aamon (main_unit_id "096") is on the field (same owner)
aamon = _find_demon_by_parent_unit_id(state, "096", demon.owner)
if aamon is None:
return None # Aamon not in play — damage resolves normally
# Cancel the damage: undo the increase to Sword of Wrath's damage
import copy
new_state = copy.deepcopy(state)
sword_in_state = _find_demon(new_state, demon.instance_id)
if sword_in_state is None:
return None
# Set damage back to what it was before this event by subtracting the dealt amount
damage_dealt = event.value or 0
sword_in_state.damage = max(0, sword_in_state.damage - damage_dealt)
return new_state
register_trigger("096_1", 0, _sword_of_wrath_invulnerable_trigger)
Passive
After Aamon resolves an action, apply e: This Demon's next action has -1 AP Cost.
Engine Implementation
def _sword_of_wrath_after_aamon_trigger(state: GameState, event: GameEvent, demon: DemonInstance, depth: int) -> GameState | None:
"""096_1 Sword of Wrath — after Aamon resolves an action, apply -1 AP Cost to Sword of Wrath.
Fires on ABILITY_USED events by Aamon (unit_id "096").
"""
source = event.source
if source is None:
return None
# Must be Aamon acting (or fused demon containing Aamon)
if source.unit_id != "096" and not (source.is_fused and source.fused_bottom == "096"):
return None
# Must be owned by same player
if source.owner != demon.owner:
return None
new_state = apply_status(state, source, demon, "ap_cost", -1)
return new_state
register_trigger("096_1", 1, _sword_of_wrath_after_aamon_trigger)
Call Aamon — 0 AP
g: Call Aamon: 0 AP - b, 1x: Move Aamon to this.
Engine Implementation
def _sword_of_wrath_call_aamon_handler(state: GameState, demon: DemonInstance, targets, choices, rng) -> GameState:
"""096_1 Sword of Wrath — Call Aamon: Move Aamon to this Demon's lane."""
aamon = _find_demon_by_parent_unit_id(state, "096", demon.owner)
if aamon is None:
return state # Aamon not in play — no-op
import copy
new_state = copy.deepcopy(state)
aamon_in_state = _find_demon(new_state, aamon.instance_id)
if aamon_in_state is not None:
# Move Aamon to Sword of Wrath's lane
sword_in_state = _find_demon(new_state, demon.instance_id)
if sword_in_state is not None:
aamon_in_state.lane = sword_in_state.lane
return new_state
register_ability("096_1", 2, _sword_of_wrath_call_aamon_handler)