✅ Resonance damage scales with local enemy count
| Category | Interaction |
| Status | Passing |
| Test | tests/test_abilities_complex.py::TestSitriResonance::test_resonance_damage_scales_with_local_enemy_count |
NEW (patched): Resonance target scope tightened — now hits only
Preconditions
-
P1 Main Phase, P1 has 5 AP
-
Lane 0: P1's Sitri (#092), READIED
-
Lane 0: P1's Murmur (#002) ← allied — NOT hit, NOT counted
-
Lane 0: P2's Duban (#001) ← enemy 1
-
Lane 0: P2's Azazel (#011) ← enemy 2
-
X = 2 (two local enemies)
Action
-
Sitri uses Resonance (3 AP, exhaust)
-
Each of the 2 enemies takes 2×2 = 4 Fixed Damage
-
Murmur (ally) takes no damage
from engine.abilities import execute_ability
result = execute_ability(state, sitri_p, ability_idx=0)
murmur_after = next(d for d in result.demons if d.unit_id == "002")
duban_after = next(d for d in result.demons if d.unit_id == "001")
azazel_after = next(d for d in result.demons if d.unit_id == "011")
sitri_after = next(d for d in result.demons if d.unit_id == "092")
Expected Postconditions
-
Murmur: 0 damage (ally — excluded)
-
Duban: 4 damage
-
Azazel: 4 damage
-
Sitri: EXHAUSTED, 0 damage
-
P1 AP: 2 (5 - 3)
Assertions
assert murmur_after.damage == 0, (
f"Allied Murmur must NOT be hit (Local Enemy only). Got {murmur_after.damage}."
)
assert duban_after.damage == 4, f"X=2: 2×2=4 damage. Got {duban_after.damage}."
assert azazel_after.damage == 4, f"X=2: 2×2=4 damage. Got {azazel_after.damage}."
assert sitri_after.damage == 0, "Sitri excludes itself"
assert sitri_after.state == DemonState.EXHAUSTED