diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-07-04 15:10:01 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-07-04 15:10:01 +0800 |
commit | f331a409ac5be5fd97dafb5e6884357bed0f2985 (patch) | |
tree | e2c14cf4251ebaf73130101b1db7cb991591b350 /utils/statUtils.js | |
parent | ed04de9848baf3ad2436d5e5537ab2ec61676bc4 (diff) | |
download | SoopyV2-f331a409ac5be5fd97dafb5e6884357bed0f2985.tar.gz SoopyV2-f331a409ac5be5fd97dafb5e6884357bed0f2985.tar.bz2 SoopyV2-f331a409ac5be5fd97dafb5e6884357bed0f2985.zip |
+ toggle for waypoints in F7/M7
+ support for skill levels over 60
Diffstat (limited to 'utils/statUtils.js')
-rw-r--r-- | utils/statUtils.js | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/utils/statUtils.js b/utils/statUtils.js index ae064cf..89b467d 100644 --- a/utils/statUtils.js +++ b/utils/statUtils.js @@ -280,14 +280,28 @@ function getLevelByXp(xp, type, levelCap) { level++ xpCurrent -= 200000000 } - if(level < levelCap){ + if (level < levelCap) { progress = xpCurrent / 200000000 xpForNext = 200000000 - }else{ + } else { progress = 0 xpForNext = NaN } } + if (type === 0 && level === 60 && levelCap === Infinity) { + maxLevel = Infinity + let slope = 600000 + let xpForCurr = 7000000 + slope + while (xpCurrent > xpForCurr) { + level++ + xpCurrent -= xpForCurr + xpForCurr += slope + if (level % 10 === 0) slope *= 2 + } + + progress = xpCurrent / xpForCurr + xpForNext = xpForCurr + } return { xp, level, |