mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-18 15:00:55 +00:00
Average out growth rates
This commit is contained in:
parent
610218fe16
commit
a53dc0f025
@ -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);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user