Fused Rounds: Fragile sits inside the DeathCluster's effective range; the AI test refreshes the gun's stats

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-14 03:57:58 +02:00
commit ac1a5d29ed
2 changed files with 5 additions and 3 deletions

View file

@ -17,9 +17,9 @@ public sealed class FusedRounds : Scenario
public override bool Ambient => false;
// Where everything sits: the player is at the origin facing +z. Ahead lies on the initial aim line, inside every forward
// mount's arc. Fragile is a bare Longinus inside the DeathCluster's range; Close is inside Smoke Proximity's blast radius
// mount's arc. Fragile is a bare Longinus inside the DeathCluster's effective range (full damage); Close is inside Smoke Proximity's blast radius
// (8 m from the ship's centre) and beside the aim line, not across it; Stern is outside every mount's arc.
public static readonly CultMath.float2 Mid = float2(-200, 600), Ahead = float2(0, 300), Fragile = float2(140, 420),
public static readonly CultMath.float2 Mid = float2(-200, 600), Ahead = float2(0, 300), Fragile = float2(90, 270),
Close = float2(6.4f, 4f), Stern = float2(0, -400);
public override Galaxy Generate(GalaxyStage stage) => stage.Prelude(DemoTerminus.Cast);

View file

@ -382,7 +382,9 @@ public sealed class FireControlTests : IDisposable
var agent = zone.Agents.Single();
var state = typeof(Agent).GetField("_currentState", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(agent);
Assert.True(state is CombatState, $"the agent is in {state?.GetType().Name}");
// The state sampled when the Minion was built, before any weapon stat was evaluated; sample again over the evaluated ones.
// The state sampled when the Minion was built, over the fixture's first stats; refresh the gun's stats from the data this
// test authored, then sample again.
typeof(Weapon).GetMethod("UpdateStats", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(shooter.Weapons.Single(), null);
typeof(CombatState).GetMethod("SampleDps", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(state, null);
var optimum = (float) typeof(CombatState).GetField("_optimumRange", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(state);
Assert.True(optimum >= 500f - 1000f / 32f && optimum <= 500f + 1000f / 32f, $"optimum range {optimum}");