Skip to main content

Astaroth

Genesis of Mathematics

Unit #099

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

Abilities

Prime Knowledge — 1 AP

g: Prime Knowledge: 1 AP - b, 1x: e: The next time Astaroth would target at least 1 Demon, Astaroth has +2k and instead targets All Demons whose remaining HP is prime.
Engine Implementation
def _astaroth_prime_knowledge(
state: GameState, demon: DemonInstance, targets, choices, rng
) -> GameState:
"""#099 Astaroth — Prime Knowledge
Quick, 1 AP, (ready), 1x: Status: The next time Astaroth would target at least
1 Demon, Astaroth has +2 PWR and instead targets All Demons whose remaining HP
is prime.

Applies "prime_knowledge" status to Astaroth (value=1) and +2 PWR status.
The action resolution system reads "prime_knowledge" to override targeting.
Status expires end of current main phase.
"""
from engine.status_effects import apply_status

state = apply_status(state, demon, demon, "prime_knowledge", 1)
state = apply_status(state, demon, demon, "pwr", 2)
return state

register_ability("099", 0, _astaroth_prime_knowledge)

From One, Everything — X AP

From One, Everything: X AP - b, 1x: Deal 1 Fixed Damage to up to 2X Distinct Target Demons. e: Astaroth cannot perform actions.
Engine Implementation
def _astaroth_from_one_everything(
state: GameState, demon: DemonInstance, targets, choices, rng
) -> GameState:
"""#099 Astaroth — From One, Everything
Action, X AP, (ready), 1x: Deal 1 Fixed Damage to up to 2X Distinct Target Demons.
Status: Astaroth cannot perform actions.

X = choices["x"]. Up to 2X targets each take 1 Fixed Damage.
Then Astaroth cannot act (status).
(ready) = must be READIED; does NOT exhaust.
"""
from engine.operations import deal_fixed_damage
from engine.status_effects import apply_status

x = choices.get("x", 0) if choices else 0
max_targets = 2 * x

if targets:
for target in targets[:max_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 = deal_fixed_damage(state, t_current, 1)

# Status: Astaroth cannot perform actions
astaroth_current = next(
(d for d in state.demons if d.instance_id == demon.instance_id), None
)
if astaroth_current is not None and not astaroth_current.fatally_wounded:
state = apply_status(state, demon, astaroth_current, "cannot_act", 1)

return state

register_ability("099", 1, _astaroth_from_one_everything)
Astaroth