Persephone
Protector of the Underworld
Unit #094
| HP | PWR | CP | Speed | Range | Tier |
|---|---|---|---|---|---|
| 12 (+6) | 2 | 3 (+2) | Normal | Any | B |
Abilities
Creation of a Hero — 4 AP
Creation of a Hero: 4 AP - a, 1x: Remove 2pk damage from Target Demon. e: The targeted Demon has +4k, -2 AP Cost, and cannot be Readied.
Engine Implementation
def _persephone_creation_of_a_hero(
state: GameState, demon: DemonInstance, targets, choices, rng
) -> GameState:
"""#094 Persephone — Creation of a Hero
Action, 4 AP, (exhaust), 1x: Remove 2×PWR damage from Target Demon.
Status: Target has +4 PWR, -2 AP Cost, and cannot be Readied.
PWR uses get_effective_pwr (includes fusion bonus).
Status expires end of current main phase.
"""
from engine.operations import get_effective_pwr, remove_damage
from engine.status_effects import apply_status
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 t_current.fatally_wounded:
return state
pwr = get_effective_pwr(state, demon)
state = remove_damage(state, t_current, 2 * pwr)
t_current = next(
(d for d in state.demons if d.instance_id == target.instance_id), None
)
if t_current is None:
return state
state = apply_status(state, demon, t_current, "pwr", 4)
state = apply_status(state, demon, t_current, "ap_cost", -2)
state = apply_status(state, demon, t_current, "cannot_ready", 1)
return state
register_ability("094", 0, _persephone_creation_of_a_hero)
Creation of a Legend — 4 AP
Creation of a Legend: 4 AP - a, 1x: Remove k damage from All Allied Demons. e: All Allied Demons have +2k, -1 AP Cost, and cannot be Readied.
Engine Implementation
def _persephone_creation_of_a_legend(
state: GameState, demon: DemonInstance, targets, choices, rng
) -> GameState:
"""#094 Persephone — Creation of a Legend
Action, 4 AP, (exhaust), 1x: Remove this demon's PWR damage from All Allied Demons.
Status: All Allied Demons have +2 PWR, -1 AP Cost, and cannot be Readied.
PWR uses get_effective_pwr (includes fusion bonus).
Status expires end of current main phase.
"""
from engine.operations import get_effective_pwr, remove_damage
from engine.status_effects import apply_status
pwr = get_effective_pwr(state, demon)
owner = demon.owner
allied = [d for d in state.demons if d.owner == owner]
for ally in allied:
a_current = next(
(d for d in state.demons if d.instance_id == ally.instance_id), None
)
if a_current is None or a_current.fatally_wounded:
continue
state = remove_damage(state, a_current, pwr)
# Apply statuses to all allied demons
for ally in [d for d in state.demons if d.owner == owner]:
a_current = next(
(d for d in state.demons if d.instance_id == ally.instance_id), None
)
if a_current is None or a_current.fatally_wounded:
continue
state = apply_status(state, demon, a_current, "pwr", 2)
state = apply_status(state, demon, a_current, "ap_cost", -1)
state = apply_status(state, demon, a_current, "cannot_ready", 1)
return state
register_ability("094", 1, _persephone_creation_of_a_legend)