Demo pressure tests: pin InGrace's depth term directly
Where depth <= 0.25 the curve's own ramp already draws no raider, so only the antagonist's stations and turrets (moved away by grace) carried the depth term, and no generated zone near the antagonist's home reaches it. Assert InGrace for those zones so dropping the term fails. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
186cb5ebac
commit
8f3d23d386
1 changed files with 3 additions and 0 deletions
|
|
@ -177,6 +177,9 @@ public sealed partial class RunStartTests
|
|||
float e = galaxy.Entrance.Distance[zone], x = galaxy.Exit.Distance[zone];
|
||||
if (e < 2 || e / (e + x) > 0.25f) continue;
|
||||
graced++;
|
||||
// The depth term itself: where no hostile would be drawn anyway (the curve's own ramp is 0 there), grace is
|
||||
// what moves the antagonist's stations and turrets away, so it is asserted, not left to the generated zone.
|
||||
Assert.True(DemoPressure.InGrace(galaxy, zone), $"seed {seed} zone {Array.IndexOf(galaxy.Zones, zone)} (jump {e}, depth {e / (e + x):0.00}) is not in grace");
|
||||
var pack = ZoneGenerator.GenerateZone(_items, _zoneSettings, _planetSettings, galaxy, zone, DemoEntranceStation);
|
||||
var hostile = pack.Entities.Where(entity => IsHated(galaxy, entity.Faction)).Select(entity => entity.GetType().Name + ":" + _items.GetData(entity.Hull).Name).ToArray();
|
||||
Assert.True(hostile.Length == 0, $"seed {seed} zone {Array.IndexOf(galaxy.Zones, zone)} (jump {e}, depth {e / (e + x):0.00}): {string.Join(", ", hostile)}");
|
||||
|
|
|
|||
Loading…
Reference in a new issue