Gremory
The Trickster
Unit #027
| HP | PWR | CP | Speed | Range | Tier |
|---|---|---|---|---|---|
| 9 (+3) | 3 (+1) | 3 (+2) | Fast | Distant | B |
Abilities
Misdirection — 0 AP
g: Misdirection: 0 AP - b, 1x: Move Target Other Allied Demon 1 Lane.
Engine Implementation
def _gremory_misdirection(state: GameState, demon: DemonInstance, targets, choices, rng) -> GameState:
"""#027 Gremory — Misdirection
Quick, 0 AP, (ready), 1x: Move Target Other Allied Demon 1 Lane.
Quick timing, (ready) — does NOT exhaust.
Target must be OTHER allied demon (not self) — enforced by targeting logic.
Moves 1 lane in the direction specified by choices["lane"].
Target lane from choices["lane"] (caller must provide an adjacent lane).
Targets: [target_other_allied_demon]
Choices: {"lane": int}
"""
return _move_to_lane(state, targets[0], choices["lane"])
register_ability("027", 0, _gremory_misdirection)
Swap Positions — 0 AP
Swap Positions: 0 AP - b, 1x: Target 2 Demons, both controlled by the same Evoker. Swap their positions.
Engine Implementation
def _gremory_swap_positions(
state: GameState, demon: DemonInstance, targets, choices, rng
) -> GameState:
"""#027 Gremory — Swap Positions
Action, 0 AP, (ready), 1x: Target 2 Demons, both controlled by the same Evoker.
Swap their positions (lanes).
targets[0] and targets[1] must be controlled by the same Evoker.
Swaps their lane values.
(ready) = Gremory must be READIED; does NOT exhaust Gremory.
"""
if not targets or len(targets) < 2:
return state
demon_a = targets[0]
demon_b = targets[1]
# Both targets must be controlled by the same Evoker
if demon_a.owner != demon_b.owner:
return state # Invalid targets — different controllers, no swap
new_state = copy.deepcopy(state)
da = next((d for d in new_state.demons if d.instance_id == demon_a.instance_id), None)
db = next((d for d in new_state.demons if d.instance_id == demon_b.instance_id), None)
if da is None or db is None:
return state
# Swap lanes
da.lane, db.lane = db.lane, da.lane
return new_state
register_ability("027", 1, _gremory_swap_positions)