Roll any number of dice on your command line, including modifiers!
Requrise node v8.x or higher.
$ node index.js roll1 [, roll2, ..., rollN]
Format your rolls as [integer]d[size][+ or -][modifier]
, such as 1d20+4
or 2d6-1
.
Assuming you alias roll
to node index.js
:
$ roll 1d20+6 2d6+4 1d6-1 1d4
11 = 1d20 (5) + 6
6 = 1d6 (1) + 1d6 (1) + 4
2 = 1d6 (3) + -1
1 = 1d4 (1) + 0