-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add KingGoldemar Sim #6188
Add KingGoldemar Sim #6188
Conversation
@@ -17,16 +17,16 @@ import type { Gear } from './Gear'; | |||
export const gpCostPerKill = (user: MUser) => | |||
user.gear.melee.hasEquipped(['Ring of charos', 'Ring of charos(a)'], false) ? 5_000_000 : 10_000_000; | |||
|
|||
export const calcDwwhChance = (users: MUser[]) => { | |||
const size = Math.min(users.length, 10); | |||
export const calcDwwhChance = (amount: number, hasROL: boolean) => { |
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.
The calcDwwhChance
function signature has changed, but this call still uses the old signature. Update the call to use the new parameters: calcDwwhChance(bossUsers.length, bossUsers.some(i => i.user.gear.melee.hasEquipped('Ring of luck')))
.
if (roll(calcDwwhChance(1, true))) { | ||
loot.add('Broken dwarven warhammer'); | ||
} | ||
loot.add(KingGoldemarLootTable.roll()); |
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 should be roll(quantity)
outside the loop, its a lot more efficient/faster as it doesnt need to create an object for every single iteration. If you must do it in a loop (not in this case here), the other way is: .roll(1, {targetBank: loot})
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.
It doesn't necessarily need to be inside the loop, I was just going off how the others are structured. Let me know if this change looks good and or you want me change the others aswell.
Description:
Changes:
/kill name: King Goldemar
calcDwwhChance
to be usable insidesimulatedKillables
so that variables only ever need updated once.simulatedKillable
beforeosjsMonster
inside kill.worker.ts to always prioritize custom logic first./kill
to prevent monsters like King Goldemar from showing twice.message
field toSimulatedKillable
interface. *See example image belowOther checks: