initial commit
All checks were successful
CI / build (push) Successful in 32s
CI / release (push) Successful in 32s
CI / lint (push) Successful in 30s

This commit is contained in:
Kamal Tufekcic 2026-07-05 13:28:35 +03:00
commit d701598350
67 changed files with 9351 additions and 0 deletions

View file

@ -0,0 +1,16 @@
using Outnumbered.Config;
namespace Outnumbered.Domain;
// XP/level/prestige curves (pure). The stateful level-up loop + its side effects (chat/sound/clan) stay engine-side;
// this owns only the formulas it walks.
public static class ProgressionModel
{
// XP required to go from `level` to `level+1`. LevelXpExponent shapes the curve (1 = linear, >1 = accelerating).
public static long XpToNext(int level, ProgressionConfig c) =>
c.LevelXpBase + (long)Math.Round(c.LevelXpStep * Math.Pow(Math.Max(0, level - 1), c.LevelXpExponent));
// Cumulative prestige XP boost (prestige never lowers difficulty; it only speeds the climb).
public static double PrestigeXpMultiplier(int prestige, ProgressionConfig c) =>
1.0 + prestige * (c.PrestigeXpBoostPercent / 100.0);
}