Lix Tetrax
Keeper of the Wind
Unit #050
| HP | PWR | CP | Speed | Range | Tier |
|---|---|---|---|---|---|
| 9 (+3) | 4 (+2) | 3 (+2) | Fast | Local | A |
Abilities
Passive
After Lix Tetrax resolves an action targeting any Demon(s) within the action's range, apply e: Actions that Target the targeted Demon(s) have -1 AP Cost.
Engine Implementation
def _lix_tetrax_discount_trigger(
state: GameState, event: GameEvent, demon: DemonInstance, depth: int
) -> GameState | None:
"""#050 Lix Tetrax idx=0 — After Lix Tetrax resolves an action targeting
any Demon(s), apply Status: Actions targeting those Demons have -1 AP Cost.
event.source = Lix Tetrax (must be this instance)
event.target = the primary targeted demon
"""
lix = next((d for d in state.demons if d.instance_id == demon.instance_id), None)
if lix is None or lix.fatally_wounded:
return None
# Must be Lix Tetrax's own action
if event.source is None or event.source.instance_id != lix.instance_id:
return None
# Must have a target
if event.target is None:
return None
# Re-fetch target in state
target_in_state = next(
(d for d in state.demons if d.instance_id == event.target.instance_id), None
)
if target_in_state is None or target_in_state.fatally_wounded:
return None
# Apply Status: -1 ap_cost when targeted (stored as "ap_cost_when_targeted")
# This signal is read by execute_ability when computing action costs.
new_state = _apply_status_lix(state, lix, target_in_state, "ap_cost_when_targeted", -1)
return new_state
register_trigger("050", 0, _lix_tetrax_discount_trigger)
Passive
Lix Tetrax's March basic action is performed Without Cost.`
Engine Implementation
def _lix_tetrax_free_march(state, demon) -> dict:
"""Lix Tetrax March is Without Cost: 0 AP and ignores exhaust/ready."""
return {"march_free": 1}
register_passive("050", 1, _lix_tetrax_free_march)