Skip to main content

Balam

The Crazed Arsonist

Unit #040

HPPWRCPSpeedRangeTier
12 (+6)23 (+2)NormalLocalC

Abilities

Ashes to Ashes — 0 AP

h: Ashes to Ashes: 0 AP - b, 1x: Deal k damage to All Other Local Demons.
Engine Implementation
def _balam_ashes_to_ashes(state: GameState, demon: DemonInstance, targets, choices, rng) -> GameState:
"""#040 Balam — Ashes to Ashes
Start of Turn, 0 AP, (ready), 1x: Deal PWR damage to All Other Local Demons.

CRITICAL: "All Other Local Demons" includes allied demons in the same lane
(confusion #21). Regular damage, reduced by DEF.
(ready) means Balam must be readied but is NOT exhausted by using this ability.
"""
from engine.operations import get_effective_pwr, deal_damage
from engine.targeting import get_all_other_demons

pwr = get_effective_pwr(state, demon)

# "All Other Local Demons" = same lane, excluding self
local_others = [
d for d in state.demons
if d.lane == demon.lane and d.instance_id != demon.instance_id
]

for t in local_others:
state = deal_damage(state, demon, t, pwr)

return state

register_ability("040", 0, _balam_ashes_to_ashes)

Dust to Dust — 2 AP

Dust to Dust: 2 AP - a: Deal k damage to All Other Local Demons.
Engine Implementation
def _balam_dust_to_dust(state: GameState, demon: DemonInstance, targets, choices, rng) -> GameState:
"""#040 Balam — Dust to Dust
2 AP, (exhaust): Deal PWR damage to All Other Local Demons.

CRITICAL: "All Other Local Demons" includes allies — friendly fire.
Uses get_effective_pwr() for PWR-scaling (includes fusion bonus).
"Other" means everyone in the same lane except the demon itself.

Targets: None (applies to all other local demons automatically)
"""
pwr = get_effective_pwr(state, demon)
all_in_lane = get_local_demons(state, demon.lane)
for target in all_in_lane:
if target.instance_id != demon.instance_id:
state = deal_damage(state, demon, target, pwr)
return state

def _balam_dust_to_dust(state: GameState, demon: DemonInstance, targets, choices, rng) -> GameState:
"""#040 Balam — Dust to Dust
Action, 2 AP, (exhaust): Deal PWR damage to All Other Local Demons.

CRITICAL: "All Other Local Demons" includes allied demons (confusion #21).
Regular damage, reduced by DEF.
"""
from engine.operations import get_effective_pwr, deal_damage

pwr = get_effective_pwr(state, demon)
local_others = [
d for d in state.demons
if d.lane == demon.lane and d.instance_id != demon.instance_id
]

for t in local_others:
state = deal_damage(state, demon, t, pwr)

return state

register_ability("040", 1, _balam_dust_to_dust)
Balam