Skip to main content

Question

Familiar of Furfur — Card 3 of 3

HPPWRCPSpeedRange
F (Fast)-

Abilities

Passive

Question cannot perform actions. If Question has an unrevealed card, when any Demon damages, Fatally Wounds, or removes Question from play, deal 11 Fixed Damage to that Demon and reveal the card under this.
Engine Implementation
def _question_interaction_trigger(state: GameState, event: GameEvent, demon: DemonInstance, depth: int) -> GameState | None:
"""120_3 Question — passive: when any Demon damages, Fatally Wounds, or
removes Question from play while it has an unrevealed card, deal 11 Fixed
Damage to the attacking/interacting Demon and then reveal the card under this.

Fires on: DAMAGE_RECEIVED, FATALLY_WOUNDED, DEMON_EXILED (targeting Question).
"""
if event.target is None or event.target.instance_id != demon.instance_id:
return None

# Only fires when Question has an unrevealed card
if not _question_has_hidden_card(demon):
return None

# The demon that caused the event
attacker = event.source
if attacker is None:
return None

# Verify attacker is still on field
attacker_in_state = _find_demon(state, attacker.instance_id)
if attacker_in_state is None:
return None

# Deal 11 Fixed Damage to the attacking demon
new_state = deal_fixed_damage(state, attacker_in_state, 11)

# Reveal and remove Question (and its hidden card)
question_refreshed = _find_demon(new_state, demon.instance_id)
if question_refreshed is not None:
new_state, _ = _question_reveal_and_remove(new_state, question_refreshed)

return new_state

def _question_interaction_trigger(state: GameState, event: GameEvent, demon: DemonInstance, depth: int) -> GameState | None:
"""120_3 Question — passive: when any Demon damages, Fatally Wounds, or
removes Question from play while it has an unrevealed card, deal 11 Fixed
Damage to the attacking/interacting Demon and then reveal the card under this.

Fires on: DAMAGE_RECEIVED, FATALLY_WOUNDED, DEMON_EXILED (targeting Question).
"""
if event.target is None or event.target.instance_id != demon.instance_id:
return None

# Only fires when Question has an unrevealed card
if not _question_has_hidden_card(demon):
return None

# The demon that caused the event
attacker = event.source
if attacker is None:
return None

# Verify attacker is still on field
attacker_in_state = _find_demon(state, attacker.instance_id)
if attacker_in_state is None:
return None

# Deal 11 Fixed Damage to the attacking demon
new_state = deal_fixed_damage(state, attacker_in_state, 11)

# Reveal and remove Question (and its hidden card)
question_refreshed = _find_demon(new_state, demon.instance_id)
if question_refreshed is not None:
new_state, _ = _question_reveal_and_remove(new_state, question_refreshed)

return new_state

def _question_interaction_trigger(state: GameState, event: GameEvent, demon: DemonInstance, depth: int) -> GameState | None:
"""120_3 Question — passive: when any Demon damages, Fatally Wounds, or
removes Question from play while it has an unrevealed card, deal 11 Fixed
Damage to the attacking/interacting Demon and then reveal the card under this.

Fires on: DAMAGE_RECEIVED, FATALLY_WOUNDED, DEMON_EXILED (targeting Question).
"""
if event.target is None or event.target.instance_id != demon.instance_id:
return None

# Only fires when Question has an unrevealed card
if not _question_has_hidden_card(demon):
return None

# The demon that caused the event
attacker = event.source
if attacker is None:
return None

# Verify attacker is still on field
attacker_in_state = _find_demon(state, attacker.instance_id)
if attacker_in_state is None:
return None

# Deal 11 Fixed Damage to the attacking demon
new_state = deal_fixed_damage(state, attacker_in_state, 11)

# Reveal and remove Question (and its hidden card)
question_refreshed = _find_demon(new_state, demon.instance_id)
if question_refreshed is not None:
new_state, _ = _question_reveal_and_remove(new_state, question_refreshed)

return new_state

register_trigger("120_3", 0, _question_interaction_trigger)

Challenge — 0 AP

s: Challenge: 0 AP - b: Reveal the card under Target Local Question. If it is Truth, deal 3 Fixed Damage to All Local Allied Demons to this action's performer.
Engine Implementation
def _question_challenge_handler(state: GameState, demon: DemonInstance, targets, choices, rng) -> GameState:
"""120_3 Question — Challenge (Universal, 0 AP, ready).

Reveal the card under Target Local Question.
If it is Truth: deal 3 Fixed Damage to All Local Allied Demons of the
action's performer.
Either way: Question and its hidden card are removed from play (not dead).

targets[0]: the Question familiar being challenged.
demon: the demon performing this action (Universal — can be any demon).
"""
if not targets:
return state

question_target = targets[0]
question_in_state = _find_demon(state, question_target.instance_id)
if question_in_state is None:
return state

# Reveal hidden card
hidden_card_id = question_in_state.abilities_used_this_turn.get("hidden_card")

# If no hidden card, Challenge still resolves — just removes Question
new_state, revealed_id = _question_reveal_and_remove(state, question_in_state)

# If the revealed card is Truth: deal 3 Fixed Damage to all Local Allied
# Demons of the performer (demon) — the performer's allies in the performer's lane.
if revealed_id is not None:
fam_data = FAMILIARS.get(revealed_id)
if fam_data is not None and fam_data.name == "Truth":
# All Local Allied Demons to the PERFORMER (in performer's lane, same owner)
# "Allied" here = same side as demon (the challenger)
performer_lane = demon.lane
performer_owner = demon.owner
local_allies = [
d for d in new_state.demons
if d.lane == performer_lane and d.owner == performer_owner
]
for ally in local_allies:
ally_in_state = _find_demon(new_state, ally.instance_id)
if ally_in_state is not None:
new_state = deal_fixed_damage(new_state, ally_in_state, 3)

return new_state

register_ability("120_3", 1, _question_challenge_handler)
Question