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

Remove some clue roll restrictions #6226

Merged
merged 2 commits into from
Nov 26, 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
9 changes: 1 addition & 8 deletions src/lib/minions/functions/addSkillingClueToLoot.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { percentChance, sumArr } from 'e';
import type { Bank } from 'oldschooljs';

import { BOT_TYPE } from '../../constants';
import {
birdsNestID,
eggNest,
Expand Down Expand Up @@ -70,16 +69,10 @@ export default function addSkillingClueToLoot(
}

if (!roll(chance)) continue;
let nextTier = false;
let gotClue = false;
let clueRoll = randFloat(0, cluesTotalWeight);
for (const clue of clues) {
if (clueRoll < clue[1] || nextTier) {
if (BOT_TYPE === 'OSB' && (user.bank.amount(clue[0]) >= 1 || loot.amount(clue[0]) >= 1)) {
nextTier = true;
continue;
}

if (clueRoll < clue[1]) {
nests++;
gotClue = true;
loot.add(clue[0]);
Expand Down
9 changes: 1 addition & 8 deletions src/tasks/minions/minigames/tobActivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { roll, shuffleArr } from 'e';
import { Bank } from 'oldschooljs';

import { drawChestLootImage } from '../../../lib/bankImage';
import { BOT_TYPE, Emoji, Events } from '../../../lib/constants';
import { Emoji, Events } from '../../../lib/constants';
import { tobMetamorphPets } from '../../../lib/data/CollectionsExport';
import { TOBRooms, TOBUniques, TOBUniquesToAnnounce } from '../../../lib/data/tob';
import { trackLoot } from '../../../lib/lootTrack';
Expand Down Expand Up @@ -140,13 +140,6 @@ export const tobTask: MinionTask = {
// Refund initial 100k entry cost
userLoot.add('Coins', 100_000);

// Remove elite clue scroll if OSB & user has one in bank
if (BOT_TYPE === 'OSB') {
if (user.owns('Clue scroll (elite)')) {
userLoot.remove('Clue scroll (elite)', 1);
}
}

// Add this raids loot to the raid's total loot:
totalLoot.add(userLoot);

Expand Down