Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
TastyPumPum committed Mar 13, 2024
1 parent 78392a2 commit a1cf488
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
6 changes: 1 addition & 5 deletions src/mahoji/commands/hunt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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] = [
Expand Down
10 changes: 3 additions & 7 deletions src/tasks/minions/HunterActivity/hunterActivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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) {
Expand Down

0 comments on commit a1cf488

Please sign in to comment.