PercentileDice
StandardDice
PercentileDice ⇐ Represents a percentile die.
Kind: global class
Extends: StandardDice
- PercentileDice ⇐
StandardDice
- new PercentileDice([qty], [modifiers], [sidesAsNumber], [description])
- .name ⇒
string
- .sides ⇒
number
|string
new PercentileDice([qty], [modifiers], [sidesAsNumber], [description])
Create a PercentileDice
instance.
Throws:
TypeError
qty must be a positive integer, and modifiers must be valid
Param | Type | Default | Description |
---|---|---|---|
[qty] | number | 1 | The number of dice to roll (e.g. 4 ) |
[modifiers] | Map.<string, Modifier> | Array.<Modifier> | Object | null |
| The modifiers that affect the die |
[sidesAsNumber] | boolean | false | Whether to show the sides as % (default) or 100 |
[description] | Description | string | null |
| The roll description. |
string
percentileDice.name ⇒ The name of the die.
Kind: instance property of PercentileDice
Returns: string
- 'percentile'
number
| string
percentileDice.sides ⇒ The number of sides the die has
Kind: instance property of PercentileDice
Returns: number
| string
- %
if sidesAsNumber == false
, or 100
otherwise