Bestenliste, Expeditionen, Ereignisse, Dreizack und Netz, aufrechte Schilde, dunkle Haut
Stand von main 82292b5c. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,10 +29,13 @@ namespace GladiatorIdle
|
||||
DuelScene? _scene;
|
||||
ModelTestScene? _model; // --model3d: 3D-Test
|
||||
FreedomScene? _freedom; // Freiheit: Clip, Bilanz, Götter
|
||||
LeaderboardScene? _board; // Bestenliste (aus dem Menü)
|
||||
bool _nextLife; // nächste Erstellung behält das Profil (Legenden, Götter)
|
||||
Legend? _legend; // laufendes Duell gegen eine Legende
|
||||
static readonly bool DevFreedomRun = Array.IndexOf(Environment.GetCommandLineArgs(), "--freedom") >= 0;
|
||||
static readonly bool DevChampionRun = Array.IndexOf(Environment.GetCommandLineArgs(), "--champion") >= 0;
|
||||
static readonly bool DevAdventureRun = Array.IndexOf(Environment.GetCommandLineArgs(), "--adventure") >= 0;
|
||||
static readonly bool DevBoardRun = Array.IndexOf(Environment.GetCommandLineArgs(), "--leaderboard") >= 0;
|
||||
static readonly bool Model3DTest = Array.IndexOf(Environment.GetCommandLineArgs(), "--model3d") >= 0;
|
||||
SettingsOverlay _settings = null!;
|
||||
bool _paused;
|
||||
@@ -126,13 +129,13 @@ namespace GladiatorIdle
|
||||
|
||||
void ToMenu()
|
||||
{
|
||||
_hub = null; _scene = null; _creator = null; _intro = null; _freedom = null; _paused = false; _nextLife = false;
|
||||
_hub = null; _scene = null; _creator = null; _intro = null; _freedom = null; _board = null; _paused = false; _nextLife = false;
|
||||
_menu = new MenuScene(_game != null, _game?.Freedoms ?? 0);
|
||||
}
|
||||
|
||||
protected override void OnExiting(object sender, ExitingEventArgs args)
|
||||
{
|
||||
if (_game != null && _creator == null) _game.Save(); // Testläufe speichern nie (GameState.Save)
|
||||
if (_game != null && _creator == null) { _game.Save(); Net.Leaderboard.Submit(_game); } // Testläufe speichern und senden nie
|
||||
base.OnExiting(sender, args);
|
||||
}
|
||||
|
||||
@@ -166,6 +169,7 @@ namespace GladiatorIdle
|
||||
int favor = _game!.TakeFreedom();
|
||||
if (favor <= 0 && _game.Legends.Count == 0) return;
|
||||
_game.Save();
|
||||
Net.Leaderboard.Submit(_game);
|
||||
_hub = null; _scene = null; _paused = false;
|
||||
_freedom = new FreedomScene(_game, _game.Legends[^1], favor);
|
||||
_devTime = 0;
|
||||
@@ -215,6 +219,7 @@ namespace GladiatorIdle
|
||||
{
|
||||
_game!.ResolveFight(_offer!, won);
|
||||
_hub!.ShowResult(_hub.ResultLines(_before, won), won ? Gfx.Draw.Gold : Gfx.Draw.Red);
|
||||
if (won && _offer!.Enemy.IsChampion) Net.Leaderboard.Submit(_game);
|
||||
}
|
||||
SoundManager.StartAmbient("music_ludus");
|
||||
_scene = null;
|
||||
@@ -253,6 +258,12 @@ namespace GladiatorIdle
|
||||
if (input.Pressed(Keys.Escape)) Exit();
|
||||
if (DevShot.Active) DevModel(dt);
|
||||
}
|
||||
else if (_board != null)
|
||||
{
|
||||
_board.Update(dt, input, ui);
|
||||
if (DevShot.Active) DevBoard(dt);
|
||||
if (_board != null && _board.Done) ToMenu();
|
||||
}
|
||||
else if (_freedom != null)
|
||||
{
|
||||
_freedom.Update(dt, input, ui);
|
||||
@@ -284,6 +295,10 @@ namespace GladiatorIdle
|
||||
case MenuScene.Choice.Continue when _game != null: _menu = null; _hub = new HubScene(_game); break;
|
||||
case MenuScene.Choice.New: _menu = null; _creator = new CreatorScene(DevShot.Active ? DevShot.Name : L.t("gladiator.defaultname")); break;
|
||||
case MenuScene.Choice.Intro: _menu = null; _intro = new IntroScene(); break;
|
||||
case MenuScene.Choice.Leaderboard:
|
||||
_menu = null; _board = new LeaderboardScene(_game);
|
||||
if (DevShot.Active) _board.DevSample(_game);
|
||||
break;
|
||||
case MenuScene.Choice.Settings: _menu.Picked = MenuScene.Choice.None; _settings.Open = true; break;
|
||||
case MenuScene.Choice.Quit: Exit(); break;
|
||||
}
|
||||
@@ -360,6 +375,7 @@ namespace GladiatorIdle
|
||||
if (_devTime > 1.9) Shot("c_settings");
|
||||
if (_devTime > 2.3 && _capture == null && _settings.Open) _settings.Open = false;
|
||||
if (_devTime > 2.5 && _capture == null && DevShot.Full && !_shots.Contains("i_intro")) { _shots.Add("i_intro"); _menu = null; _intro = new IntroScene(); return; }
|
||||
if (DevBoardRun && _devTime > 1.2 && _capture == null && _menu != null) { _menu.Picked = MenuScene.Choice.Leaderboard; _devTime = 0; return; }
|
||||
if (_devTime > 2.6 && _capture == null && _menu != null) { _menu.Picked = MenuScene.Choice.New; _devTime = 0; }
|
||||
}
|
||||
|
||||
@@ -412,6 +428,21 @@ namespace GladiatorIdle
|
||||
if (_devTime > 1.8 && _capture == null && _shots.Contains("h_hall")) { _hub!.DevOpen(0); _hub.ChosenLegend = _game.Legends[0]; _devTime = 0; }
|
||||
return;
|
||||
}
|
||||
if (DevAdventureRun)
|
||||
{
|
||||
// Expeditionen: Auswahl, unterwegs, Rückkehr-Bericht; dann ein Ereignis mit Entscheidung
|
||||
if (_devTime > 0.8 && !_shots.Contains("x_open")) { _shots.Add("x_open"); _hub!.DevOpen(6); }
|
||||
if (_devTime > 1.6) Shot("x_regions");
|
||||
if (_devTime > 1.9 && !_shots.Contains("x_go")) { _shots.Add("x_go"); _hub!.DevOpen(0); _game!.StartExpedition("gallia", 1); }
|
||||
if (_devTime > 2.6) Shot("x_away");
|
||||
if (_devTime > 2.9 && !_shots.Contains("x_back")) { _shots.Add("x_back"); _game!.Tick(Adventures.Durations[1] + 1); }
|
||||
if (_devTime > 3.6) Shot("x_report");
|
||||
if (_devTime > 3.9 && !_shots.Contains("x_event")) { _shots.Add("x_event"); _game!.DismissExpeditionResult(); _game.DevEvent("nightduel"); }
|
||||
if (_devTime > 4.6) Shot("x_eventcard");
|
||||
if (_devTime > 4.9 && !_shots.Contains("x_choose")) { _shots.Add("x_choose"); _game!.Choose(0); }
|
||||
if (_devTime > 5.3 && _capture == null && _shots.Contains("x_choose")) { DevShot.Log($"adventure: buffs={_game!.Buffs.Count} gold={_game.Gold:0}"); Exit(); }
|
||||
return;
|
||||
}
|
||||
if (DevChampionRun && !_shots.Contains("m_end"))
|
||||
{
|
||||
if (_devTime > 0.5 && _capture == null) { _hub!.Chosen = new Offer(_game!.ChampionEnemy, 1, OfferKind.Champion); _devTime = 0; }
|
||||
@@ -446,6 +477,18 @@ namespace GladiatorIdle
|
||||
}
|
||||
}
|
||||
|
||||
/// Testlauf --leaderboard: beide Wertungen aufnehmen (Beispieldaten), dann Ende.
|
||||
void DevBoard(float dt)
|
||||
{
|
||||
_devTime += dt;
|
||||
void Shot(string name) { if (_shots.Add(name)) _capture = name; }
|
||||
if (_devTime > 1.0) Shot("l_power");
|
||||
if (_devTime > 1.4 && _capture == null && _shots.Contains("l_power") && !_shots.Contains("l_tab"))
|
||||
{ _shots.Add("l_tab"); typeof(LeaderboardScene).GetField("_tab", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)!.SetValue(_board, 1); }
|
||||
if (_devTime > 2.0) Shot("l_fastest");
|
||||
if (_devTime > 2.4 && _capture == null && _shots.Contains("l_fastest")) Exit();
|
||||
}
|
||||
|
||||
/// Testlauf --freedom: Clip, Bilanz und Götter aufnehmen, dann weiter zum nächsten Leben.
|
||||
void DevFreedom(float dt)
|
||||
{
|
||||
@@ -533,6 +576,7 @@ namespace GladiatorIdle
|
||||
Gfx.Draw.UiScale = scale;
|
||||
if (_model != null) _model.Draw(gd, _sb, scale, offset);
|
||||
else if (_freedom != null) _freedom.Draw(gd, _sb, _fx, scale, offset);
|
||||
else if (_board != null) _board.Draw(_sb, scale, offset);
|
||||
else if (_intro != null) _intro.Draw(_sb, scale, offset);
|
||||
else if (_menu != null) _menu.Draw(_sb, scale, offset);
|
||||
else if (_creator != null) _creator.Draw(gd, _sb, _fx, scale, offset);
|
||||
|
||||
Reference in New Issue
Block a user