Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding to Cyr's Works in Bank PR #5712

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/skilling/skills/dung/dungDbFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export function calcMaxFloorUserCanDo(user: MUser) {

export function calcUserGorajanShardChance(user: MUser) {
return calcGorajanShardChance({
hasMasterCape: user.hasEquipped('Dungeoneering master cape'),
hasMasterCape: user.hasEquippedOrInBank('Dungeoneering master cape'),
dungLevel: user.skillLevel(SkillsEnum.Dungeoneering),
hasRingOfLuck: user.hasEquipped('Ring of luck')
hasRingOfLuck: user.hasEquippedOrInBank('Ring of luck')
});
}

Expand Down
6 changes: 3 additions & 3 deletions src/mahoji/commands/runecraft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
'soul rune (zeah)',
...Runecraft.Tiaras.map(i => i.name)
]
.filter(name => (!value ? true : name.toLowerCase().includes(value.toLowerCase())))

Check warning on line 44 in src/mahoji/commands/runecraft.ts

View workflow job for this annotation

GitHub Actions / ESLint

Unexpected string value in conditional. An explicit empty string check is required
.map(i => ({
name: toTitleCase(i),
value: i
Expand Down Expand Up @@ -140,7 +140,7 @@
tripLength /= 2;
boosts.push('2x from Obis (3x more essence)');
}
if (user.hasEquipped('Runecraft master cape')) {
if (user.hasEquippedOrInBank('Runecraft master cape')) {
tripLength /= 2;
boosts.push(`${Emoji.RunecraftMasterCape} 2x faster`);
}
Expand Down Expand Up @@ -225,7 +225,7 @@
(numEssenceOwned === 0 ||
quantity === 0 ||
numEssenceOwned < quantity ||
!essenceRequired ||

Check warning on line 228 in src/mahoji/commands/runecraft.ts

View workflow job for this annotation

GitHub Actions / ESLint

Unexpected number value in conditional. An explicit zero/NaN check is required
numEssenceOwned < essenceRequired)
) {
return "You don't have enough Pure Essence to craft these runes. You can acquire some through Mining, or purchasing from other players.";
Expand Down Expand Up @@ -254,8 +254,8 @@
let removeTalismanAndOrRunes = new Bank();
let hasRingOfTheElements = false;
if (runeObj.inputTalisman) {
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 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 magicImbueRuneCost = determineRunes(
user,
new Bank({ 'Astral rune': 2, 'Fire rune': tomeOfFire, 'Water rune': tomeOfWater })
Expand Down Expand Up @@ -339,7 +339,7 @@
if (!user.owns(totalCost)) return `You don't own: ${totalCost}.`;

await user.removeItemsFromBank(totalCost);
updateBankSetting('runecraft_cost', totalCost);

Check warning on line 342 in src/mahoji/commands/runecraft.ts

View workflow job for this annotation

GitHub Actions / ESLint

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

await addSubTaskToActivityTask<RunecraftActivityTaskOptions>({
runeID: runeObj.id,
Expand Down
Loading