2026-10-13 19:13:59 +02:00
|
|
|
using static CultMath.math;
|
|
|
|
|
using static ItemRotation;
|
|
|
|
|
|
|
|
|
|
public sealed class LockOn : Scenario
|
|
|
|
|
{
|
|
|
|
|
public override string Name => "Lock On";
|
2026-10-21 19:01:43 +02:00
|
|
|
public override string Id => "lock-on";
|
2026-10-13 19:13:59 +02:00
|
|
|
public override string Brief => "A hostile closes from out of sight, finds you and locks. Verify: no warning at first; once it locks, one " +
|
|
|
|
|
"indicator appears toward it and tightens as the lock grows; break line of sight or range and it vanishes; " +
|
|
|
|
|
"your own ping shows no incoming paint on its side, only the lock does.";
|
2026-10-17 05:40:34 +02:00
|
|
|
public override uint Seed => 1;
|
2026-10-13 19:13:59 +02:00
|
|
|
public override bool Ambient => false;
|
|
|
|
|
|
2026-10-15 06:36:01 +02:00
|
|
|
// The hostile starts about 4000 m off, ahead and to port of the player, facing the player. At that range its passive
|
|
|
|
|
// sensors hold no track of the player (the test asks the sim's own PassiveInfo against the detection threshold). The
|
LockOn: the hostile is ordered to close on the player; the warning is measured against the poses it was stamped from
ScenarioStage.Approach(entity, target) states a piloted entity's task as a follow task on the target, passed through Zone.Admit to the flight as the member's baseline task; it replaces Patrol(entity, orbit) and the orbit index, and RunStart's post-admit circuit overwrite. LockOn stages at .6, the quality Crossing and the other RunStart scenarios use (its brief states none), not .8 picked by outcome.
The bearing check keeps well-law r4's intent (measure against the hostile's actual pose, not the staged line) but reads the poses of the tick before the paint was first seen, which is the tick it was stamped in, with a .05 deg limit for float error; the live-pose check at .5 deg spent its budget on the paint inbox's deliberate one-tick delay. LockOnHoldsUnderOnePercentOfEachStagedInput moves hostile x, y and quality by 1% each way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 00:51:33 +02:00
|
|
|
// hostile is ordered to close on the player, finds it and locks. The zone's pull carries it off the staged line, so the
|
|
|
|
|
// warning must point at where the hostile was when the paint was stamped, which the test checks against the poses of
|
|
|
|
|
// that tick. At Duel's 900 m (and at 600 m) it sees and locks within a second.
|
2026-10-15 06:36:01 +02:00
|
|
|
public static readonly CultMath.float2 HostileAt = float2(-2000, 3450);
|
2026-10-13 19:13:59 +02:00
|
|
|
|
LockOn: the hostile is ordered to close on the player; the warning is measured against the poses it was stamped from
ScenarioStage.Approach(entity, target) states a piloted entity's task as a follow task on the target, passed through Zone.Admit to the flight as the member's baseline task; it replaces Patrol(entity, orbit) and the orbit index, and RunStart's post-admit circuit overwrite. LockOn stages at .6, the quality Crossing and the other RunStart scenarios use (its brief states none), not .8 picked by outcome.
The bearing check keeps well-law r4's intent (measure against the hostile's actual pose, not the staged line) but reads the poses of the tick before the paint was first seen, which is the tick it was stamped in, with a .05 deg limit for float error; the live-pose check at .5 deg spent its budget on the paint inbox's deliberate one-tick delay. LockOnHoldsUnderOnePercentOfEachStagedInput moves hostile x, y and quality by 1% each way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 00:51:33 +02:00
|
|
|
// The fit's lots are minted at this quality, the one Crossing and the other RunStart scenarios stage (the brief states no
|
|
|
|
|
// other), and the hostile's order is to close on the player, so the lock follows from the staged situation and not
|
|
|
|
|
// from item draws or the pilot's drawn circuit (ruling scenario-stages-hostile-task).
|
|
|
|
|
const float StagedQuality = .6f;
|
|
|
|
|
|
|
|
|
|
private readonly CultMath.float2 _hostileAt;
|
|
|
|
|
private readonly float _quality;
|
|
|
|
|
|
|
|
|
|
public LockOn() : this(HostileAt, StagedQuality) { }
|
|
|
|
|
|
|
|
|
|
// The staged inputs, open to a test that moves each a little and asks that the scenario still hold.
|
|
|
|
|
internal LockOn(CultMath.float2 hostileAt, float quality)
|
|
|
|
|
{
|
|
|
|
|
_hostileAt = hostileAt;
|
|
|
|
|
_quality = quality;
|
|
|
|
|
}
|
2026-10-17 21:28:35 +02:00
|
|
|
|
Retire the prelude and the tutorial: the cast, the scenario and the save own what they bundled
Galaxy.IsPrelude, SavedGame.IsTutorial (key 11 retired), TutorialGalaxy, TutorialGenerationSettings, its Settings.asset block and the
dead GalaxyStage/Galaxy constructor parameters (PlayerSettings, narrative directory) are gone. The rules they bundled move to their
owners: GalaxyCast.InfluenceScale (demo and test cast .5, main 1) carried by Galaxy and saved as SavedGame key 17, so a pre-cut run is
refused at Continue with a message; Scenario.EntranceStation (MainGalaxy false) decides the forced entrance station instead of the
galaxy; GalaxyStage.Cast(cast) replaces Prelude. The six arenas that read the authored cast generate DemoTerminus.Cast; Development
lists only Main Galaxy. TutorialBackgroundSettings is renamed CastBackgroundSettings in the asset YAML. Tests build their galaxy from
TestCasts.Wide and Background, the retired block's values, so every test galaxy is unchanged.
Suite at 8b2d1f544: 4 red (font credits, chunk info, trojan swarm, two-ai digest, Windows). After: the same 4, digest unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-19 20:14:26 +01:00
|
|
|
public override Galaxy Generate(GalaxyStage stage) => stage.Cast(DemoTerminus.Cast);
|
2026-10-13 19:13:59 +02:00
|
|
|
|
|
|
|
|
public override void Stage(ScenarioStage stage)
|
|
|
|
|
{
|
LockOn: the hostile is ordered to close on the player; the warning is measured against the poses it was stamped from
ScenarioStage.Approach(entity, target) states a piloted entity's task as a follow task on the target, passed through Zone.Admit to the flight as the member's baseline task; it replaces Patrol(entity, orbit) and the orbit index, and RunStart's post-admit circuit overwrite. LockOn stages at .6, the quality Crossing and the other RunStart scenarios use (its brief states none), not .8 picked by outcome.
The bearing check keeps well-law r4's intent (measure against the hostile's actual pose, not the staged line) but reads the poses of the tick before the paint was first seen, which is the tick it was stamped in, with a .05 deg limit for float error; the live-pose check at .5 deg spent its budget on the paint inbox's deliberate one-tick delay. LockOnHoldsUnderOnePercentOfEachStagedInput moves hostile x, y and quality by 1% each way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 00:51:33 +02:00
|
|
|
var fighter = stage.Fit("Longinus", _quality,
|
2026-10-13 19:13:59 +02:00
|
|
|
("Cockpit 2x2", int2(2, 6), None),
|
|
|
|
|
("Large Drive", int2(1, 0), Reversed),
|
|
|
|
|
("Large Drive", int2(3, 0), Reversed),
|
2026-10-14 01:51:55 +02:00
|
|
|
("Rugged Drive", int2(2, 14), CounterClockwise),
|
|
|
|
|
("Rugged Drive", int2(3, 14), Clockwise),
|
|
|
|
|
("Compact Reactor", int2(2, 4), None),
|
2026-10-16 22:10:58 +02:00
|
|
|
("GT 3K", int2(0, 5), None), // Guided Missile Launcher
|
|
|
|
|
("GT 3K", int2(5, 5), None), // Guided Missile Launcher
|
|
|
|
|
("FastBlast+-", int2(1, 8), None), // Cell Blaster
|
|
|
|
|
("FastBlast+-", int2(4, 8), None), // Cell Blaster
|
2026-10-14 01:51:55 +02:00
|
|
|
("Radiator", int2(2, 2), CounterClockwise),
|
|
|
|
|
("Radiator", int2(3, 2), Clockwise),
|
2026-10-16 22:10:58 +02:00
|
|
|
("not if i see you first", int2(3, 10), None), // Compact Sensor
|
2026-10-14 01:51:55 +02:00
|
|
|
("Capacitor", int2(1, 5), None),
|
2026-10-16 22:10:58 +02:00
|
|
|
("Panopticon Prime", int2(1, 6), Clockwise), // Fire Control Array
|
|
|
|
|
("Store-All Plus", int2(2, 8), None)); // Cargo Bay
|
2026-10-13 19:13:59 +02:00
|
|
|
|
LockOn: the hostile is ordered to close on the player; the warning is measured against the poses it was stamped from
ScenarioStage.Approach(entity, target) states a piloted entity's task as a follow task on the target, passed through Zone.Admit to the flight as the member's baseline task; it replaces Patrol(entity, orbit) and the orbit index, and RunStart's post-admit circuit overwrite. LockOn stages at .6, the quality Crossing and the other RunStart scenarios use (its brief states none), not .8 picked by outcome.
The bearing check keeps well-law r4's intent (measure against the hostile's actual pose, not the staged line) but reads the poses of the tick before the paint was first seen, which is the tick it was stamped in, with a .05 deg limit for float error; the live-pose check at .5 deg spent its budget on the paint inbox's deliberate one-tick delay. LockOnHoldsUnderOnePercentOfEachStagedInput moves hostile x, y and quality by 1% each way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 00:51:33 +02:00
|
|
|
var player = stage.Player(fighter, float2(0, 0), facing: float2(0, 1));
|
|
|
|
|
var hostile = stage.Place(fighter, _hostileAt, facing: normalize(-_hostileAt), stance: ScenarioStance.Hostile, piloted: true);
|
|
|
|
|
stage.Approach(hostile, player);
|
2026-10-13 19:13:59 +02:00
|
|
|
}
|
|
|
|
|
}
|