MinModifier

MinModifier ⇐ Modifier

A MinModifier causes die rolls under a minimum value to be treated as the minimum value.

Kind: global class
Extends: Modifier
See: MaxModifier for the opposite of this modifier
Since: 4.3.0

new MinModifier(min)

Create a MinModifier instance.

Throws:

  • TypeError min must be a number
ParamTypeDescription
minnumberThe minimum value

minModifier.order : number

The default modifier execution order.

Kind: instance property of MinModifier

minModifier.min ⇒ Number

The minimum value.

Kind: instance property of MinModifier

minModifier.min

Set the minimum value.

Kind: instance property of MinModifier
Throws:

  • TypeError min must be a number
ParamType
valuenumber

minModifier.name ⇒ string

The name of the modifier.

Kind: instance property of MinModifier
Returns: string - 'min'

minModifier.notation ⇒ string

The modifier's notation.

Kind: instance property of MinModifier

minModifier.run(results, _context) ⇒ RollResults

Run the modifier on the results.

Kind: instance method of MinModifier
Returns: RollResults - The modified results

ParamTypeDescription
resultsRollResultsThe results to run the modifier against
_contextStandardDice | RollGroupThe object that the modifier is attached to

minModifier.toJSON() ⇒ Object

Return an object for JSON serialising.

This is called automatically when JSON encoding the object.

Kind: instance method of MinModifier