Skip to content

Commit

Permalink
fix how clues are rolled
Browse files Browse the repository at this point in the history
  • Loading branch information
nwjgit committed Feb 9, 2024
1 parent 774b79c commit b22a063
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/lib/simulation/tob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Bank, LootTable } from 'oldschooljs';
import { LootBank } from 'oldschooljs/dist/meta/types';
import { convertLootBanksToItemBanks, JSONClone } from 'oldschooljs/dist/util';

import { BOT_TYPE } from '../constants';
import { TOBRooms } from '../data/tob';
import { assert } from '../util/logError';

Expand Down Expand Up @@ -50,7 +51,6 @@ const HardModeUniqueTable = new LootTable()
.add('Avernic defender hilt', 1, 7);

const NonUniqueTable = new LootTable()
.tertiary(25, 'Clue scroll (elite)')
.add('Vial of blood', [50, 60], 2)
.add('Death rune', [500, 600])
.add('Blood rune', [500, 600])
Expand Down Expand Up @@ -83,6 +83,10 @@ const NonUniqueTable = new LootTable()
.add('Yew seed', 3)
.add('Magic seed', 3);

if (BOT_TYPE === 'BSO') {
NonUniqueTable.tertiary(25, 'Clue scroll (elite)');
}

const HardModeExtraTable = new LootTable()
.tertiary(275, 'Sanguine dust')
.tertiary(150, 'Sanguine ornament kit')
Expand All @@ -96,11 +100,6 @@ export class TheatreOfBloodClass {
const loot = new Bank();
for (let i = 0; i < 3; i++) {
loot.add(NonUniqueTable.roll());

// OSB only: Remove dupe elite clue scrolls
if (loot.amount('Clue scroll (elite)') > 1) {
loot.remove('Clue scroll (elite)', 1);
}
}

if (isHardMode) {
Expand All @@ -112,6 +111,12 @@ export class TheatreOfBloodClass {
loot.add(HardModeExtraTable.roll());
}

if (BOT_TYPE === 'OSB') {
if (roll(25)) {
loot.add('Clue scroll (elite)');
}
}

let petChance = isHardMode ? 500 : 650;
if (member.numDeaths > 0) {
petChance *= member.numDeaths;
Expand Down

0 comments on commit b22a063

Please sign in to comment.