✅ Camio stolas fused exhaust kills deploys serpent
| Category | Interaction |
| Status | Passing |
| Test | tests/test_abilities_complex.py::TestCamioStolasTriggerChain::test_camio_stolas_fused_exhaust_kills_deploys_serpent |
Tests interaction between Camio, Duban, Sabnock.
Preconditions
-
P1 Main Phase, P1 has 6 AP
-
Lane 0: P1's Camio (#098) fused with Stolas (#022) — READIED
-
Lane 0: P2's Duban (#001) — 6 HP, 5 damage (1 HP remaining)
-
Lane 0: P2's Sabnock (#003) — READIED (will exhaust to trigger Stolas)
-
P1's familiar_deck contains "098_1" (Black Serpent)
Action
- Fire DEMON_EXHAUSTED event (Sabnock exhausts in lane 0)
RESOLUTION CHAIN:
-
DEMON_EXHAUSTED fires (source=Sabnock)
-
Stolas trigger fires (fused bottom of Camio) — deals 1 Fixed Damage
-
deal_fixed_damage fires DAMAGE_RECEIVED on Duban
-
Duban is fatally_wounded (damage 6 >= HP 6)
-
FATALLY_WOUNDED fires (if wired in execute_ability step 10/11)
from engine.events import fire_event, GameEvent, EventType
camio_stolas = make_fused_demon("098", "022", lane=0, owner=Side.PLAYER_1)
duban = make_demon("001", lane=0, owner=Side.PLAYER_2)
sabnock = make_demon("003", lane=0, owner=Side.PLAYER_2)
state, placed = _make_state_with_demons(camio_stolas, duban, sabnock, ap=6)
camio_p, duban_p, sabnock_p = placed
# Duban has 5 damage on 6 HP (1 remaining)
duban_p.damage = 5
# P1 has Black Serpent in familiar deck
state.players[Side.PLAYER_1].familiar_deck.append("098_1")
# Fire DEMON_EXHAUSTED (Sabnock exhausts)
event = GameEvent(
event_type=EventType.DEMON_EXHAUSTED,
source=sabnock_p,
target=sabnock_p,
value=None,
side=Side.PLAYER_2,
lane=0,
)
result = fire_event(state, event)
# Duban should be fatally wounded (5+1=6 damage on 6 HP)
duban_after = next(
(d for d in result.demons if d.unit_id == "001"), None
)
if duban_after is not None:
Expected Postconditions
-
Duban: removed from board (fatally wounded, 6 damage on 6 HP)
-
Black Serpent: deployed if Camio's FATALLY_WOUNDED trigger fires
Assertions
assert duban_after.fatally_wounded, (
f"Duban should be fatally wounded (5+1=6 damage on 6 HP). "
f"Got damage={duban_after.damage}, fw={duban_after.fatally_wounded}"
)
# FATALLY_WOUNDED fires from deal_fixed_damage → Camio's trigger sees it
# → Black Serpent should be deployed (or at least removed from familiar_deck)
serpent_on_field = any(d.unit_id == "098_1" for d in result.demons)
serpent_still_in_deck = "098_1" in result.players[Side.PLAYER_1].familiar_deck
assert serpent_on_field or not serpent_still_in_deck, (
f"Black Serpent should be deployed (Camio's trigger fires on FATALLY_WOUNDED). "
f"On field: {serpent_on_field}, in deck: {serpent_still_in_deck}"
)