Skip to main content

✅ Gamigin fused bottom bypasses def

CategoryAbility
StatusPassing
Testtests/test_abilities_complex.py::TestGamiginFusedBottomProjects::test_gamigin_fused_bottom_bypasses_def

Flauros (top) fused with Gamigin (bottom). Fused demon deals

Preconditions

  • Lane 0: P1's fused demon — Flauros (#013, PWR=2) top, Gamigin (#031) bottom

  • Effective PWR = 2 + 4 (Gamigin fPWR) = 6

  • Lane 0: P2's Duban (#001, HP=6, +5 DEF passive)

Action

  • deal_damage(state, fused, Duban, 6)

  • gamigin_uses_fixed returns True because fused_bottom contains "031"

  • Damage routes through deal_fixed_damage → DEF bypassed

from engine.operations import deal_damage
from engine.abilities_passive import gamigin_uses_fixed

fused = make_fused_demon("013", "031", lane=0, owner=Side.PLAYER_1)
duban = make_demon("001", lane=0, owner=Side.PLAYER_2)

state, placed = _make_state_with_demons(fused, duban)
fused_p, duban_p = placed

# Sanity: gamigin_uses_fixed recognizes the fused-bottom orientation

Expected Postconditions

  • Duban: 6 damage (not 1 — Gamigin's passive projected through fusion)

Assertions

assert gamigin_uses_fixed(fused_p) is True, (
"gamigin_uses_fixed must return True when '031' is in fused_bottom."
)

result = deal_damage(state, fused_p, duban_p, 6)

duban_after = next((d for d in result.demons if d.unit_id == "001"), None)
if duban_after is not None:
assert duban_after.damage == 6, (
f"Gamigin's fused-bottom passive must route damage as Fixed, "
f"bypassing Duban's +5 DEF. Expected 6, got {duban_after.damage}."
)