Skip to main content

✅ Decarabia can be moved by ally

CategoryAbility
StatusPassing
Testtests/test_abilities_passive.py::test_decarabia_can_be_moved_by_ally

Allied demons CAN move Decarabia. The trigger only blocks enemies.

Preconditions

  • Lane 0: P1's Decarabia (#008) — READIED

  • P1's allied effect moves Decarabia from lane 0 to lane 1

Action

  • Fire DEMON_MARCHED event with source=P1 ally, target=Decarabia,
from engine.events import GameEvent, EventType, fire_event

state = make_game_state()
decarabia = make_demon("008", lane=1, owner=Side.PLAYER_1) # moved to lane 1
ally_mover = make_demon("001", lane=1, owner=Side.PLAYER_1)
state = place_demon(state, decarabia)
state = place_demon(state, ally_mover)

decarabia_on_field = next(d for d in state.demons if d.unit_id == "008")
ally_on_field = next(d for d in state.demons if d.unit_id == "001")

event = GameEvent(
event_type=EventType.DEMON_MARCHED,
source=ally_on_field,
target=decarabia_on_field,
value=0,
side=Side.PLAYER_1,
lane=1,
)
new_state = fire_event(state, event)

decarabia_after = next(d for d in new_state.demons if d.unit_id == "008")

Expected Postconditions

  • Decarabia stays in lane 1 (move NOT reverted — ally moved it)

Assertions

assert decarabia_after.lane == 1, (
f"Expected Decarabia in lane 1 (ally move not blocked), got lane {decarabia_after.lane}"
)