genDice

Generates a set of dice from a string.

Supports various modifiers. rolls# = Number of sets of dice -/+count/ = Count only the x highest or lowest dice dsides = Number of sides on each die w-/+ = Whether to skew the dice values negatively or positively rnum = Reroll dice above/below this value

No modifiers is the same as just specifying number of sides. Defaults to 1 set containing 1 unweighted die with six sides.

@safe
genDice
(
string str
,
uint seed = unpredictableSeed()
)

Parameters

str string

string input

seed uint

seed used to initialize the dice

Examples

auto rolls = genDice("2d8r1").roll();

Meta