From da7797dafc3e4550348c6e5d7d9523fa9b692b18 Mon Sep 17 00:00:00 2001 From: GC <30398469+gc@users.noreply.github.com> Date: Wed, 13 Mar 2024 23:26:24 +1100 Subject: [PATCH] Add Easter crate (s5) (#5777) --- src/lib/customItems/customItems.ts | 133 ++++++++++++++++++ src/lib/keyCrates.ts | 20 +++ src/lib/util/handleTripFinish.ts | 3 +- .../unit/snapshots/banksnapshots.test.ts.snap | 10 ++ tests/unit/snapshots/clsnapshots.test.ts.snap | 1 + 5 files changed, 166 insertions(+), 1 deletion(-) diff --git a/src/lib/customItems/customItems.ts b/src/lib/customItems/customItems.ts index fd22c2cf99..7f7b0983c4 100644 --- a/src/lib/customItems/customItems.ts +++ b/src/lib/customItems/customItems.ts @@ -11584,3 +11584,136 @@ setCustomItem( }, 1 ); + +setCustomItem( + 73_112, + 'Golden bunny ears', + 'Bronze full helm', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 1 +); + +setCustomItem( + 73_113, + 'Easter-egg delight', + 'Coal', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 1 +); + +setCustomItem( + 73_114, + 'Easter-egg salad', + 'Coal', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 1 +); + +setCustomItem( + 73_115, + 'Cute bunny cape', + 'Red cape', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 1 +); + +setCustomItem( + 73_116, + 'Easter jumper', + 'Bronze platebody', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 1 +); + +setCustomItem( + 73_117, + 'Bunny plushie', + 'Coal', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 1 +); + +setCustomItem( + 73_118, + 'Easter tunic', + 'Bronze platebody', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 1 +); + +setCustomItem( + 73_119, + 'Easter breeches', + 'Bronze platelegs', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 1 +); + +setCustomItem( + 73_120, + 'Easter shoes', + 'Bronze boots', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 1 +); + +setCustomItem( + 73_121, + 'Easter crate (s5)', + 'Coal', + { + customItemData: { + cantDropFromMysteryBoxes: true + }, + buy_limit: 100 + }, + 1 +); + +setCustomItem( + 73_122, + 'Easter crate key (s5)', + 'Coal', + { + customItemData: { + cantDropFromMysteryBoxes: true + } + }, + 1 +); diff --git a/src/lib/keyCrates.ts b/src/lib/keyCrates.ts index 249f448fcb..39253df25d 100644 --- a/src/lib/keyCrates.ts +++ b/src/lib/keyCrates.ts @@ -133,5 +133,25 @@ export const keyCrates: Crate[] = [ 1, 89 ) + }, + { + item: getOSItem('Easter crate (s5)'), + key: getOSItem('Easter crate key (s5)'), + keyCostGP: 10_000_000, + table: new LootTable() + .tertiary(5000, 'Golden bunny ears') + .tertiary(750, new LootTable().add('Cute bunny cape').add('Bunny plushie')) + .add( + new LootTable() + .add('Easter jumper') + .add('Easter-egg delight') + .add('Easter-egg salad') + .add('Easter tunic') + .add('Easter breeches') + .add('Easter shoes'), + 1, + 1 + ) + .add(new LootTable().add('Carrot').add('Egg').add('Easter egg'), [2, 3], 99) } ]; diff --git a/src/lib/util/handleTripFinish.ts b/src/lib/util/handleTripFinish.ts index 1a3f9ddda5..b98cdc13dc 100644 --- a/src/lib/util/handleTripFinish.ts +++ b/src/lib/util/handleTripFinish.ts @@ -311,13 +311,14 @@ const tripFinishEffects: TripFinishEffect[] = [ } } dropratePerMinute = Math.ceil(dropratePerMinute / 3); + dropratePerMinute = Math.ceil(dropratePerMinute / 3); if (user.isIronman) { dropratePerMinute = Math.ceil(dropratePerMinute / 3); } const minutes = Math.floor(data.duration / Time.Minute); for (let i = 0; i < minutes; i++) { if (roll(dropratePerMinute)) { - const loot = new Bank().add('Festive crate (s4)'); + const loot = new Bank().add('Easter crate (s5)'); await user.addItemsToBank({ items: loot, collectionLog: true }); messages.push(bold(`You found ${loot}!`)); break; diff --git a/tests/unit/snapshots/banksnapshots.test.ts.snap b/tests/unit/snapshots/banksnapshots.test.ts.snap index 6ee790a347..76c51322bd 100644 --- a/tests/unit/snapshots/banksnapshots.test.ts.snap +++ b/tests/unit/snapshots/banksnapshots.test.ts.snap @@ -4329,6 +4329,16 @@ exports[`BSO Buyables 1`] = ` "name": "Festive crate key (s4)", "outputItems": undefined, }, + { + "gpCost": 10000000, + "ironmanPrice": 1000000, + "itemCost": Bank { + "bank": {}, + "frozen": false, + }, + "name": "Easter crate key (s5)", + "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 7a2e76c5a8..0a81c32579 100644 --- a/tests/unit/snapshots/clsnapshots.test.ts.snap +++ b/tests/unit/snapshots/clsnapshots.test.ts.snap @@ -60,6 +60,7 @@ Dyed Items (83) Dyed Items (Discontinued) (18) Easter 2022 (3) Easter 2023 (13) +Easter crate (s5) (14) Easy Treasure Trails (131) Elite Treasure Trail Rewards (Rare) (39) Elite Treasure Trails (59)