From a1cf488b730c55a130c51a02eb9594c9eaa098fe Mon Sep 17 00:00:00 2001 From: TastyPumPum Date: Wed, 13 Mar 2024 19:02:39 +0000 Subject: [PATCH] Tidy --- src/mahoji/commands/hunt.ts | 6 +----- src/tasks/minions/HunterActivity/hunterActivity.ts | 10 +++------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/mahoji/commands/hunt.ts b/src/mahoji/commands/hunt.ts index 8a1070755e..e0f6160462 100644 --- a/src/mahoji/commands/hunt.ts +++ b/src/mahoji/commands/hunt.ts @@ -118,11 +118,7 @@ export const huntCommand: OSBMahojiCommand = { } } - let crystalImpling = false; - - if (creature.name === 'Crystal impling') { - crystalImpling = true; - } + let crystalImpling = creature.name === 'Crystal impling'; // Reduce time if user is experienced hunting the creature, every hour become 1% better to a cap of 10% or 20% if tracking technique. let [percentReduced, catchTime] = [ diff --git a/src/tasks/minions/HunterActivity/hunterActivity.ts b/src/tasks/minions/HunterActivity/hunterActivity.ts index e190c7d9b6..e743831611 100644 --- a/src/tasks/minions/HunterActivity/hunterActivity.ts +++ b/src/tasks/minions/HunterActivity/hunterActivity.ts @@ -55,10 +55,7 @@ export const hunterTask: MinionTask = { if (!creature) return; - let crystalImpling = false; - if (creature.name === 'Crystal impling') { - crystalImpling = true; - } + let crystalImpling = creature.name === 'Crystal impling'; let graceful = false; if (userHasGracefulEquipped(user)) { @@ -74,9 +71,8 @@ export const hunterTask: MinionTask = { ); if (crystalImpling) { - const maxImplingsPer60 = 21; - const maxImplings = Math.round((maxImplingsPer60 / 60) * duration) + 1; - successfulQuantity = Math.min(successfulQuantity, maxImplings); + // Limit it to a max of 22 crystal implings per hour + successfulQuantity = Math.min(successfulQuantity, Math.round((21 / 60) * duration) + 1); } if (creature.wildy) {