FudgeDice
StandardDice
FudgeDice ⇐ Represents a Fudge / Fate type die.
Kind: global class
Extends: StandardDice
- FudgeDice ⇐
StandardDice
- new FudgeDice([nonBlanks], [qty], [modifiers], [description])
- .name ⇒
string
- .nonBlanks ⇒
number
- .sides ⇒
string
- .rollOnce() ⇒
RollResult
new FudgeDice([nonBlanks], [qty], [modifiers], [description])
Create a FudgeDice
instance.
Throws:
RangeError
nonBlanks must be 1 or 2TypeError
modifiers must be valid
Param | Type | Default | Description |
---|---|---|---|
[nonBlanks] | number | 2 | The number of sides each symbol should cover (1 or 2 ) |
[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 |
[description] | Description | string | null |
| The roll description. |
string
fudgeDice.name ⇒ The name of the die.
Kind: instance property of FudgeDice
Returns: string
- 'fudge'
number
fudgeDice.nonBlanks ⇒ The number of sides that each symbol (+, -) covers.
Kind: instance property of FudgeDice
Returns: number
- 1
or 2
string
fudgeDice.sides ⇒ The number of sides the die has.
Kind: instance property of FudgeDice
Returns: string
- 'F.2' or 'F.1'
RollResult
fudgeDice.rollOnce() ⇒ Roll a single die and return the value.
Kind: instance method of FudgeDice
Returns: RollResult
- The value rolled