Vlek/roll-cli

Add dice "drop highest/lowest" (x) notation

Vlek opened this issue · 0 comments

Vlek commented

Add the ability to denote that a dice roll should be excluded if it is the highest or lowest value.

(Dice) X/x [count]

2d20X - Drop the highest value (like disadvantage in D&D 5e.)

2d20x - Drop the lowest value (like advantage in D&D 5e.)

4d6X3 - Drop the highest 3 values

5d20x4 - Drop the lowest 4 values.

Considerations:
In the event that we are asked to drop more dice than are available, should we throw an exception or simply give back 0? I'm leaning toward 0.