Hi Folks,
Im using this code to simulate a diceroll.
(set: $diceroll = Math.ceil(Math.random()*12))
I want to be able to set it so it will roll up to 12 like it does here but will not be able to land on numbers 1-6
if anyone can help i'd be really grateful, thanks!
Comments
Or set $diceroll to whatever, of course.
Tim
Why is rolling 1-12 important in this case?
6 + d6
rigged d12 - use 6 + d6 for an even distribution
rigged 2d6 - this is somewhat harder as 7 should be more common than 12
Try generating 0 to 20 and looking it up in this array: