diff --git a/src/mahoji/commands/mine.ts b/src/mahoji/commands/mine.ts index 4cfcf15aa1..e556bc3895 100644 --- a/src/mahoji/commands/mine.ts +++ b/src/mahoji/commands/mine.ts @@ -83,7 +83,7 @@ export function calculateMiningInput({ effectiveMiningLevel += 7; } // Checks if user own Celestial ring or Celestial signet - if (gearValues.some(g => g.hasEquipped(['Celestial ring (uncharged)']))) { + if (gearValues.some(g => g.hasEquippedOrInBank(['Celestial ring (uncharged)']))) { messages.push('+4 invisible Mining lvls for Celestial ring'); effectiveMiningLevel += 4; } @@ -105,7 +105,7 @@ export function calculateMiningInput({ let glovesRate = 0; if (miningLevel >= 60) { for (const glove of miningGloves) { - if (!gearValues.some(g => g.hasEquipped(glove.id)) || !glove.Percentages.has(ore.id)) continue; + if (!gearValues.some(g => g.hasEquippedOrInBank(glove.id)) || !glove.Percentages.has(ore.id)) continue; glovesRate = glove.Percentages.amount(ore.id); if (glovesRate !== 0) { messages.push(`Lowered rock depletion rate by **${glovesRate}%** for ${itemNameFromID(glove.id)}`); @@ -116,7 +116,7 @@ export function calculateMiningInput({ let armourEffect = 0; for (const armour of varrockArmours) { - if (!gearValues.some(g => g.hasEquipped(armour.id)) || !armour.Percentages.has(ore.id)) continue; + if (!gearValues.some(g => g.hasEquippedOrInBank(armour.id)) || !armour.Percentages.has(ore.id)) continue; armourEffect = armour.Percentages.amount(ore.id); if (armourEffect !== 0) { messages.push(`**${armourEffect}%** chance to mine an extra ore using ${itemNameFromID(armour.id)}`); @@ -131,7 +131,7 @@ export function calculateMiningInput({ } let miningCapeEffect = 0; - if (gearValues.some(g => g.hasEquipped('Mining cape')) && miningCapeOreEffect.has(ore.id)) { + if (gearValues.some(g => g.hasEquippedOrInBank('Mining cape')) && miningCapeOreEffect.has(ore.id)) { miningCapeEffect = miningCapeOreEffect.amount(ore.id); if (miningCapeEffect !== 0) { messages.push(`**${miningCapeEffect}%** chance to mine an extra ore using Mining cape`); diff --git a/src/mahoji/commands/runecraft.ts b/src/mahoji/commands/runecraft.ts index 00c2aa381f..ca73beca76 100644 --- a/src/mahoji/commands/runecraft.ts +++ b/src/mahoji/commands/runecraft.ts @@ -254,8 +254,8 @@ export const runecraftCommand: OSBMahojiCommand = { let removeTalismanAndOrRunes = new Bank(); let hasRingOfTheElements = false; if (runeObj.inputTalisman) { - const tomeOfFire = user.hasEquippedOrInBank(['Tome of fire', 'Tome of fire (empty)']) ? 0 : 7; - const tomeOfWater = user.hasEquippedOrInBank(['Tome of water', 'Tome of water (empty)']) ? 0 : 7; + const tomeOfFire = user.hasEquipped(['Tome of fire', 'Tome of fire (empty)']) ? 0 : 7; + const tomeOfWater = user.hasEquipped(['Tome of water', 'Tome of water (empty)']) ? 0 : 7; const magicImbueRuneCost = determineRunes( user, new Bank({ 'Astral rune': 2, 'Fire rune': tomeOfFire, 'Water rune': tomeOfWater }) diff --git a/src/mahoji/commands/steal.ts b/src/mahoji/commands/steal.ts index 7d99d49811..b0e4b278cb 100644 --- a/src/mahoji/commands/steal.ts +++ b/src/mahoji/commands/steal.ts @@ -157,7 +157,7 @@ export const stealCommand: OSBMahojiCommand = { quantity, user.hasEquipped(['Thieving cape', 'Thieving cape(t)']), hasArdyHard, - user.hasEquippedOrInBank(["Thieves' armband"]) + user.hasEquipped(["Thieves' armband"]) ); if (user.hasEquipped(['Thieving cape', 'Thieving cape(t)', 'Thieving master cape'])) { diff --git a/src/mahoji/lib/abstracted_commands/minionKill.ts b/src/mahoji/lib/abstracted_commands/minionKill.ts index 874d0d747e..553908f851 100644 --- a/src/mahoji/lib/abstracted_commands/minionKill.ts +++ b/src/mahoji/lib/abstracted_commands/minionKill.ts @@ -584,16 +584,16 @@ export async function minionKillCommand( } } - if (attackStyles.includes(SkillsEnum.Ranged) && user.hasEquippedOrInBank('Ranged master cape')) { + if (attackStyles.includes(SkillsEnum.Ranged) && user.hasEquipped('Ranged master cape')) { timeToFinish *= 0.85; boosts.push('15% for Ranged master cape'); - } else if (attackStyles.includes(SkillsEnum.Magic) && user.hasEquippedOrInBank('Magic master cape')) { + } else if (attackStyles.includes(SkillsEnum.Magic) && user.hasEquipped('Magic master cape')) { timeToFinish *= 0.85; boosts.push('15% for Magic master cape'); } else if ( !attackStyles.includes(SkillsEnum.Magic) && !attackStyles.includes(SkillsEnum.Ranged) && - user.hasEquippedOrInBank('Attack master cape') + user.hasEquipped('Attack master cape') ) { timeToFinish *= 0.85; boosts.push('15% for Attack master cape'); @@ -686,7 +686,7 @@ export async function minionKillCommand( const prayerPots = user.bank.amount('Prayer potion(4)'); const fiveMinIncrements = Math.ceil(duration / (Time.Minute * 5)); let prayerPotsNeeded = Math.max(1, fiveMinIncrements); - const hasPrayerMasterCape = user.hasEquippedOrInBank('Prayer master cape'); + const hasPrayerMasterCape = user.hasEquipped('Prayer master cape'); if (hasPrayerMasterCape && hasBlessing) { boosts.push('40% less prayer pots'); prayerPotsNeeded = Math.floor(0.6 * prayerPotsNeeded); diff --git a/src/mahoji/lib/abstracted_commands/monkeyRumbleCommand.ts b/src/mahoji/lib/abstracted_commands/monkeyRumbleCommand.ts index 5545460b51..65bd93b521 100644 --- a/src/mahoji/lib/abstracted_commands/monkeyRumbleCommand.ts +++ b/src/mahoji/lib/abstracted_commands/monkeyRumbleCommand.ts @@ -66,7 +66,7 @@ export async function monkeyRumbleCommand(user: MUser, channelID: string): Comma const boosts = []; let fightDuration = Time.Minute * 9; - if (user.hasEquippedOrInBank('Strength master cape')) { + if (user.hasEquipped('Strength master cape')) { fightDuration = reduceNumByPercent(fightDuration, 17); boosts.push('17% faster fights for strength master cape'); } diff --git a/src/mahoji/lib/abstracted_commands/warriorsGuildCommand.ts b/src/mahoji/lib/abstracted_commands/warriorsGuildCommand.ts index 7612b07fc3..358dc8e06d 100644 --- a/src/mahoji/lib/abstracted_commands/warriorsGuildCommand.ts +++ b/src/mahoji/lib/abstracted_commands/warriorsGuildCommand.ts @@ -77,7 +77,7 @@ async function tokensCommand(user: MUser, channelID: string, quantity: number | async function cyclopsCommand(user: MUser, channelID: string, quantity: number | undefined) { const userBank = user.bank; - const hasAttackCape = user.gear.melee.hasEquipped('Attack cape'); + const hasAttackCape = user.gear.melee.hasEquippedOrInBank('Attack cape'); const maxTripLength = calcMaxTripLength(user, 'Cyclops'); // Check if either 100 warrior guild tokens or attack cape (similar items in future) const amountTokens = userBank.amount('Warrior guild token'); diff --git a/src/tasks/minions/miningActivity.ts b/src/tasks/minions/miningActivity.ts index c6eec2888d..d549395e3a 100644 --- a/src/tasks/minions/miningActivity.ts +++ b/src/tasks/minions/miningActivity.ts @@ -256,7 +256,7 @@ export const miningTask: MinionTask = { const spiritOre = stoneSpirits.find(t => t.ore.id === ore.id); const amountOfSpiritsToUse = spiritOre !== undefined ? Math.min(quantity, user.bank.amount(spiritOre.spirit.id)) : 0; - const hasMiningMasterCape = User.hasEquippedOrInBank('Mining master cape'); + const hasMiningMasterCape = user.hasEquippedhasEquipped('Mining master cape'); const portentResult = amountOfSpiritsToUse > 0 ? await chargePortentIfHasCharges({