1 | # dice
|
2 |
|
3 | ```js
|
4 | // usage
|
5 | chance.d4()
|
6 | chance.d6()
|
7 | chance.d8()
|
8 | chance.d10()
|
9 | chance.d12()
|
10 | chance.d20()
|
11 | chance.d30()
|
12 | chance.d100()
|
13 | ```
|
14 |
|
15 | <p class="pullquote" data-pullquote='"Any dungeon master worth his weight in geldings goes nowhere without his 20 sided die."' markdown="1"></p>
|
16 |
|
17 | Return a value equal to the roll of a die.
|
18 |
|
19 | ```js
|
20 | chance.d20();
|
21 | => 13
|
22 |
|
23 | chance.d6();
|
24 | => 4
|
25 | ```
|
26 |
|
27 | These are just wrappers around natural() but are convenient for use by games.
|
28 |
|
29 | They return values between 1 and the number after the `d`, so `chance.d4()` returns 1, 2, 3, or 4, just like a 4 sided die would.
|