ExplodeModifier

ExplodeModifier ⇐ ComparisonModifier

An ExplodeModifier re-rolls dice that match a given test, and adds them to the results.

Kind: global class
Extends: ComparisonModifier
See: ReRollModifier if you want to replace the old value with the new, rather than adding

new ExplodeModifier([comparePoint], [compound], [penetrate])

Create an ExplodeModifier instance

Throws:

  • TypeError comparePoint must be a ComparePoint object
ParamTypeDefaultDescription
[comparePoint]ComparePointThe comparison object
[compound]booleanfalseWhether to compound or not
[penetrate]booleanfalseWhether to penetrate or not

explodeModifier.order : number

The default modifier execution order.

Kind: instance property of ExplodeModifier

explodeModifier.compound ⇒ boolean

Whether the modifier should compound the results or not.

Kind: instance property of ExplodeModifier
Returns: boolean - true if it should compound, false otherwise

explodeModifier.name ⇒ string

The name of the modifier.

Kind: instance property of ExplodeModifier
Returns: string - 'explode'

explodeModifier.notation ⇒ string

The modifier's notation.

Kind: instance property of ExplodeModifier

explodeModifier.penetrate ⇒ boolean

Whether the modifier should penetrate the results or not.

Kind: instance property of ExplodeModifier
Returns: boolean - true if it should penetrate, false otherwise

explodeModifier.defaultComparePoint(_context) ⇒ array

The default compare point definition

Kind: instance method of ExplodeModifier

ParamTypeDescription
_contextStandardDice | RollGroupThe object that the modifier is attached to

explodeModifier.run(results, _context) ⇒ RollResults

Run the modifier on the results.

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

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

explodeModifier.toJSON() ⇒ Object

Return an object for JSON serialising.

This is called automatically when JSON encoding the object.

Kind: instance method of ExplodeModifier