✅ Taurus applies def buff after local demon takes damage
| Category | Ability |
| Status | Passing |
| Test | tests/test_abilities_passive.py::test_taurus_applies_def_buff_after_local_demon_takes_damage |
After a local demon takes ≥1 damage, Taurus applies +2 DEF status.
Preconditions
-
Lane 0: P1's Taurus (#052) — READIED
-
Lane 0: P2's Duban (#001) — READIED, 0 damage
-
No status effects
Action
- Fire DAMAGE_RECEIVED event: target=Duban, value=3 (effective damage)
from engine.events import GameEvent, EventType, fire_event
from engine.operations import get_effective_def
state = make_game_state()
taurus = make_demon("052", lane=0, owner=Side.PLAYER_1)
duban = make_demon("001", lane=0, owner=Side.PLAYER_2)
state = place_demon(state, taurus)
state = place_demon(state, duban)
taurus_on_field = next(d for d in state.demons if d.unit_id == "052")
duban_on_field = next(d for d in state.demons if d.unit_id == "001")
event = GameEvent(
event_type=EventType.DAMAGE_RECEIVED,
source=taurus_on_field,
target=duban_on_field,
value=3, # effective damage ≥ 1
side=Side.PLAYER_2,
lane=0,
)
new_state = fire_event(state, event)
duban_after = next(d for d in new_state.demons if d.unit_id == "001")
result = get_effective_def(new_state, duban_after)
Expected Postconditions
-
Duban has +2 DEF status (expires end of current phase)
-
Duban effective DEF = 5 (passive) + 2 (Taurus status) = 7
Assertions
assert result == 7, (
f"Expected Duban DEF=7 (5 passive + 2 Taurus status), got {result}"
)