Skip to main content

✅ Distant attacker full damage

CategoryAbility
StatusPassing
Testtests/test_abilities_complex.py::TestIskandarLocalDef::test_distant_attacker_full_damage

A Distant enemy attacks Iskandar — the +2 DEF does NOT apply.

Preconditions

  • Lane 0: P1's Iskandar (#104, HP=9), READIED

  • Lane 2: P2's Duban (#001), Distant from Iskandar (different lane)

Action

  • deal_damage from Duban to Iskandar with raw amount 3
from engine.operations import deal_damage

iskandar = make_demon("104", lane=0, owner=Side.PLAYER_1)
duban = make_demon("001", lane=2, owner=Side.PLAYER_2)

state, placed = _make_state_with_demons(iskandar, duban, ap=3)
iskandar_p = placed[0]
duban_p = placed[1]

result = deal_damage(state, duban_p, iskandar_p, 3)

iskandar_after = next(d for d in result.demons if d.unit_id == "104")

Expected Postconditions

  • Iskandar: 3 damage (full; +2 DEF does NOT apply vs Distant sources)

Assertions

assert iskandar_after.damage == 3, (
f"Iskandar should take 3 damage (no Local-DEF reduction from Distant). "
f"Got {iskandar_after.damage}."
)