Skip to content

Commit

Permalink
reverted tomes, Combat masters & Thieves' armband,
Browse files Browse the repository at this point in the history
  • Loading branch information
I-am-TURBO committed Mar 9, 2024
1 parent 525e1a7 commit 0343176
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/mahoji/commands/mine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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)}`);
Expand All @@ -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)}`);
Expand All @@ -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`);
Expand Down
4 changes: 2 additions & 2 deletions src/mahoji/commands/runecraft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down
2 changes: 1 addition & 1 deletion src/mahoji/commands/steal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down
8 changes: 4 additions & 4 deletions src/mahoji/lib/abstracted_commands/minionKill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/mahoji/lib/abstracted_commands/monkeyRumbleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion src/mahoji/lib/abstracted_commands/warriorsGuildCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/minions/miningActivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 0343176

Please sign in to comment.