Skip to main content

✅ Multiple passives stack correctly

CategoryAbility
StatusPassing
Testtests/test_abilities_passive.py::test_multiple_passives_stack_correctly

A demon under multiple auras accumulates all passive modifiers.

Preconditions

  • Lane 0: P1's Azazel (#011) — READIED (aura: +1 PWR, +2 DEF to allies)

  • Lane 0: P1's Duban (#001) — READIED (+5 DEF own passive)

Action

  • Query get_effective_def(state, duban)

  • Query get_effective_pwr(state, duban)

state = make_game_state()
azazel = make_demon("011", lane=0, owner=Side.PLAYER_1)
duban = make_demon("001", lane=0, owner=Side.PLAYER_1)
state = place_demon(state, azazel)
state = place_demon(state, duban)
duban_on_field = next(d for d in state.demons if d.unit_id == "001")

def_ = get_effective_def(state, duban_on_field)
pwr = get_effective_pwr(state, duban_on_field)

Expected Postconditions

  • DEF: 7 (5 Duban + 2 Azazel aura)

  • PWR: 4 (3 Duban base + 1 Azazel aura)

Assertions

assert def_ == 7, f"Expected DEF=7 (5+2), got {def_}"
assert pwr == 4, f"Expected PWR=4 (3+1), got {pwr}"