Berith
The Red Swordsman
Unit #070
| HP | PWR | CP | Speed | Range | Tier |
|---|---|---|---|---|---|
| 9 (+3) | 4 (+2) | 3 (+2) | Normal | Local | A |
Abilities
Passive
Whenever an Enemy Demon resolves an action, apply e: Berith's next action has +1k.
Engine Implementation
def _berith_enemy_action_pwr(
state,
event,
demon,
depth: int,
):
"""Apply +1 PWR status to Berith when an enemy demon resolves an action.
Fires on ABILITY_USED. If the event source is an enemy of Berith's owner,
apply +1 PWR status to Berith.
event.source = the demon that resolved the action
event.side = the side of the acting demon
"""
if event.source is None:
return None
# Only trigger when the acting demon is an enemy of Berith
if event.side == demon.owner:
# Allied action — do NOT trigger
return None
# Enemy resolved an action — give Berith +1 PWR status
from engine.status_effects import apply_status # lazy: avoids circular
new_state = apply_status(state, demon, demon, "pwr", 1)
return new_state
register_trigger("070", 0, _berith_enemy_action_pwr)
Judgement Cut — 5 AP
g: Judgement Cut: 5 AP - a: You may move Berith 1 Lane. Then, deal 2pk Fixed Damage to Target Local Demon.
Engine Implementation
def _berith_judgement_cut(
state: GameState, demon: DemonInstance, targets, choices, rng
) -> GameState:
"""#070 Berith — Judgement Cut
Quick, 5 AP, (exhaust): You may move Berith 1 Lane. Then, deal 2×PWR Fixed
Damage to Target Local Demon.
Optional movement: choices["move_lane"] if Berith should move (1 lane away).
Then deal 2 * get_effective_pwr Fixed Damage to target (which must be local
AFTER any movement).
CRITICAL: Fixed Damage bypasses DEF entirely.
PWR uses get_effective_pwr (includes fusion bonus fPWR).
"""
from engine.operations import get_effective_pwr, deal_fixed_damage
# Optional: move Berith 1 lane
if choices and "move_lane" in choices:
move_to = choices["move_lane"]
new_state = copy.deepcopy(state)
berith_in_state = next(
(d for d in new_state.demons if d.instance_id == demon.instance_id), None
)
if berith_in_state is not None and abs(move_to - berith_in_state.lane) == 1:
berith_in_state.lane = move_to
state = new_state
# Re-fetch demon after move
demon = next(
(d for d in state.demons if d.instance_id == demon.instance_id), demon
)
if not targets:
return state
target = targets[0]
pwr = get_effective_pwr(state, demon)
state = deal_fixed_damage(state, target, 2 * pwr)
return state
register_ability("070", 1, _berith_judgement_cut)