Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
While you're here and you understand the code, can you change the
local rand = math.random()
below this to bemath.random(1, 100)
(like we're trying to use in the rest of the code?Would that remove the need for this /100 divisor?
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.
I can change/update it. May need to make some adjustments. I could remove /100 divisor but something similar will still be needed depending on which option you prefer.
xi.settings.main.CASKET_DROP_RATE = 0.10 Default Setting.
kupowersMMBPower and prowessCasketsPower are integers (effect:getPower())
Options:
I could change the casket droprate in settings to use 1-100 instead of a 0.0-1.0 float.
I could multiply the settings drop rate by 100 to convert it into an integer. (This is the code block right below the original commit that adds/clamps everything)
if math.random(1, 100) < utils.clamp((xi.settings.main.CASKET_DROP_RATE * 100) + kupowersMMBPower + prowessCasketsPower, 0, 100) then return true end
Whichever style/option you prefer.
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.
If it's a much wider change, then leave it as it is 👍