Skip to main content

✅ Snake bind reminder does not interfere with bind idx0

CategoryAbility
StatusPassing
Testtests/test_abilities_familiars.py::test_snake_bind_reminder_does_not_interfere_with_bind_idx0

Snake A's ability[1] reminder passive (no-op) does not interfere

Preconditions

  • Lane 0: P1's Snake A (#036_1) — familiar, READIED, 3 HP, 0 damage.

  • Lane 0: P2's Duban (#001) — 6 HP, 0 damage, READIED.

  • P1 AP: 3.

Action

  • Execute Snake A's Bind (ability 0, 0 AP, ready, 1x) targeting Duban.
from engine.abilities import execute_ability, get_passive_modifiers
from engine.status_effects import get_active_effects_on

state = make_game_state()
state.players[Side.PLAYER_1].ap = 3
state.current_player = Side.PLAYER_1

snake = make_familiar_demon("036_1", lane=0, owner=Side.PLAYER_1)
state = place_demon(state, snake)
snake = state.demons[-1]

duban = make_demon("001", lane=0, owner=Side.PLAYER_2)
state = place_demon(state, duban)
duban = state.demons[-1]

# Execute Bind (ability 0)
new_state = execute_ability(state, snake, 0, targets=[duban])

# Duban gets cannot_act status
duban_after = next(d for d in new_state.demons if d.unit_id == "001")
effects = get_active_effects_on(new_state, duban_after)
cannot_act_effects = [e for e in effects if e.stat == "cannot_act"]

Expected Postconditions

  • Duban has "cannot_act" status (ability[0] still fires correctly).

  • Calling get_passive_modifiers on Snake A at idx=1 still returns 0 for all

Assertions

assert len(cannot_act_effects) >= 1, (
f"Snake A Bind (idx=0) should still apply cannot_act to Duban. "
f"Active effects: {[(e.stat, e.value) for e in effects]}"
)

# Reminder no-op (idx=1) still returns 0 for all stats
snake_after = next(d for d in new_state.demons if d.unit_id == "036_1")
pwr_mod = get_passive_modifiers(new_state, snake_after, "pwr")
assert pwr_mod == 0, (
f"Snake A reminder passive (idx=1) should be a no-op. Got pwr_mod={pwr_mod}."
)