Skip to main content

✅ Chaos cannot be top card in fusion

CategoryAbility
StatusPassing
Testtests/test_abilities_passive.py::test_chaos_cannot_be_top_card_in_fusion

Chaos cannot be the top card in any fusion.

Preconditions

  • Lane 0: P1's Chaos (#054) — READIED

  • Lane 0: P1's Duban (#001) — READIED

Action

  • Call can_fuse(state, chaos, duban) [Chaos as top]
from engine.fusion import can_fuse

state = make_game_state()
chaos = make_demon("054", lane=0, owner=Side.PLAYER_1)
duban = make_demon("001", lane=0, owner=Side.PLAYER_1)
state = place_demon(state, chaos)
state = place_demon(state, duban)

chaos_on_field = next(d for d in state.demons if d.unit_id == "054")
duban_on_field = next(d for d in state.demons if d.unit_id == "001")

ok, reason = can_fuse(state, chaos_on_field, duban_on_field)

Expected Postconditions

  • Returns (False, "Chaos cannot fuse.")

Assertions

assert ok is False, "Expected Chaos (as top) fusion to be blocked"
assert "Chaos" in reason, f"Expected reason to mention 'Chaos': {reason}"