Skip to main content

✅ Charge push at max boundary

CategoryAbility
StatusPassing
Testtests/test_abilities_complex.py::TestAmunCharge::test_charge_push_at_max_boundary

Amun and target are both in lane 2 (max). Push goes to

Preconditions

  • P1 Main Phase, P1 has 6 AP

  • Lane 2: P1's Amun (#086) — READIED

  • Lane 2: P1's Flauros (#013) — READIED (ally, local)

Action

  • Amun uses Charge targeting Flauros, push_lanes=1
from engine.abilities import execute_ability

import engine.abilities_actions
importlib.reload(engine.abilities_actions)

amun = make_demon("086", lane=2, owner=Side.PLAYER_1)
flauros = make_demon("013", lane=2, owner=Side.PLAYER_1)
state, placed = _make_state_with_demons(amun, flauros, ap=6)
amun_p, flauros_p = placed

state = execute_ability(
state, amun_p, ability_idx=0,
targets=[flauros_p], choices={"push_lanes": 1},
)

flauros_after = next(d for d in state.demons if d.unit_id == "013")
amun_after = next(d for d in state.demons if d.unit_id == "086")

Expected Postconditions

  • Flauros: lane 1 (pushed down since lane 2 is max boundary)

  • Amun: lane 1 (follows target)

Assertions

assert flauros_after.lane == 1, (
f"At max boundary, Flauros should push to lane 1. Got {flauros_after.lane}"
)
assert amun_after.lane == 1, (
f"Amun should follow to lane 1. Got {amun_after.lane}"
)