✅ Berith gains pwr on enemy action
| Category | Ability |
| Status | Passing |
| Test | tests/test_abilities_passive.py::test_berith_gains_pwr_on_enemy_action |
When an enemy demon resolves an action, Berith gains +1 PWR status.
Preconditions
-
Lane 0: P1's Berith (#070) — READIED
-
P2's Duban (#001) resolves an action (ABILITY_USED fires, side=P2)
-
No status effects on Berith
Action
- Fire ABILITY_USED event with source=Duban, side=PLAYER_2
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)
duban = make_demon("001", lane=1, owner=Side.PLAYER_2)
state = place_demon(state, berith)
state = place_demon(state, duban)
berith_on_field = next(d for d in state.demons if d.unit_id == "070")
duban_on_field = next(d for d in state.demons if d.unit_id == "001")
# Enemy demon resolves an action
event = GameEvent(
event_type=EventType.ABILITY_USED,
source=duban_on_field,
target=None,
value=0,
side=Side.PLAYER_2, # enemy side
lane=1,
)
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 1 active status effect: +1 PWR
-
Berith effective PWR = 4 (base) + 1 (status) = 5
Assertions
assert result == 5, (
f"Expected Berith PWR=5 (4 base + 1 from enemy action status), got {result}"
)