Tests: EB-1 structure damage/death, fortress targeting, persistence v3

10 new EditMode tests (312 total, all green): HealthApplyDamage destroys a Destructible at 0 + a wounded structure survives clamped; PickWeightedNearest x5 (player-only, structure-preferred-by-weight, player-in-the-way wins, raze undefended base, no targets); persistence (StructureSave.HP round-trip + writes v3, v2 in the load floor, SaveApply.ToPending maps the wounded HP - the staging-copy bug the pre-code review caught); + the StructureAggroWeight default pin. See DR-032.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-11 23:53:50 -07:00
parent 73cfe2943d
commit 66edbdec69
4 changed files with 139 additions and 0 deletions
@@ -34,6 +34,7 @@ namespace ProjectM.Tests
Assert.AreEqual(36f, d.ChargerWhiffStaggerTicks, 1e-6f, "ChargerWhiffStaggerTicks");
// GruntWindup must stay the canonical Tuning const (TelegraphTests couples to it).
Assert.AreEqual((float)Tuning.AttackWindupTicks, d.GruntWindupTicks, 1e-6f, "GruntWindupTicks == Tuning.AttackWindupTicks");
Assert.AreEqual(0.7f, d.StructureAggroWeight, 1e-6f, "EB-1 StructureAggroWeight default (<1 prefers structures)");
}
[Test]