3D-Arena (Duell, Hub, Freiheit, Erstellung, Bestenliste), Retiarius beidhändig, Waffen je Klasse, Einführung, Willkommen, weniger Reiter, Wirtschaft ohne Taberna, Kantenglättung, Leuchten, weiche Schatten, Gamepad, Absturz-Protokoll

Stand von main 20cd8ba2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 13:24:20 +01:00
parent a08764c505
commit e29db47b20
44 changed files with 2089 additions and 991 deletions

View File

@@ -23,7 +23,10 @@ namespace GladiatorIdle.Arena
static Color ChanceColor(double c) => c >= 0.75 ? D.Green : c >= 0.4 ? D.Gold : D.Red;
/// Ein Fenster liegt über dem Hub (Bericht oder Ereignis): darunter nichts anklickbar.
bool Modal => _game.ExpeditionResult != null || _game.PendingEvent != null || _eventShown != null;
bool Modal => Welcome != null || _game.ExpeditionResult != null || _game.PendingEvent != null || _eventShown != null;
/// Bericht über die Zeit, in der das Spiel zu war (ab 2 Minuten), als erstes Fenster.
public OfflineReport? Welcome { get; set; }
void UpdateAdventure()
{
@@ -121,10 +124,37 @@ namespace GladiatorIdle.Arena
void DrawModal(SpriteBatch sb)
{
D.Rect(sb, new RectangleF(0, 0, Camera.W, Camera.H), Color.Black * 0.65f);
if (_game.ExpeditionResult is { } rep) DrawReport(sb, rep);
if (Welcome is { } w) DrawWelcome(sb, w);
else if (_game.ExpeditionResult is { } rep) DrawReport(sb, rep);
else if (_eventShown != null || _game.PendingEvent != null) DrawEvent(sb);
}
void DrawWelcome(SpriteBatch sb, OfflineReport w)
{
var r = new RectangleF(Camera.W / 2 - 480, 200, 960, 640);
Ui.Panel(sb, r, D.Gold, 0.97f);
float y = r.Y + 70;
D.Text(sb, Assets.Serif, 52, L.t("offline.title"), new Vector2(r.Center.X, y), D.Gold, Align.Center);
y += 70;
D.Text(sb, Assets.Serif, 24, string.Format(L.t("offline.away"), NumberFormat.Duration(w.Seconds)), new Vector2(r.Center.X, y), D.Sand, Align.Center);
if (w.Seconds >= _game.OfflineCapSeconds - 1)
D.Text(sb, Assets.Sans, 17, string.Format(L.t("offline.capped"), NumberFormat.Duration(_game.OfflineCapSeconds)), new Vector2(r.Center.X, y + 34), D.Dim, Align.Center);
y += 90;
void Line(string label, string value, Color c)
{
D.Text(sb, Assets.Sans, 24, label, new Vector2(r.X + 160, y), D.Sand);
D.Text(sb, Assets.SansBold, 28, value, new Vector2(r.Right - 160, y), c, Align.Right);
D.Rect(sb, new RectangleF(r.X + 160, y + 26, r.Width - 320, 1), D.Border * 0.6f);
y += 62;
}
if (w.Gold > 0) Line(L.t("offline.gold"), "+" + NumberFormat.Format(w.Gold), D.Gold); // i18n-ok (nur von Expeditionen)
if (w.Fame > 0) Line(L.t("offline.fame"), "+" + NumberFormat.Format(w.Fame), D.Gold); // i18n-ok
Line(L.t("offline.levels"), "+" + w.LevelUps.ToString(NumberFormat.Culture), D.Green); // i18n-ok
if (w.Wins + w.Losses > 0) Line(L.t("offline.fights"), string.Format(L.t("offline.fights.value"), w.Wins, w.Losses), D.Sand);
if (_ui.Button(sb, new RectangleF(r.Center.X - 200, r.Bottom - 100, 400, 68), L.t("offline.ok"), selected: true, size: 26))
{ Welcome = null; SoundManager.PlayCoins(); }
}
void DrawReport(SpriteBatch sb, ExpeditionReport rep)
{
var reg = RegionDef.Get(rep.Region);