-
Notifications
You must be signed in to change notification settings - Fork 66
Changing Critical Rolls to Display Amounts instead of differences #240
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
base: development
Are you sure you want to change the base?
Conversation
Development
…dice rolls show up correctly
So rollCrit should probably be isCrit. So there's actually a tricky thing involving handling roll formulas this way. So in the "dual roll" mode, if EITHER d20 roll procs a crit, it will show crit damage. If you click the apply damage button, it asks if you want to apply crit. If "no" is selected, it will need to apply the original roll rather than a maximized base roll. This is why the modes that maximize base moved the difference to the crit roll, because it needed a way to remember the base roll for non-crits. It needs a way to display or handle that use case before it can be used, unfortunately, since despite not using it myself, a draw for Better Rolls is that dual roll mode. One thought is to allow "downgrading" a crit with a - button to force not crit. Another thought is that if the mode is dual, it will show |
betterrolls5e/scripts/utils/utils.js
Outdated
baseRoll.evaluate(); | ||
critRoll.evaluate(); | ||
} | ||
return {baseRoll: baseRoll, critRoll:critRoll}; |
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 can be return { baseRoll, critRoll };
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.
does it make sense to keep the naming of the variables for clarity? Is there anyone you could message me on discord at N0obassassin#2047or email me at [email protected]?
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 am Supe on the foundry discord. And yeah, variables mostly seem clear. Clear is important.
Thinking a bit more on it and yeah, the tricky thing would be the user interface and handling the apply damage thing (as mentioned), but for the code listed, the only thing that would change is that there would also be an |
…l. Also changed rollCrit to isCrit, couldn't change it in constructDamageRoll due to it already being a const. Also removing baseRoll: baseRoll , critRoll: critRoll to just passing back {baseroll, critRoll}
Added another commit to make the recommended changes |
Show the actual amounts rolled for critical rolls instead of calculating differences as mentioned in #223. This will still need to be refactored for use with forced critical rolls but makes critical rolls a lot more straight forward.
@CarlosFdez I'm not sure if this is what you meant but please give me any feedback or change anything around.