neon-sprawl/server/NeonSprawl.Server/Game/Skills/SkillLevelCurvePlaceholder.cs

17 lines
566 B
C#

namespace NeonSprawl.Server.Game.Skills;
/// <summary>
/// Inline level curve replaced by content-driven thresholds in NEO-39. Rule (v1): <c>level = 1 + floor(xp / 100)</c> for non-negative XP (uncapped prototype).
/// </summary>
public static class SkillLevelCurvePlaceholder
{
internal const int XpPerLevelStep = 100;
/// <summary>Returns skill level (&gt;= 1) for the given total accumulated XP.</summary>
public static int LevelFromTotalXp(int totalXp)
{
var xp = Math.Max(0, totalXp);
return 1 + (xp / XpPerLevelStep);
}
}