parse_dice_formula | R Documentation |
This is the main function to parse a string containing complex formula specifications for rolling dice.
parse_dice_formula(dice_formula)
dice_formula |
A string containing a dice formula, e.g. 1d6e2+1d4 |
The input can be a string containing specifications for multiple dice, e.g.:
1d6e6 -> roll 1 six-sided dice, explode on 6
1d6e6+2d4-1d10 -> Roll 1 six-sided dice, explode on 6, plus two 4-sided dice, subract one 10-sided dice
This is inspired by Avrae's bot syntax for rolling dice. See https://github.com/avrae/d20
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.