Skip to main content

✅ Is in range does not short circuit for non cancer

CategoryAbility
StatusPassing
Testtests/test_abilities_complex.py::TestCancerIgnoresRange::test_is_in_range_does_not_short_circuit_for_non_cancer

Regression: the Cancer short-circuit must not affect other demons.

Preconditions

  • Lane 0: P1's Murmur (#002), range=Local

  • Lane 2: P2's Duban (#001) — different lane

Action

  • is_in_range(murmur, duban, Range.LOCAL)
from engine.constants import Range
from engine.targeting import is_in_range

murmur = make_demon("002", lane=0, owner=Side.PLAYER_1)
duban = make_demon("001", lane=2, owner=Side.PLAYER_2)
state, placed = _make_state_with_demons(murmur, duban)

Expected Postconditions

  • Returns False (standard Local check — must share a lane)

Assertions

assert is_in_range(placed[0], placed[1], Range.LOCAL) is False, (
"Non-Cancer Local demon must still respect same-lane requirement."
)