Skip to main content

White Tiger

Familiar of Purson — Card 3 of 4

HPPWRCPSpeedRange
942S (Slow)Local

Abilities

Escort — 0 AP

g: Escort: 0 AP - b, 1x: Move Target Other Local Allied Demon 1 Lane. Then, move White Tiger to the targeted Demon's Lane.
Engine Implementation
def _white_tiger_escort_handler(state: GameState, demon: DemonInstance, targets, choices, rng) -> GameState:
"""084_3 White Tiger — Escort: Move Other Local Allied Demon 1 lane,
then move White Tiger to that Demon's new lane.

targets[0]: the ally to move.
choices: {"direction": 1 or -1}
"""
if not targets:
return state

ally = targets[0]
direction = 1 # default: move right
if choices and "direction" in choices:
direction = choices["direction"]

import copy
new_state = copy.deepcopy(state)

ally_in_state = _find_demon(new_state, ally.instance_id)
if ally_in_state is None:
return new_state

new_ally_lane = ally_in_state.lane + direction
if not (0 <= new_ally_lane < LANE_COUNT):
return new_state # Can't move — would go off board

ally_in_state.lane = new_ally_lane

# Move White Tiger to ally's new lane
white_tiger_in_state = _find_demon(new_state, demon.instance_id)
if white_tiger_in_state is not None:
white_tiger_in_state.lane = new_ally_lane

return new_state

register_ability("084_3", 0, _white_tiger_escort_handler)

Swiftness — 0 AP

Swiftness: 0 AP - b, 1x: Move White Tiger 1 Lane.
Engine Implementation
def _white_tiger_swiftness_handler(state: GameState, demon: DemonInstance, targets, choices, rng) -> GameState:
"""084_3 White Tiger — Swiftness: Move White Tiger 1 Lane.

choices: {"direction": 1 or -1} or {"target_lane": int}
"""
direction = 1
if choices and "direction" in choices:
direction = choices["direction"]

target_lane = demon.lane + direction
if choices and "target_lane" in choices:
target_lane = choices["target_lane"]

if not (0 <= target_lane < LANE_COUNT):
return state # Off board — no-op

import copy
new_state = copy.deepcopy(state)
white_tiger_in_state = _find_demon(new_state, demon.instance_id)
if white_tiger_in_state is not None:
white_tiger_in_state.lane = target_lane
return new_state

register_ability("084_3", 1, _white_tiger_swiftness_handler)
White Tiger