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

Easter crate #5777

Merged
merged 1 commit into from
Mar 13, 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
133 changes: 133 additions & 0 deletions src/lib/customItems/customItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
20 changes: 20 additions & 0 deletions src/lib/keyCrates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
];
3 changes: 2 additions & 1 deletion src/lib/util/handleTripFinish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
if (loot && activitiesToTrackAsPVMGPSource.includes(data.type)) {
const GP = loot.amount(COINS_ID);
if (typeof GP === 'number') {
updateClientGPTrackSetting('gp_pvm', GP);

Check warning on line 78 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check warning on line 78 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
}
}
}
Expand All @@ -87,7 +87,7 @@
if (imp && imp.bank.length > 0) {
const many = imp.bank.length > 1;
messages.push(`Caught ${many ? 'some' : 'an'} impling${many ? 's' : ''}, you received: ${imp.bank}`);
userStatsBankUpdate(user.id, 'passive_implings_bank', imp.bank);

Check warning on line 90 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check warning on line 90 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
await transactItems({ userID: user.id, itemsToAdd: imp.bank, collectionLog: true });
}
}
Expand Down Expand Up @@ -118,9 +118,9 @@
const otherLoot = new Bank().add(MysteryBoxes.roll());
const bonusLoot = new Bank().add(loot).add(otherLoot);
messages.push(`<:mysterybox:680783258488799277> **You received 2x loot and ${otherLoot}.**`);
userStatsBankUpdate(user.id, 'doubled_loot_bank', bonusLoot);

Check warning on line 121 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check warning on line 121 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
await user.addItemsToBank({ items: bonusLoot, collectionLog: true });
updateBankSetting('trip_doubling_loot', bonusLoot);

Check warning on line 123 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check warning on line 123 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
}
}
},
Expand All @@ -138,7 +138,7 @@
bonusLoot.add(PekyTable.roll());
}
}
userStatsBankUpdate(user.id, 'peky_loot_bank', bonusLoot);

Check warning on line 141 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check warning on line 141 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
messages.push(
`<:peky:787028037031559168> Peky flew off and got you some seeds during this trip: ${bonusLoot}.`
);
Expand All @@ -149,7 +149,7 @@
for (let i = 0; i < rolls; i++) {
bonusLoot.add(RuneTable.roll());
}
userStatsBankUpdate(user.id, 'obis_loot_bank', bonusLoot);

Check warning on line 152 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check warning on line 152 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
messages.push(
`<:obis:787028036792614974> Obis did some runecrafting during this trip and got you: ${bonusLoot}.`
);
Expand All @@ -160,7 +160,7 @@
for (let i = 0; i < rolls; i++) {
bonusLoot.add(WoodTable.roll());
}
userStatsBankUpdate(user.id, 'brock_loot_bank', bonusLoot);

Check warning on line 163 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check warning on line 163 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
messages.push(
`<:brock:787310793183854594> Brock did some woodcutting during this trip and got you: ${bonusLoot}.`
);
Expand All @@ -171,7 +171,7 @@
for (let i = 0; i < rolls; i++) {
bonusLoot.add(WilvusTable.roll());
}
userStatsBankUpdate(user.id, 'wilvus_loot_bank', bonusLoot);

Check warning on line 174 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check warning on line 174 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
messages.push(
`<:wilvus:787320791011164201> Wilvus did some pickpocketing during this trip and got you: ${bonusLoot}.`
);
Expand All @@ -183,7 +183,7 @@
bonusLoot.add(MysteryBoxes.roll());
}
}
userStatsBankUpdate(user.id, 'smokey_loot_bank', bonusLoot);

Check warning on line 186 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check warning on line 186 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
if (bonusLoot.length > 0) {
messages.push(
`<:smokey:787333617037869139> Smokey did some walking around while you were on your trip and found you ${bonusLoot}.`
Expand All @@ -195,7 +195,7 @@
for (let i = 0; i < minutes / 2; i++) {
bonusLoot.add(DougTable.roll());
}
userStatsBankUpdate(user.id, 'doug_loot_bank', bonusLoot);

Check warning on line 198 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check warning on line 198 in src/lib/util/handleTripFinish.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
messages.push(`Doug did some mining while you were on your trip and got you: ${bonusLoot}.`);
break;
}
Expand Down Expand Up @@ -311,13 +311,14 @@
}
}
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;
Expand Down
10 changes: 10 additions & 0 deletions tests/unit/snapshots/banksnapshots.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions tests/unit/snapshots/clsnapshots.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading