Skip to main content

✅ Apply status creates effect

CategoryAbility
StatusPassing
Testtests/test_status_effects.py::test_apply_status_creates_effect

Sabnock applies a PWR debuff to Duban during phase 1.

Preconditions

  • phase_counter=1

  • Lane 0: P1's Sabnock (#088), Lane 0: P2's Duban (#001)

  • No status effects active

Action

  • apply_status(state, sabnock, duban, "pwr", -3)

Expected Postconditions

  • Exactly 1 status effect in state.status_effects

  • effect.stat = "pwr"

  • effect.value = -3

  • effect.expires_phase = 1

  • Original state is unchanged (copy-on-write)

Assertions

assert len(new_state.status_effects) == 1
assert effect.stat == "pwr"
assert effect.value == -3
assert effect.expires_phase == 1