Dice roll parser

This project is a fork of droll and extends its syntax for dice rolling. We mostly follow standard dice notation syntax (see the examples below). To see the results of the dice in a roll please view the console output.

Only show pass or fail


Result:

Examples

Roll a single die

Below we roll a single d6.

Roll multiple dice

Below we roll a d6 ten times and add upp the results.

Keep lowest values

Below we roll a d6 ten times and keep the five lowest rolls.

Keep highest values

Below we roll a d6 ten times and keep the five highest rolls.

Add a constant

Below we extend the roll from above by adding a constant. Please note that there is no space around the addition sign in this expression.

Multiply with a constant

Below we extend the roll from above by multiplying the dice roll with a constant.

Repeat rolls

Below we extend the roll from above by repeating the whole roll three times.

Combining multiple rolls

Below we extend the roll from above by adding it with another roll. Please note that the space before and after the addition/subtraction symbols is necessary for the parser to work.