Tests follow the allocator: warm-up, free thruster power, heat-detuned drives
The allocator reads Item.Active every tick, so fixtures that fire a thruster on their first update warm its performance first; flight fixtures take the thrusters' energy draw to zero so a brownout does not scale the turn; the Duel drives are mismatched after they heat apart, and degraded by heat (the Large Drive has no durability term); the consumer sits at (2,1), the Skiff's interior centre column. ReachIsWhatTheShipCanDo's Longinus ceiling is 1.3 (measured 1.195 nose-on, 1.249 broadside). Previous test commits do not build or pass; this one is unverified until the full run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ffda2a8a76
commit
ab450e72d3
7 changed files with 32 additions and 9 deletions
|
|
@ -43,10 +43,11 @@ public sealed partial class RunStartTests
|
|||
{
|
||||
var (_, player) = AllocDuel();
|
||||
var drives = AllocDrives(player);
|
||||
Assert.True(drives.Length >= 2 && drives[^1].NominalThrust > drives[0].NominalThrust * 1.05f, "fixture: the drives are mismatched");
|
||||
player.MovementDirection = float2(0, 1);
|
||||
player.Turn = 0;
|
||||
Assert.True(abs(AllocFly(player, 120)) < .1f);
|
||||
// The drives start alike and heat apart as they fire: by now they are mismatched and both pushing.
|
||||
Assert.True(drives.Length >= 2 && drives[^1].NominalThrust > drives[0].NominalThrust * 1.05f, "fixture: the drives are mismatched");
|
||||
Assert.All(drives, d => Assert.True(d.Axis > .5f, "fixture: the drives are pushing"));
|
||||
}
|
||||
|
||||
|
|
@ -88,11 +89,12 @@ public sealed partial class RunStartTests
|
|||
player.Turn = 0;
|
||||
Assert.True(abs(AllocFly(player, 30)) < .1f);
|
||||
|
||||
// The drive is heated a little off its plateau: its live thrust moves, and a column cached before would not.
|
||||
var weakened = drives[^1];
|
||||
var before = weakened.Thrust;
|
||||
weakened.Item.EquippableItem.Durability *= .5f;
|
||||
foreach (var cell in weakened.Item.InsetShape.Coordinates) player.Temperature[cell.x, cell.y] += 5f;
|
||||
weakened.Item.UpdatePerformance();
|
||||
Assert.True(weakened.Thrust < before * .95f, "fixture: halving durability weakens the drive");
|
||||
Assert.True(weakened.Thrust < before * .95f && weakened.Item.Active.Value, "fixture: the heated drive pushes measurably less");
|
||||
Assert.True(abs(AllocFly(player, 60)) < .1f);
|
||||
}
|
||||
|
||||
|
|
@ -100,6 +102,7 @@ public sealed partial class RunStartTests
|
|||
public void ATinyImbalanceStillHolds()
|
||||
{
|
||||
using var cache = RestoredHullsTests.OpenCatalog();
|
||||
RestoredHullsTests.FreeThrusterPower(cache);
|
||||
var ship = RestoredHullsTests.BuildThrustedShip(cache, "Longinus");
|
||||
var drives = AllocDrives(ship);
|
||||
Assert.True(drives.Length >= 2);
|
||||
|
|
|
|||
Loading…
Reference in a new issue