✅ Familiar status effect expires end of phase
| Category | Regression |
| Status | Passing |
| Test | tests/test_abilities_familiars.py::test_familiar_status_effect_expires_end_of_phase |
Regression: Status effects expire at end of current main phase (confusion #1).
Preconditions
-
Lane 0: P1's Beelzebub (058) — has +2 PWR status applied by Locust Gluttony.
-
phase_counter = 3 (status expires at phase 3).
Action
- Increment phase_counter to 4 and call expire_status_effects.
from engine.status_effects import expire_status_effects
state = make_game_state()
state.phase_counter = 3
bee = make_demon("058", lane=0, owner=Side.PLAYER_1)
state = place_demon(state, bee)
bee = state.demons[-1]
# Apply +2 PWR status (expires at phase 3)
locust_ref = make_familiar_demon("058_1", lane=0, owner=Side.PLAYER_1)
state = place_demon(state, locust_ref)
locust_ref = state.demons[-1]
state = apply_status(state, locust_ref, bee, "pwr", 2)
# Verify status is active
pwr_mod_before = get_stat_modifier(state, bee, "pwr")
Expected Postconditions
-
Beelzebub no longer has +2 PWR status.
-
get_stat_modifier for "pwr" returns 0.
Assertions
assert pwr_mod_before == 2, "Status should be active during phase 3."
# Advance phase counter and expire
state.phase_counter = 4
state_after = expire_status_effects(state)
bee_after = next(d for d in state_after.demons if d.unit_id == "058")
pwr_mod_after = get_stat_modifier(state_after, bee_after, "pwr")
assert pwr_mod_after == 0, (
f"Status should expire after phase ends. "
f"Got {pwr_mod_after} (should be 0). Regression: confusion #1."
)