FudgeDice

FudgeDice ⇐ StandardDice

Represents a Fudge / Fate type die.

Kind: global class
Extends: StandardDice

new FudgeDice([nonBlanks], [qty], [modifiers], [description])

Create a FudgeDice instance.

Throws:

  • RangeError nonBlanks must be 1 or 2
  • TypeError modifiers must be valid
ParamTypeDefaultDescription
[nonBlanks]number2The number of sides each symbol should cover (1 or 2)
[qty]number1The number of dice to roll (e.g. 4)
[modifiers]Map.<string, Modifier> | Array.<Modifier> | Object | nullThe modifiers that affect the die
[description]Description | string | nullThe 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