I made this because I wanted to have minimal input to do common dice related actions in Dungeons and Dragons.
- no input -> rolls a d20
- lone number (e.g. 6) -> rolls one dice with specified number of sides
- two numbers (e.g. 5 6) -> rolls 6 sided dice 5 times
- addition (e.g. 5 + 6) -> adds two numbers
- subtraction (e.g. 4 - 2) -> subtracts two numbers
- add and subtract with no first argument (e.g. + 5) -> operates on previous answer
>>> 5 6 + 1 20 -> total of 5 d6's and 1 d20
>>> 2 6 + 4 -> total of 2 d6's added to number 4