✅ Field aura activates when source readied and deactivates when conditions unmet
| Category | Ability |
| Status | Passing |
| Test | tests/test_abilities_passive.py::test_field_aura_activates_when_source_readied_and_deactivates_when_conditions_unmet |
Regression: Forneus's aura is conditional on its state. Test that the aura
Preconditions
-
Lane 0: P1's Forneus (#097) — initially READIED
-
Lane 0: P1's Duban (#001) — READIED (ally)
-
ACTION 1:
-
Query get_effective_pwr(state, duban) with Forneus READIED
-
ACTION 2:
-
Set Forneus to EXHAUSTED
-
Query get_effective_pwr(state, duban) with Forneus EXHAUSTED
-
POSTCONDITIONS (Action 1):
-
Duban PWR: 1 (3 base - 2 Forneus readied aura)
-
POSTCONDITIONS (Action 2):
-
Duban PWR: 5 (3 base + 2 Forneus exhausted Allied aura, because Duban is ally)
Action
See code below.
state = make_game_state()
forneus = make_demon("097", lane=0, owner=Side.PLAYER_1,
state=DemonState.READIED)
duban = make_demon("001", lane=0, owner=Side.PLAYER_1)
state = place_demon(state, forneus)
state = place_demon(state, duban)
forneus_on_field = next(d for d in state.demons if d.unit_id == "097")
duban_on_field = next(d for d in state.demons if d.unit_id == "001")
# Action 1: Forneus is READIED → -2 PWR aura active
pwr_readied = get_effective_pwr(state, duban_on_field)
Expected Postconditions
- See assertions below.
Assertions
assert pwr_readied == 1, f"Expected PWR=1 (Forneus readied), got {pwr_readied}"
# Set Forneus to EXHAUSTED
forneus_on_field.state = DemonState.EXHAUSTED
# Action 2: Forneus is EXHAUSTED → +2 PWR allied aura active (Duban is ally)
pwr_exhausted = get_effective_pwr(state, duban_on_field)
assert pwr_exhausted == 5, f"Expected PWR=5 (Forneus exhausted), got {pwr_exhausted}"