Skip to content

Commit

Permalink
Update Larren's & Brimstone openable (#5691)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwjgit authored Feb 22, 2024
1 parent eb23dd5 commit 100983a
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions src/lib/openables.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { formatOrdinal } from '@oldschoolgg/toolkit';
import { Bank, LootTable, Openables } from 'oldschooljs';
import { Item } from 'oldschooljs/dist/meta/types';
import { SkillsEnum } from 'oldschooljs/dist/constants';
import { Item, OpenableOpenOptions } from 'oldschooljs/dist/meta/types';
import { Mimic } from 'oldschooljs/dist/simulation/misc';
import BrimstoneChest, { BrimstoneChestOpenable } from 'oldschooljs/dist/simulation/openables/BrimstoneChest';
import { HallowedSackTable } from 'oldschooljs/dist/simulation/openables/HallowedSack';
import { Implings } from 'oldschooljs/dist/simulation/openables/Implings';
import LarransChest, { LarransChestOpenable } from 'oldschooljs/dist/simulation/openables/LarransChest';

import { ClueTiers } from './clues/clueTiers';
import { Emoji, Events, MIMIC_MONSTER_ID } from './constants';
Expand Down Expand Up @@ -162,7 +165,20 @@ const osjsOpenables: UnifiedOpenable[] = [
id: 23_083,
openedItem: getOSItem(23_083),
aliases: ['brimstone chest', 'brimstone'],
output: Openables.BrimstoneChest.table,
output: async (
args: OpenArgs
): Promise<{
bank: Bank;
}> => {
const chest = new BrimstoneChestOpenable(BrimstoneChest);
const fishLvl = args.user.skillLevel(SkillsEnum.Fishing);
const brimstoneOptions: OpenableOpenOptions = {
fishLvl
};
const openLoot: Bank = chest.open(args.quantity, brimstoneOptions);

return { bank: openLoot };
},
allItems: Openables.BrimstoneChest.table.allItems
},
{
Expand Down Expand Up @@ -234,7 +250,21 @@ const osjsOpenables: UnifiedOpenable[] = [
'larrans small chest',
"larran's small chest"
],
output: Openables.LarransChest.table,
output: async (
args: OpenArgs
): Promise<{
bank: Bank;
}> => {
const chest = new LarransChestOpenable(LarransChest);
const fishLvl = args.user.skillLevel(SkillsEnum.Fishing);
const larransOptions: OpenableOpenOptions = {
fishLvl,
chestSize: 'big'
};
const openLoot: Bank = chest.open(args.quantity, larransOptions);

return { bank: openLoot };
},
allItems: Openables.LarransChest.table.allItems
},
{
Expand Down

0 comments on commit 100983a

Please sign in to comment.