Skip to main content

Valac

The Snake Whisperer

Unit #036

HPPWRCPSpeedRangeTier
15 (+9)24 (+3)FastAnyC

Abilities

Call Snake — 1 AP

q: Call Snake: 1 AP - b, 1x: Play a Snake Familiar into Target Lane. (Valac has 4 Snake Familiars.)
Engine Implementation
def _valac_call_snake(state: GameState, demon: DemonInstance, targets, choices, rng) -> GameState:
"""#036 Valac — Call Snake
Action, 1 AP, (ready), 1x: Play a Snake Familiar into Target Lane.

Deploys the first available Snake familiar from the player's familiar_deck.
Target lane from choices["lane"] or first target's lane, else Valac's lane.
"""
from engine.operations import deploy_familiar

# Determine target lane
if choices and "lane" in choices:
target_lane = choices["lane"]
elif targets:
target_lane = targets[0].lane
else:
target_lane = demon.lane

# Find first available Snake in the player's familiar_deck
player = state.players[demon.owner]
snake_id = None
for sid in _SNAKE_FAM_IDS_ORDERED:
if sid in player.familiar_deck:
snake_id = sid
break

if snake_id is None:
return state # No Snakes available — no effect

new_state = deploy_familiar(state, demon.owner, snake_id, target_lane)
return new_state

register_ability("036", 0, _valac_call_snake)
Valac