Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Difficult dice expression

I am trying to figure out how to write an expression for a specific kind of roll. You roll d12, on a 12 you reroll and keep rerolling on 12s. When you finally get a roll less than 12 you calculate the result as (last roll) * (2 ^ (number of 12s rolled)). However if the first roll is 11 you roll again. If you get anything but 11 the result is 0. If you get an 11 the result is -1. pseudocode: d12 -> die; die? 1-10: die -> result 11: d12 -> die die? 11: -1 -> result 1-10 | 12: 0 -> result 12: 2 -> multiplier; d12 -> die A: die? 1-11: die * multiplier -> result 12: multiplier * 2 -> multiplier; d12 -> die; goto A Is there a way to express this?
1498734693
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
This would require the API(pro perk) to reuse dice results.