FudgeDice
FudgeDice ⇐ StandardDice
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:
RangeErrornonBlanks must be 1 or 2TypeErrormodifiers 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. |
fudgeDice.name ⇒ string
The name of the die.
Kind: instance property of FudgeDice
Returns: string - 'fudge'
fudgeDice.nonBlanks ⇒ number
The number of sides that each symbol (+, -) covers.
Kind: instance property of FudgeDice
Returns: number - 1 or 2
fudgeDice.sides ⇒ string
The number of sides the die has.
Kind: instance property of FudgeDice
Returns: string - 'F.2' or 'F.1'
fudgeDice.rollOnce() ⇒ RollResult
Roll a single die and return the value.
Kind: instance method of FudgeDice
Returns: RollResult - The value rolled