Skip to content

Commit

Permalink
chore: prettier format
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthGigi committed Nov 25, 2024
1 parent e936af2 commit fda322d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/stats/leveling/leveling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function getLevelByXp(
}

/** the maximum level that any player can achieve (used for gold progress bars) */
const maxLevel = isInfiniteLevelable ? Math.max(uncappedLevel, levelCap) : constants.MAXED_SKILL_CAPS[extra.type] ?? levelCap;
const maxLevel = isInfiniteLevelable ? Math.max(uncappedLevel, levelCap) : (constants.MAXED_SKILL_CAPS[extra.type] ?? levelCap);

/** the level as displayed by in game UI */
const level = isInfiniteLevelable ? uncappedLevel : Math.min(levelCap, uncappedLevel);
Expand Down Expand Up @@ -185,7 +185,7 @@ export function getXpByLevel(
}

/** the maximum level that any player can achieve (used for gold progress bars) */
const maxLevel = isInfiniteLevelable ? Math.max(uncappedLevel, levelCap) : constants.MAXED_SKILL_CAPS[extra.type] ?? levelCap;
const maxLevel = isInfiniteLevelable ? Math.max(uncappedLevel, levelCap) : (constants.MAXED_SKILL_CAPS[extra.type] ?? levelCap);

/** the amount amount of xp needed to reach the next level (used for calculation progress to next level) */
const xpForNext = (level < maxLevel ? Math.ceil(xpTable[level + 1] ?? Object.values(xpTable).at(-1)) : isInfiniteLevelable ? Object.values(xpTable).at(-1) : Infinity) as number;
Expand Down

0 comments on commit fda322d

Please sign in to comment.