Skip to main content

✅ Stolas top camio bottom kills deploys serpent

CategoryInteraction
StatusPassing
Testtests/test_abilities_complex.py::TestCamioStolasTriggerChain::test_stolas_top_camio_bottom_kills_deploys_serpent

Tests interaction between Stolas, Duban, Sabnock.

Preconditions

  • P1 Main Phase, P1 has 6 AP

  • Lane 0: P1's Stolas (#022) fused with Camio (#098) — READIED

  • Lane 0: P2's Duban (#001) — 6 HP, 5 damage (1 HP remaining)

  • Lane 0: P2's Sabnock (#003) — READIED (will exhaust)

  • P1's familiar_deck contains "098_1" (Black Serpent)

Action

  • Fire DEMON_EXHAUSTED (Sabnock exhausts)

RESOLUTION CHAIN:

  1. DEMON_EXHAUSTED fires

  2. Stolas trigger (top card, unit_id "022") — deals 1 Fixed Damage

  3. Duban: 5→6 damage, fatally_wounded=True

  4. deal_fixed_damage fires FATALLY_WOUNDED with source=fused demon

  5. Camio trigger (fused bottom, matched via "098" in fused_bottom)

  6. Black Serpent deployed

from engine.events import fire_event, GameEvent, EventType

# REVERSED: Stolas on top, Camio on bottom
stolas_camio = make_fused_demon("022", "098", 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(stolas_camio, duban, sabnock, ap=6)
stolas_p, duban_p, sabnock_p = placed

# Duban at 1 HP remaining
duban_p.damage = 5

# Black Serpent available
state.players[Side.PLAYER_1].familiar_deck.append("098_1")

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 fatally wounded
duban_after = next(
(d for d in result.demons if d.unit_id == "001"), None
)
if duban_after is not None:

Expected Postconditions

  • Duban: fatally wounded

  • Black Serpent (#098_1): on field OR removed from familiar_deck

Assertions

assert duban_after.fatally_wounded, (
f"Duban should be fatally wounded. Got damage={duban_after.damage}"
)

# Black Serpent deployed (Camio trigger fired via fused bottom)
serpent_on_field = any(d.unit_id == "098_1" for d in result.demons)
serpent_in_deck = "098_1" in result.players[Side.PLAYER_1].familiar_deck
assert serpent_on_field or not serpent_in_deck, (
f"Black Serpent should be deployed — Camio's trigger (fused bottom) "
f"fires on FATALLY_WOUNDED from Stolas's damage. "
f"On field: {serpent_on_field}, in deck: {serpent_in_deck}"
)