Skip to main content

Belphegor

Demon of Sloth

Unit #051

HPPWRCPSpeedRangeTier
18 (+12)15 (+13)3 (+2)SlowLocalB

Abilities

Passive

Belphegor comes into play Exhausted. When Belphegor is Fused with (as either the top or bottom cards), Exhaust Belphegor.
Engine Implementation
def _belphegor_deploy_trigger(
state: GameState, event: GameEvent, demon: DemonInstance, depth: int
):
"""#051 Belphegor — Deploy trigger: Belphegor enters play EXHAUSTED.

Fires on DEMON_DEPLOYED. Checks if the deployed demon is THIS Belphegor
instance. If so, exhausts it.

CRITICAL: This is analogous to confusion #17 (Exile arrives EXHAUSTED) —
Belphegor has a built-in deploy-exhausted rule that overrides the normal
deploy-as-READIED behavior.
"""
from engine.operations import exhaust_demon

# Only fire if the deployed demon is this Belphegor instance
if event.source is None:
return None
if event.source.instance_id != demon.instance_id:
return None # A different demon was deployed — not our trigger

return exhaust_demon(state, demon)

def _belphegor_fusion_trigger(
state: GameState, event: GameEvent, demon: DemonInstance, depth: int
):
"""#051 Belphegor — Fusion trigger: When fused with (as top or bottom), Exhaust.

Fires on FUSION_PERFORMED. Checks if Belphegor is involved in the fusion.
After fusion, exhausts the resulting demon (which IS Belphegor if top, or
the fused demon if Belphegor was the bottom card and is now embedded).

The event.source is the resulting fused demon; event.target is None (no
explicit target in a fusion). We use event metadata to check if Belphegor
was a participant.

NOTE: If Belphegor is the TOP card, the resulting demon is still unit_id="051".
If Belphegor is the BOTTOM card, the resulting demon has fused_bottom="051".
In both cases we exhaust the post-fusion demon.
"""
from engine.operations import exhaust_demon

if event.source is None:
return None

# Find the fused result demon in current state (the top card post-fusion)
result_demon = next(
(d for d in state.demons if d.instance_id == event.source.instance_id),
None,
)
if result_demon is None:
return None

# Check if Belphegor is the top card OR bottom card of the fusion
belphegor_is_top = result_demon.unit_id == "051"
belphegor_is_bottom = result_demon.fused_bottom == "051"

if not belphegor_is_top and not belphegor_is_bottom:
return None # Belphegor not involved in this fusion

return exhaust_demon(state, result_demon)

register_trigger("051", 0, _belphegor_deploy_trigger)

Passive

Belphegor has +2 AP Cost on all actions.
Engine Implementation
def _belphegor_ap_cost(state: GameState, demon: DemonInstance) -> dict[str, int]:
return {"ap_cost": 2}

register_passive("051", 1, _belphegor_ap_cost)

Passive

While Belphegor is Readied, this has -3n.
Engine Implementation
def _belphegor_readied_def(state: GameState, demon: DemonInstance) -> dict[str, int]:
if demon.state == DemonState.READIED:
return {"def": -3}
return {}

register_passive("051", 2, _belphegor_readied_def)
Belphegor