Closed ATLUSio closed 1 month ago
There are two eslint errors, i've dug them out of the details for you, it does not like the extra parenthesis
2028:25 error Replace `(Math.random()·/·dropModifier)` with `Math.random()·/·dropModifier` prettier/prettier
Is that even necessary? I added the extra parenthesis for clarity because the alternative was:
&& Math.random() / share / player.luckm / monster.level / monster_mult < item[0])
so between that and
let dropModifier = share / player.luckm / monster.level / monster_mult;
let itemShouldDrop = (Math.random() / dropModifier) < item[0];
which do you think is more friendly?
Is that even necessary? I added the extra parenthesis for clarity because the alternative was:
&& Math.random() / share / player.luckm / monster.level / monster_mult < item[0])
so between that and
let dropModifier = share / player.luckm / monster.level / monster_mult; let itemShouldDrop = (Math.random() / dropModifier) < item[0];
which do you think is more friendly?
Just as an alternative point to ponder. For readability these days I'm tending towards putting the more isolated variable to the left.
let dropModifier = share / player.luckm / monster.level / monster_mult;
let itemShouldDrop = item[0] > Math.random() / dropModifier;
or a less pleasant
&& item[0] > Math.random() / share / player.luckm / monster.level / monster_mult)
more extreme shorten
let dropModifier = share / player.luckm / monster.level / monster_mult;
let dropChance = Math.random() / dropModifier
// or let dropChance = Math.random() /share / player.luckm / monster.level / monster_mult;
let itemShouldDrop = item[0] > dropChance;
@permalost To be fair, I find the flip very confusing in this specific case.
But the idea of using another intermediary variable is a good solution, that's also what I suggested, yes.
monsters marked as temp were not rolling for drops if the odds were lesser than 1/100k (1/100,001 or higher).\ speaking with the community, it seems to be an intentionally crafted expression with unintended operational characteristics.\ a short-poll consensus seems the community is aligned that regardless of temp or non-temp, the monster's drops should adhere to its defined loot table.