dice-typescript
dice-typescript copied to clipboard
A TypeScript library for parsing dice rolling expressions, most commonly used in tabletop RPGs.
In the section describing implementation of custom functions, a type `ErrorMessage[]` is referenced. Should be `InterpreterError[]`.
Happens for some cases such as: `6d10>=7\s` - This somehow produces a `sa` thing for the dice roll. 6d10>=7 \s [2,3,8,9,10,10]>=7sa🎲 4(2) = 42
Roll20 allows it, so I think this lib also should. The main reason I did this is because I use the lib in a mobile app and my text inputs...
The change in #22 added a check to explode/reroll condition to verify if the condition included all dice results (if that was allowed if would make explodes/rerolls forever). Roll20 don't...