✅ Foras exhausts target after exhaust action
| Category | Ability |
| Status | Passing |
| Test | tests/test_abilities_passive.py::test_foras_exhausts_target_after_exhaust_action |
Foras uses an exhaust-cost action (Foras becomes EXHAUSTED),
Preconditions
-
Lane 0: P1's Foras (#072) — EXHAUSTED (just used exhaust-cost action)
-
Lane 0: P2's Duban (#001) — READIED (target of Foras's action)
-
ABILITY_USED event fires: source=Foras, target=Duban
Action
- Fire ABILITY_USED event: source=Foras (EXHAUSTED), target=Duban
from engine.events import GameEvent, EventType, fire_event
state = make_game_state()
foras = make_demon("072", lane=0, owner=Side.PLAYER_1, state=DemonState.EXHAUSTED)
duban = make_demon("001", lane=0, owner=Side.PLAYER_2)
state = place_demon(state, foras)
state = place_demon(state, duban)
foras_on_field = next(d for d in state.demons if d.unit_id == "072")
duban_on_field = next(d for d in state.demons if d.unit_id == "001")
event = GameEvent(
event_type=EventType.ABILITY_USED,
source=foras_on_field,
target=duban_on_field,
value=1,
side=Side.PLAYER_1,
lane=0,
)
new_state = fire_event(state, event)
duban_after = next(d for d in new_state.demons if d.unit_id == "001")
Expected Postconditions
- Duban: EXHAUSTED (Foras's passive triggered)
Assertions
assert duban_after.state == DemonState.EXHAUSTED, (
f"Expected Duban EXHAUSTED after Foras's passive, got {duban_after.state}"
)