From a53dc0f025fc4fb9b051b16734091f3760e87abb Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Tue, 24 Oct 2023 19:39:34 -0400 Subject: [PATCH] Average out growth rates --- src/data/exp.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/data/exp.ts b/src/data/exp.ts index 06c70d414..58505bda0 100644 --- a/src/data/exp.ts +++ b/src/data/exp.ts @@ -17,8 +17,12 @@ const expLevels = [ ]; export function getLevelTotalExp(level: integer, growthRate: GrowthRate): integer { - if (level < 100) - return expLevels[growthRate][level - 1]; + if (level < 100) { + const levelExp = expLevels[growthRate][level - 1]; + if (growthRate !== GrowthRate.MEDIUM_FAST) + return Math.floor(levelExp * 0.325 + getLevelTotalExp(level, GrowthRate.MEDIUM_FAST) * 0.675); + return levelExp; + } let ret: integer; @@ -43,6 +47,9 @@ export function getLevelTotalExp(level: integer, growthRate: GrowthRate): intege break; } + if (growthRate !== GrowthRate.MEDIUM_FAST) + return Math.floor(ret * 0.325 + getLevelTotalExp(level, GrowthRate.MEDIUM_FAST) * 0.675); + return Math.floor(ret); };