mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-23 06:30:48 +08:00
feat: show level progress on profile
This commit is contained in:
7
open-isle-cli/src/utils/level.js
Normal file
7
open-isle-cli/src/utils/level.js
Normal file
@@ -0,0 +1,7 @@
|
||||
export const LEVEL_EXP = [100, 200, 300, 600, 1200, 10000]
|
||||
|
||||
export const prevLevelExp = level => {
|
||||
if (level <= 0) return 0
|
||||
if (level - 1 < LEVEL_EXP.length) return LEVEL_EXP[level - 1]
|
||||
return LEVEL_EXP[LEVEL_EXP.length - 1]
|
||||
}
|
||||
Reference in New Issue
Block a user