Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
TastyPumPum committed Oct 12, 2023
1 parent 93ffd39 commit c51024c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,11 @@ export function getBrimKeyChanceFromCBLevel(combatLevel: number): number {
return Math.max(Math.round((-1 / 5) * combatLevel + 120), 50);
}

export function getLarranKeyChanceFromCBLevel(combatLevel: number): number | undefined {
let keyChance: number | undefined = undefined;

export function getLarranKeyChanceFromCBLevel(combatLevel: number): number {
if (combatLevel >= 1 && combatLevel <= 80) {
keyChance = Math.round((1 / (0.0056 * combatLevel + 1 / 1972)) * 100) / 100;
} else if (combatLevel >= 81) {
keyChance = Math.max(Math.round((1 / (0.0056 * combatLevel + 1 / 99)) * 100) / 100, 0.02);
return Math.round((1 / (0.0056 * combatLevel + 1 / 1972)) * 100) / 100;
}

return keyChance;
return Math.max(Math.round((1 / (0.0056 * combatLevel + 1 / 99)) * 100) / 100, 0.02);
}

export function JSONClone<O>(object: O): O {
Expand Down

0 comments on commit c51024c

Please sign in to comment.