Skip to main content

Bune

The Gravetender

Unit #113

HPPWRCPSpeedRangeTier
9 (+3)23 (+2)NormalAnyB

Abilities

Passive

c: While Bune is not Fatally Wounded, All Other Local Demons that are Fatally Wounded do not have their deaths resolved. (This passive does not remove the Fatally Wounded condition; it only delays their death.)
Engine Implementation
def _bune_death_prevention_check(state: GameState, demon: DemonInstance) -> dict:
"""#113 Bune — Field passive: death prevention marker.

Returns a marker indicating Bune's death suppression aura is active.
Actual suppression requires turn_sequence.py integration.

TODO: turn_sequence.end_main_phase must check if a Bune (not fatally_wounded)
is present in the dying demon's lane and skip resolution if so.
"""
# Marker passive — returns no stat modifiers.
# The actual death suppression is enforced externally by turn_sequence.
return {}

register_passive("113", 0, _bune_death_prevention_check)

Puppetry — 0 AP

g: Puppetry: 0 AP - b, 1x: Have Target Fatally Wounded Demon perform an action Without Cost, as if you control the targeted Demon.
Engine Implementation
def _bune_puppetry(
state: GameState, demon: DemonInstance, targets, choices, rng
) -> GameState:
"""#113 Bune — Puppetry
Quick, 0 AP, (ready), 1x: Have Target Fatally Wounded Demon perform an action
Without Cost, as if you control the targeted Demon.

Target must be Fatally Wounded. Bune's controller picks the action from that
demon's ability pool and executes it as if they owned the demon.
choices["target_ability_idx"] = which of the target's abilities to perform.
choices["action_targets"] = targets for the borrowed action.
choices["action_choices"] = choices for the borrowed action.
"""
from engine.abilities import ABILITY_HANDLERS

if not targets:
return state

target = targets[0]
t_current = next(
(d for d in state.demons if d.instance_id == target.instance_id), None
)
if t_current is None or not t_current.fatally_wounded:
return state # Target must be fatally wounded

if not choices:
return state

ability_idx = choices.get("target_ability_idx", 0)
action_targets = choices.get("action_targets", [])
action_choices = choices.get("action_choices", {})

handler = ABILITY_HANDLERS.get((t_current.unit_id, ability_idx))
if handler is None:
return state

# Execute the borrowed action as Bune's controller via the target demon
# (t_current acts but Bune's controller pays — no cost here since Without Cost)
return handler(state, t_current, action_targets, action_choices, rng)

register_ability("113", 1, _bune_puppetry)
Bune