Closed omegabytes closed 6 years ago
JavaScript has a max and min function I think so we could just roll two dice and take the max or min. We could add disadvantage and advantage as attributes of dice roll
What if I'm rolling something crazy? Like, 10 d 6? Do I have advantage on all of the rolls?
Hmm I don't know if you have advantage on anything other than d20 rolls but there are times when the user will want to reroll damage dice
For that you would want to store each dice result in an array and when the user rerolls update the array
I think that means you'll need to save the array of dice as an attribute to the session and keep the session open and prompt the user for a reroll intent or a cancel
it is strictly d20 rolls, much simpler
with advantage:
disadvantage is the opposite