Journey encounters and 360 camera, Ludus training ground, offline gold fix, new music, settings layout, grounded KO, thraex shield, arena name chant

Stand von main 9c35eff2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 10:47:49 +01:00
parent 0454683fc3
commit c516679674
26 changed files with 856 additions and 151 deletions

View File

@@ -15,6 +15,14 @@ namespace GladiatorIdle
/// Tägliches Training: Grund-XP/s plus dieser Anteil der gesamten Ausbilder-Leistung,
/// fest verteilt (Stärke, Ausdauer, Geschick, Showtalent) – wächst mit den Ausbildern mit.
// ── Training im Ludus (aktiv): Energie, XP je gelungener Aktion ──
public const int TRAIN_ENERGY_MAX = 5;
public const double TRAIN_ENERGY_SECONDS = 12 * 60; // eine neue Einheit
public const double TRAIN_TIME = 30; // Sekunden je Übung
/// Anteil einer Stufe je gelungener Aktion (ohne Ausbilder); ~20 Aktionen je Übung.
public const double TRAIN_LEVEL_PER_ACTION = 0.06;
public const double TRAIN_TRAINER_BONUS = 0.12; // +12 % je Ausbilder-Stufe
public const double EXPEDITION_GOLD = 0.45; // Denare der Expedition (Anteil der Siege)
public const double DRILL_BASE = 1.0;
public const double DRILL_TRAINER_SHARE = 0.6;
public static readonly double[] DRILL_SPLIT = { 0.3, 0.3, 0.2, 0.2 };

View File

@@ -341,9 +341,30 @@ namespace GladiatorIdle
return (Balance.DRILL_BASE * XpMult(s) + Balance.DRILL_TRAINER_SHARE * trainers) * Balance.DRILL_SPLIT[(int)s];
}
/// Gesamt-XP/s eines Werts (Ausbilder + Training).
/// Gesamt-XP/s eines Werts (früheres passives Training; nur noch Anzeige/Bot-Vergleich).
public double XpPerSec(Stat s) => TrainerXpPerSec(s) + DrillXpPerSec(s);
// ── Training im Ludus (aktiv) ───────────────────────────────
/// Trainingsenergie (0 … 5), eine Einheit je Übung, füllt sich mit der Zeit (auch offline).
public double TrainEnergy { get; private set; } = Balance.TRAIN_ENERGY_MAX;
public bool CanTrain => TrainEnergy >= 1 && Away == null;
/// Sekunden bis zur nächsten vollen Einheit (0 = voll).
public double TrainEnergyNextIn => TrainEnergy >= Balance.TRAIN_ENERGY_MAX ? 0 : (1 - TrainEnergy % 1) * Balance.TRAIN_ENERGY_SECONDS;
public double TrainFactor(Stat s) => (1 + Balance.TRAIN_TRAINER_BONUS * UpgradeLevel(UpgradeDef.TrainerFor(s).Id)) * XpMult(s);
/// XP je gelungener Aktion für diesen Wert (wächst mit der Stufe, den Ausbildern und Boni).
public double TrainXpPerAction(Stat s) => Balance.XpToNext(Level(s)) * Balance.TRAIN_LEVEL_PER_ACTION * TrainFactor(s);
/// Übung abgeschlossen: Energie verbrauchen, XP gutschreiben. Liefert die XP.
public double Train(Stat s, int actions)
{
if (TrainEnergy < 1) return 0;
TrainEnergy -= 1;
double xp = 0;
for (int i = 0; i < actions; i++) { double x = TrainXpPerAction(s); AddXp(s, x); xp += x; }
return xp;
}
public double XpToNext(Stat s) => Balance.XpToNext(Level(s));
public Combatant PlayerCombat()
@@ -377,11 +398,7 @@ namespace GladiatorIdle
{
RunSeconds += dt;
Crowd = Math.Max(0, Crowd - Balance.CROWD_DECAY * Gods.CrowdDecayMult(GodLevel(God.Bacchus)) * dt);
for (int i = 0; i < 4; i++)
{
double r = XpPerSec((Stat)i);
if (r > 0) AddXp((Stat)i, r * dt);
}
TrainEnergy = Math.Min(Balance.TRAIN_ENERGY_MAX, TrainEnergy + dt / Balance.TRAIN_ENERGY_SECONDS);
Recovery = Math.Max(0, Recovery - dt);
for (int i = Buffs.Count - 1; i >= 0; i--)
if ((Buffs[i].Left -= dt) <= 0) Buffs.RemoveAt(i);
@@ -486,7 +503,7 @@ namespace GladiatorIdle
var rep = new ExpeditionReport
{
Region = a.Region, Success = ok,
Gold = Balance.GoldPerWin(r.Tier) * GoldMult * fights * 0.9 * share,
Gold = Balance.GoldPerWin(r.Tier) * GoldMult * fights * Balance.EXPEDITION_GOLD * share,
Fame = Balance.FamePerWin(r.Tier) * FameMult * fights * 0.5 * share,
Xp = Balance.CharXpPerWin(r.Tier) * fights * 0.8 * share,
};
@@ -710,11 +727,12 @@ namespace GladiatorIdle
seconds = Math.Clamp(seconds, 0, OfflineCapSeconds);
double gold = GoldEarnedRun, fame = FameRun;
int wins = Wins, losses = Losses, levels = StatLevels.Sum();
bool collect = CollectEvents;
CollectEvents = false;
for (double t = 0; t < seconds; t += Balance.OFFLINE_STEP)
Tick(Math.Min(Balance.OFFLINE_STEP, seconds - t));
CollectEvents = collect;
// nur Zeit läuft weiter: Reise, Erholung, Trainingsenergie – kein Training, keine Kämpfe
TrainEnergy = Math.Min(Balance.TRAIN_ENERGY_MAX, TrainEnergy + seconds / Balance.TRAIN_ENERGY_SECONDS);
Recovery = Math.Max(0, Recovery - seconds);
for (int i = Buffs.Count - 1; i >= 0; i--)
if ((Buffs[i].Left -= seconds) <= 0) Buffs.RemoveAt(i);
if (Away != null && (Away.Left -= seconds) <= 0) FinishExpedition();
return new OfflineReport(seconds, GoldEarnedRun - gold, FameRun - fame, Wins - wins, Losses - losses,
StatLevels.Sum() - levels);
}
@@ -768,6 +786,8 @@ namespace GladiatorIdle
public List<Item> Inventory { get; set; } = new();
public long NextItemId { get; set; } = 1;
public Expedition? Away { get; set; }
public double TrainEnergy { get; set; } = Balance.TRAIN_ENERGY_MAX;
public Dictionary<string, double>? GoldBySource { get; set; }
public ExpeditionReport? ExpeditionResult { get; set; }
public string? PendingEvent { get; set; }
public double EventIn { get; set; } = Adventures.EVENT_MIN;
@@ -788,7 +808,7 @@ namespace GladiatorIdle
Equipped = Equipped, SlotLevels = SlotLevels, Inventory = Inventory,
NextItemId = _nextItemId,
Away = Away, ExpeditionResult = ExpeditionResult, PendingEvent = PendingEvent, EventIn = EventIn, Buffs = Buffs,
SkillRanks = SkillRanks
SkillRanks = SkillRanks, TrainEnergy = TrainEnergy, GoldBySource = GoldBySource
};
public static GameState FromSave(SaveData d, int? seed = null)
@@ -806,6 +826,8 @@ namespace GladiatorIdle
FreedomEarned = d.FreedomEarned, Wins = d.Wins, Losses = d.Losses, RunSeconds = d.RunSeconds
};
g._pendingInherit = d.PendingInherit;
g.TrainEnergy = Math.Clamp(d.TrainEnergy, 0, Balance.TRAIN_ENERGY_MAX);
if (d.GoldBySource != null) foreach (var kv in d.GoldBySource) g.GoldBySource[kv.Key] = kv.Value;
g.CharLevel = d.CharLevel; g.CharXp = d.CharXp; g.AttrPoints = d.AttrPoints; g.StatBonus = Fit(d.StatBonus, 4);
g.Equipped = Fit(d.Equipped, 5);
g.SlotLevels = Fit(d.SlotLevels, 5);

View File

@@ -55,6 +55,14 @@ namespace GladiatorIdle
{
ManageGear(gs);
BuyCheapest(gs);
// Ludus-Training: schwächsten Wert üben (Aktionen je nach Geschick)
if (gs.CanTrain)
{
var weakest = (Stat)Enumerable.Range(0, 4).OrderBy(i => gs.StatLevels[i]).First();
gs.Train(weakest, (int)(12 + 16 * skill));
Pass(Balance.TRAIN_TIME + 10);
continue;
}
if (gs.PendingEvent != null) gs.Choose(0);
if (!gs.CanFight) { Pass(5); continue; } // Erholung abwarten