Skip to main content

✅ Berith no pwr on allied action

CategoryAbility
StatusPassing
Testtests/test_abilities_passive.py::test_berith_no_pwr_on_allied_action

When an ALLIED demon resolves an action, Berith does NOT gain +1 PWR.

Preconditions

  • Lane 0: P1's Berith (#070) — READIED

  • P1's Murmur (#002) resolves an action (ABILITY_USED fires, side=P1)

  • No status effects on Berith

Action

  • Fire ABILITY_USED event with source=Murmur, side=PLAYER_1 (ally)
from engine.events import GameEvent, EventType, fire_event
from engine.operations import get_effective_pwr

state = make_game_state()
berith = make_demon("070", lane=0, owner=Side.PLAYER_1)
murmur = make_demon("002", lane=0, owner=Side.PLAYER_1)
state = place_demon(state, berith)
state = place_demon(state, murmur)

berith_on_field = next(d for d in state.demons if d.unit_id == "070")
murmur_on_field = next(d for d in state.demons if d.unit_id == "002")

# Allied demon resolves an action
event = GameEvent(
event_type=EventType.ABILITY_USED,
source=murmur_on_field,
target=None,
value=0,
side=Side.PLAYER_1, # allied side
lane=0,
)
new_state = fire_event(state, event)

berith_after = next(d for d in new_state.demons if d.unit_id == "070")
result = get_effective_pwr(new_state, berith_after)

Expected Postconditions

  • Berith has no new status effects

  • Berith effective PWR = 4 (base, no bonus)

Assertions

assert result == 4, (
f"Expected Berith PWR=4 (no bonus from allied action), got {result}"
)