Skip to main content

✅ Decarabia cannot be moved by enemy

CategoryAbility
StatusPassing
Testtests/test_abilities_passive.py::test_decarabia_cannot_be_moved_by_enemy

can_be_moved_by() returns False when an enemy tries to move

Preconditions

  • P1's Decarabia (#008) on field

  • Decarabia passive: cannot_be_moved_by_enemy = 1

Action

  • can_be_moved_by(state, decarabia, mover_side=P2)
from engine.abilities_passive import can_be_moved_by

state = make_game_state()
decarabia = make_demon("008", lane=0, owner=Side.PLAYER_1)
state = place_demon(state, decarabia)
dec_p = state.demons[0]

Expected Postconditions

  • Returns False (enemy cannot move Decarabia)

Assertions

assert can_be_moved_by(state, dec_p, Side.PLAYER_2) is False, (
"Enemy should NOT be able to move Decarabia"
)
assert can_be_moved_by(state, dec_p, Side.PLAYER_1) is True, (
"Ally should be able to move Decarabia"
)