m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-07-15 23:08:57 -0400
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-07-15 23:09:26 -0400
commit3e11f6c8268066068c45f4fd760516b8de4a4b28 (patch)
tree9983dd150812cd0c4bf40697312ca919ac382754 /README.md
parent80df0f9425e8b64b8a3fcca308cb784d02d52f62 (diff)
Add information about unary 'd'
Diffstat (limited to 'README.md')
-rw-r--r--README.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/README.md b/README.md
index 0ad6988..e2474b3 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,7 @@ games are supported. You can do things like:
* `XdY`: rolls `X` `Y`-sided dice (`1d6` is a single 6-sided die, `2d4` is two
4-sided dice).
+* `dX` is the same as `1dX` (so you can shorten `1d6` to `d6`).
* `dice +/- constant`: rolls the dice, adds/subtracts the constant.
* `dice +/- moreDice`: sums/takes the difference of the results of rolling
`dice` and `moreDice`.
@@ -51,6 +52,7 @@ ignored):
Die ::= <an integer>
| '(' Die ')'
| Die 'd' Die
+ | 'd' Die
| Die '+' Die
| Die '-' Die
| '-' Die
@@ -64,6 +66,7 @@ Semantics are defined in terms of the `pool` function.
equal to the result of rolling `E`. `pool` returns an array of `roll(D)`
numbers, each between 1 and `roll(E)`. *Note:* if `D` or `E` evaluates to a
negative number, the behavior is undefined.
+* `dD` is equivalent to `1dD`.
* `D+E` appends the dice pool generated by `E` to the dice pool generated by
`D`.
* `-D` returns the opposites of values generated by `D`.