Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
I-am-TURBO authored Mar 9, 2024
1 parent ed86107 commit 59c04dd
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/mahoji/lib/abstracted_commands/fishingContestCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@ import { updateBankSetting } from '../../../lib/util/updateBankSetting';
export async function fishingContestStartCommand(user: MUser, channelID: string, loc: string | undefined) {
const currentFishType = getCurrentFishType();
const validLocs = getValidLocationsForFishType(currentFishType);
let quantity = 1;
let duration = Math.floor(quantity * Time.Minute * 1.69);
let quantityBoosts = [];

const tackleBoxes = ["Champion's tackle box", 'Professional tackle box', 'Standard tackle box', 'Basic tackle box'];
for (let i = 0; i < tackleBoxes.length; i++) {
if (user.hasEquippedOrInBank(tackleBoxes[i])) {
let num = tackleBoxes.length - i;
quantityBoosts.push(`${num} for ${tackleBoxes[i]}`);
quantity += num;
break;
}
}

if (user.hasEquippedOrInBank('Crystal fishing rod')) {
quantity++;
quantityBoosts.push('1 for Crystal fishing rod');
let quantity = 1;
let duration = Math.floor(quantity * Time.Minute * 1.69);
let quantityBoosts = [];

const tackleBoxes = ["Champion's tackle box", 'Professional tackle box', 'Standard tackle box', 'Basic tackle box'];
for (let i = 0; i < tackleBoxes.length; i++) {
if (user.hasEquippedOrInBank(tackleBoxes[i])) {
let num = tackleBoxes.length - i;
quantityBoosts.push(`${num} for ${tackleBoxes[i]}`);
quantity += num;
break;
}
}

if (user.hasEquippedOrInBank('Crystal fishing rod')) {
quantity++;
quantityBoosts.push('1 for Crystal fishing rod');
}
if (!loc) {
for (const location of validLocs) {
if (user.bank.amount(location.bait.id) >= quantity) {
loc = location.name;
}
}
if (!loc) loc = validLocs[0].name;
}
for (const location of validLocs) {
if (user.bank.amount(location.bait.id) >= quantity) {
loc = location.name;
}
}
if (!loc) loc = validLocs[0].name;
}
const fishingLocation = fishingLocations.find(i => stringMatches(i.name, loc!));
if (!fishingLocation) {
return `That's not a valid location to fish at, you can fish at these locations: ${fishingLocations
Expand Down

0 comments on commit 59c04dd

Please sign in to comment.