initial commit
This commit is contained in:
commit
d701598350
67 changed files with 9351 additions and 0 deletions
16
Outnumbered/Domain/ProgressionModel.cs
Normal file
16
Outnumbered/Domain/ProgressionModel.cs
Normal 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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue