A Scenario is an abstract C# class compiled with the game: Generate picks the galaxy through GalaxyStage (Main or Prelude, at the scenario's seed, the background noise drawn from the same seed), Stage places the run's first entities through ScenarioStage (Fit, Bare, Generated, Preset, Player, Place, Cargo), which collects named failures and admits nothing. RunStart generates the galaxy, the arena under Ambient and admits everything through Zone.Admit, all or nothing. The aetheria.scenario record, ScenarioShip, ScenarioEntity, RunStart.Check and the null-scenario branch are cut. New Game opens a submenu: Tutorial Galaxy and Main Galaxy, then (editor and development builds) Djinni Shakedown, Starved Reactor, Arcs, Duel, Launcher Angles and Long Haul, each with its brief. MainMenu.Launch is the one way into a new run; ActionGameManager.PendingScenario carries the scenario to StartGame once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.4 KiB
C#
31 lines
1.4 KiB
C#
// A scenario is one way to set up a new run (docs/scenarios-cut.md, R): a script, compiled with the game, that says
|
|
// which galaxy to generate and what the run starts with. New Game lists them (Scenarios). RunStart runs one: it
|
|
// generates the galaxy through GalaxyStage, the arena under Ambient, and admits what Stage placed through a
|
|
// ScenarioStage. A scenario only declares; once staged, everything it placed is ordinary run state.
|
|
public abstract class Scenario
|
|
{
|
|
public abstract string Name { get; }
|
|
|
|
// The conditions and what to verify in them, shown under the scenario's button.
|
|
public abstract string Brief { get; }
|
|
|
|
// Zero draws the seed from the clock, so each launch is a new galaxy. Anything else fixes the galaxy, its
|
|
// background and its arena, so every launch has the same layout.
|
|
public virtual uint Seed => 0;
|
|
|
|
// False: the arena keeps its planets, orbits and stations but generates no ship or turret, so nothing wanders into
|
|
// the scenario's conditions.
|
|
public virtual bool Ambient => true;
|
|
|
|
// Which galaxy the run is in: stage.Main() or stage.Prelude().
|
|
public abstract Galaxy Generate(GalaxyStage stage);
|
|
|
|
// What the run starts with: exactly one stage.Player, and anything else the scenario places.
|
|
public abstract void Stage(ScenarioStage stage);
|
|
}
|
|
|
|
public enum ScenarioStance
|
|
{
|
|
Neutral,
|
|
Hostile
|
|
}
|