From c51024cf3b26d0cb390f938afc68792a6a2508ee Mon Sep 17 00:00:00 2001 From: TastyPumPum Date: Thu, 12 Oct 2023 19:13:27 +0100 Subject: [PATCH] Tidy --- src/util/util.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/util/util.ts b/src/util/util.ts index a77748271..5bda01daf 100644 --- a/src/util/util.ts +++ b/src/util/util.ts @@ -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(object: O): O {