Skip to main content

Enmerkar

Sovereign of Babel's Tower

Unit #047

HPPWRCPSpeedRangeTier
9 (+3)3 (+1)3 (+2)SlowLocalC

Abilities

A King's Strength — X AP

A King's Strength: X AP - b, 1x: e: Enmerkar has +2Xk and cannot be Readied.
Engine Implementation
def _enmerkar_kings_strength(
state: GameState, demon: DemonInstance, targets, choices, rng
) -> GameState:
"""#047 Enmerkar — A King's Strength
Action, X AP, (ready), 1x: Status: Enmerkar has +2X PWR and cannot be Readied.

X is read from choices["x"]. The X AP cost was deducted by execute_ability.
Applies +2X PWR status and "cannot_ready" status to Enmerkar.
Status expires end of current main phase.
(ready) = must be READIED to use; does NOT exhaust.
"""
from engine.status_effects import apply_status

x = choices.get("x", 0) if choices else 0
if x <= 0:
return state

state = apply_status(state, demon, demon, "pwr", 2 * x)
state = apply_status(state, demon, demon, "cannot_ready", 1)
return state

register_ability("047", 0, _enmerkar_kings_strength)

A King's Rule — 1 AP

A King's Rule: 1 AP - b, 1x: Target any amount of Other Local Demons whose combined k is less than Enmerkar Demon's k. Exhaust the targeted demons.
Engine Implementation
def _enmerkar_kings_rule(
state: GameState, demon: DemonInstance, targets, choices, rng
) -> GameState:
"""#047 Enmerkar — A King's Rule
Action, 1 AP, (ready), 1x: Target any amount of Other Local Demons whose combined
PWR is less than Enmerkar's PWR. Exhaust the targeted demons.

Targets: list of Other Local Demons with total PWR < Enmerkar's PWR.
Exhausts each targeted demon.
(ready) = must be READIED; does NOT exhaust Enmerkar.
"""
from engine.operations import exhaust_demon, get_effective_pwr

if not targets:
return state

for target in targets:
t_current = next(
(d for d in state.demons if d.instance_id == target.instance_id), None
)
if t_current is None or t_current.fatally_wounded:
continue
state = exhaust_demon(state, t_current)

return state

register_ability("047", 1, _enmerkar_kings_rule)
Enmerkar