Barbas
Protector of Life's Pleasures
Unit #049
| HP | PWR | CP | Speed | Range | Tier |
|---|---|---|---|---|---|
| 12 (+6) | 2 | 3 (+2) | Fast | Any | C |
Abilities
Faith — 1 AP
g: Faith: 1 AP - b, 1x: e: Target Other Demon has +3n.
Engine Implementation
def _barbas_faith(
state: GameState, demon: DemonInstance, targets, choices, rng
) -> GameState:
"""#049 Barbas — Faith
Quick, 1 AP, (ready), 1x: Status: Target Other Demon has +3 DEF.
Status expires end of current main phase.
Quick timing, (ready) — does NOT exhaust.
Target must be Other (not self) — enforced by targeting logic.
1x per turn (confusion #20).
Targets: [target_other_demon]
"""
target = targets[0]
state = apply_status(state, demon, target, "def", 3)
return state
register_ability("049", 0, _barbas_faith)
Bonds of Solidarity — 0 AP
h: Bonds of Solidarity: 0 AP - a: e: All Other Allied Demons in Target Lane have +Xn, where X is the number of Allied Demons in the targeted Lane.
Engine Implementation
def _barbas_bonds_of_solidarity(
state: GameState, demon: DemonInstance, targets, choices, rng
) -> GameState:
"""#049 Barbas — Bonds of Solidarity
Start of Turn, 0 AP, (exhaust): Status: All Other Allied Demons in Target Lane
have +X DEF, where X is the number of Allied Demons in the targeted Lane.
X = count of ALL allied demons in the target lane (including Barbas if present).
Applies +X DEF status to all OTHER allied demons in target lane.
Status expires end of current main phase.
"""
from engine.status_effects import apply_status
if choices and "lane" in choices:
target_lane = choices["lane"]
elif targets:
target_lane = targets[0].lane
else:
target_lane = demon.lane
# Count ALL allied demons in target lane (including Barbas)
allied_in_lane = [
d for d in state.demons
if d.lane == target_lane and d.owner == demon.owner
]
x = len(allied_in_lane)
if x <= 0:
return state
# Apply +X DEF to all OTHER allied demons in lane
for ally in allied_in_lane:
if ally.instance_id != demon.instance_id:
state = apply_status(state, demon, ally, "def", x)
return state
register_ability("049", 1, _barbas_bonds_of_solidarity)