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
- ExplodeModifier ⇐
ComparisonModifier- new ExplodeModifier([comparePoint], [compound], [penetrate])
- .order :
number - .compound ⇒
boolean - .name ⇒
string - .notation ⇒
string - .penetrate ⇒
boolean - .defaultComparePoint(_context) ⇒
array - .run(results, _context) ⇒
RollResults - .toJSON() ⇒
Object
new ExplodeModifier([comparePoint], [compound], [penetrate])
Create an ExplodeModifier instance
Throws:
TypeErrorcomparePoint must be aComparePointobject
| Param | Type | Default | Description |
|---|---|---|---|
| [comparePoint] | ComparePoint | | The comparison object |
| [compound] | boolean | false | Whether to compound or not |
| [penetrate] | boolean | false | Whether 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
| Param | Type | Description |
|---|---|---|
| _context | StandardDice | RollGroup | The 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
| Param | Type | Description |
|---|---|---|
| results | RollResults | The results to run the modifier against |
| _context | StandardDice | RollGroup | The 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