From d88f72144a99b726025da24f4f45793518c9b4b9 Mon Sep 17 00:00:00 2001 From: Jan Popanda Date: Fri, 11 Jul 2025 11:32:00 +0200 Subject: [PATCH] ExperienceRequiredForLevel optimization --- .../VanillaPsycastsExpanded/Hediff_PsycastAbilities.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/1.6/Source/VanillaPsycastsExpanded/Hediff_PsycastAbilities.cs b/1.6/Source/VanillaPsycastsExpanded/Hediff_PsycastAbilities.cs index 4d7fdd4..9d92e63 100644 --- a/1.6/Source/VanillaPsycastsExpanded/Hediff_PsycastAbilities.cs +++ b/1.6/Source/VanillaPsycastsExpanded/Hediff_PsycastAbilities.cs @@ -247,9 +247,9 @@ public static int ExperienceRequiredForLevel(int level) => level switch { <= 1 => 100, - <= 20 => Mathf.RoundToInt(ExperienceRequiredForLevel(level - 1) * 1.15f), - <= 30 => Mathf.RoundToInt(ExperienceRequiredForLevel(level - 1) * 1.10f), - _ => Mathf.RoundToInt(ExperienceRequiredForLevel(level - 1) * 1.05f) + <= 20 => Mathf.RoundToInt(100 * Mathf.Pow(1.15f, level - 1)), + <= 30 => Mathf.RoundToInt(1636 * Mathf.Pow(1.10f, level - 20)), + _ => Mathf.RoundToInt(4243 * Mathf.Pow(1.05f, level - 30)) }; public override void GiveRandomAbilityAtLevel(int? forLevel = null) { }