-
Notifications
You must be signed in to change notification settings - Fork 119
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
Scroll of cleansing saves 10% of herblore Secondaries #5806
base: bso
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps also just go through the BSO-specific herblore things and see if theres any situations this would be OP or shouldnt apply.
finalCost.remove(item.id, saved); | ||
const savedBank = new Bank(); | ||
savedBank.add(item.id, saved); | ||
userStatsBankUpdate(user.id, 'cleansing_scroll_bank', savedBank); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably unsound (prone to overwriting updates due to not awaiting), and you should do it with just 1 call.
Possibly like:
const savedBank = new Bank();
for (const item of items) {
const savings = new Bank();
cost.remove(savings);
savedBank.add(savings);
}
await userStatsBankUpdate(user.id, 'cleansing_scroll_bank', savedBank);
if (hasScroll) { | ||
str += ' Your scroll of cleansing enables you to save 10% of your secondaries.'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preferably just put this in the boosts array. We're moving away from the str +=
because its hard to keep track of formatting them.
merge bso into cleansingScroll
Revert "Cleansing scroll"
Revert "Revert "Cleansing scroll""
Fixing a nightmare of merging mistakes
Description:
Scroll of Cleansing was added with dungeoneering 3 years ago, and was never given a use. This use isn't too OP, but makes it do something a little useful at least. Scroll of cleansing saves 10% of secondaries for /mix command. Also added a /data to track how much the scroll has saved.
Changes:
src/mahoji/commands/mix.ts - Add a check for scroll of cleansing, and if found removes 10%(rounded down) of secondaries (using the secondaries filterable). Then updates cleansing_scroll_bank, and appends a short message saying the scroll of cleansing saved ingredients.
prisma/schema.prisma, src/lib/structures/MUserStats.ts - Added cleansing_scroll_bank
src/mahoji/lib/abstracted_commands/statCommand.ts - added /data command to view cleansing_scroll_bank
Other checks: