From 837e89eacb67e6f187c5ac1d851bdf010c8c940c Mon Sep 17 00:00:00 2001 From: gc <30398469+gc@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:01:24 +1100 Subject: [PATCH] Add frozen crate --- src/lib/customItems/customItems.ts | 252 ++++++++++++++++++ src/lib/keyCrates.ts | 36 +++ src/lib/util/handleCrateSpawns.ts | 19 +- .../unit/snapshots/banksnapshots.test.ts.snap | 7 + tests/unit/snapshots/clsnapshots.test.ts.snap | 1 + 5 files changed, 300 insertions(+), 15 deletions(-) diff --git a/src/lib/customItems/customItems.ts b/src/lib/customItems/customItems.ts index b785c6340e..b5a89e50f9 100644 --- a/src/lib/customItems/customItems.ts +++ b/src/lib/customItems/customItems.ts @@ -13269,3 +13269,255 @@ setCustomItem( }, 500_000 ); + +setCustomItem( + 73_281, + 'Skippers', + 'Bronze boots', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_282, + 'Shrimpy', + 'Herbi', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_283, + 'Cinnamon doughnut-ball', + 'Coal', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_284, + 'Christmas choc-stocking', + 'Coal', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_285, + 'Atlantis jumper', + 'Bronze platebody', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_286, + 'BSO Santa hat', + 'Bronze full helm', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_287, + 'OSB earmuffs', + 'Bronze full helm', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_288, + 'BSO earmuffs', + 'Bronze full helm', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_289, + 'BSO socks', + 'Bronze boots', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_290, + 'White beanie', + 'Bronze full helm', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_291, + 'OSB beanie', + 'Bronze full helm', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_292, + 'BSO beanie', + 'Bronze full helm', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_293, + 'Green beanie', + 'Bronze full helm', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_294, + 'Orange beanie', + 'Bronze full helm', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_295, + 'Jolly beanie', + 'Bronze full helm', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_296, + 'Aquatic beanie', + 'Bronze full helm', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_297, + 'Dark beanie', + 'Bronze full helm', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_298, + 'Frosticle top', + 'Bronze platebody', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_299, + 'Frozen crate (s8)', + 'Coal', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_300, + 'Frozen crate key (s8)', + 'Coal', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); + +setCustomItem( + 73_303, + 'Snow leopard plushie', + 'Coal', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 500_000 +); diff --git a/src/lib/keyCrates.ts b/src/lib/keyCrates.ts index 50c815f09a..33b9118713 100644 --- a/src/lib/keyCrates.ts +++ b/src/lib/keyCrates.ts @@ -235,5 +235,41 @@ export const keyCrates: Crate[] = [ 1, 100 ) + }, + { + item: getOSItem('Frozen crate (s8)'), + key: getOSItem('Frozen crate key (s8)'), + keyCostGP: 20_666_666, + table: new LootTable() + .tertiary(3111, 'BSO Santa hat') + .tertiary(110, 'Paint box') + .add( + new LootTable() + .add('Atlantis jumper') + .add('OSB earmuffs') + .add('BSO earmuffs') + .add('Skippers') + .add('BSO socks') + .add('White beanie') + .add('OSB beanie') + .add('BSO beanie') + .add('Green beanie') + .add('Orange beanie') + .add('Jolly beanie') + .add('Aquatic beanie') + .add('Dark beanie') + .add('Frosticle top'), + 1, + 1 + ) + .add( + new LootTable() + .add('Cinnamon doughnut-ball') + .add('Christmas choc-stocking') + .add('Cake') + .add('Purple sweets', [1, 3]), + 1, + 100 + ) } ]; diff --git a/src/lib/util/handleCrateSpawns.ts b/src/lib/util/handleCrateSpawns.ts index eacba64caa..96bd444cc6 100644 --- a/src/lib/util/handleCrateSpawns.ts +++ b/src/lib/util/handleCrateSpawns.ts @@ -4,7 +4,9 @@ import { Bank, resolveItems } from 'oldschooljs'; import getOSItem from './getOSItem'; import { itemNameFromID } from './smallUtils'; -const crateItem = getOSItem('Sinister crate (s7)'); +const crateItem = getOSItem('Frozen crate (s8)'); + +const xmasPets = resolveItems(['Smokey', 'Rudolph', 'Frosty']); export function handleCrateSpawns(user: MUser, duration: number, messages?: string[]) { const accountAge = user.accountAgeInDays(); @@ -18,20 +20,7 @@ export function handleCrateSpawns(user: MUser, duration: number, messages?: stri dropratePerMinute = Math.ceil(dropratePerMinute / 3); dropratePerMinute = Math.ceil(dropratePerMinute / 2); - const hweenPets = resolveItems([ - 'Kuro', - 'Gregoyle', - 'Mumpkin', - 'Mumpkin (demonic)', - 'Mumpkin (pumpkin)', - 'Mumpkin (dead)', - 'Polterpup', - 'Mini pumpkinhead', - 'Mini mortimer', - 'Casper', - 'Cob' - ]); - if (hweenPets.some(pet => user.usingPet(pet))) { + if (xmasPets.some(pet => user.usingPet(pet))) { dropratePerMinute = Math.ceil(dropratePerMinute / 10); if (messages) { messages.push(`10x higher droprates for ${itemNameFromID(user.user.minion_equippedPet!)}`); diff --git a/tests/unit/snapshots/banksnapshots.test.ts.snap b/tests/unit/snapshots/banksnapshots.test.ts.snap index df2b387819..306281c468 100644 --- a/tests/unit/snapshots/banksnapshots.test.ts.snap +++ b/tests/unit/snapshots/banksnapshots.test.ts.snap @@ -2920,6 +2920,13 @@ exports[`BSO Buyables 1`] = ` "name": "Sinister crate key (s7)", "outputItems": undefined, }, + { + "gpCost": 20666666, + "ironmanPrice": 2066666, + "itemCost": {}, + "name": "Frozen crate key (s8)", + "outputItems": undefined, + }, { "customReq": [Function], "gpCost": 1000000, diff --git a/tests/unit/snapshots/clsnapshots.test.ts.snap b/tests/unit/snapshots/clsnapshots.test.ts.snap index 971bee0fbb..7001813168 100644 --- a/tests/unit/snapshots/clsnapshots.test.ts.snap +++ b/tests/unit/snapshots/clsnapshots.test.ts.snap @@ -76,6 +76,7 @@ Fletching (145) Forestry (23) Fortis Colosseum (9) Fossil Island Notes (10) +Frozen crate (s8) (22) General Graardor (8) Giant Mole (3) Giants' Foundry (9)