✅ Dantalion deploy fuses local allies
| Category | Interaction |
| Status | Passing |
| Test | tests/test_abilities_complex.py::TestDantalionDeployFusion::test_dantalion_deploy_fuses_local_allies |
Dantalion deploys to Lane 0 with two local allies present.
Preconditions
-
Lane 0: P1's Murmur (ally, fusible)
-
Lane 0: P1's Sabnock (ally, fusible)
-
Lane 1: P1's Duban (NOT local — different lane)
-
Lane 0: P2's Enemy (NOT allied)
Action
- Fire DEMON_DEPLOYED for a newly-deployed Dantalion in lane 0
from engine.events import fire_event, GameEvent, EventType
dantalion = make_demon("106", lane=0, owner=Side.PLAYER_1)
murmur = make_demon("002", lane=0, owner=Side.PLAYER_1)
sabnock = make_demon("003", lane=0, owner=Side.PLAYER_1)
duban = make_demon("001", lane=1, owner=Side.PLAYER_1) # different lane
enemy = make_demon("001", lane=0, owner=Side.PLAYER_2)
state, placed = _make_state_with_demons(dantalion, murmur, sabnock, duban, enemy)
dantalion_p = placed[0]
event = GameEvent(
event_type=EventType.DEMON_DEPLOYED,
source=dantalion_p,
target=None,
value=None,
side=Side.PLAYER_1,
lane=0,
)
result = fire_event(state, event)
dantalion_after = next(d for d in result.demons if d.unit_id == "106")
Expected Postconditions
-
Dantalion is_fused=True, fused_bottom contains both "002" and "003"
-
Duban (different lane) NOT fused
-
Enemy NOT fused
Assertions
assert dantalion_after.is_fused is True, "Dantalion should be fused after deploy trigger"
bottoms = set(b.strip() for b in (dantalion_after.fused_bottom or "").split(","))
assert "002" in bottoms, f"Murmur should be fused. Got bottoms={bottoms}."
assert "003" in bottoms, f"Sabnock should be fused. Got bottoms={bottoms}."
assert "001" not in bottoms, f"Duban (different lane) should NOT be fused. Got bottoms={bottoms}."
# Enemy should still be on field
enemy_still = [d for d in result.demons if d.unit_id == "001" and d.owner == Side.PLAYER_2]
assert len(enemy_still) == 1, "Enemy (different owner) must not fuse"