ExplodeModifier
ComparisonModifier
ExplodeModifier ⇐ 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:
TypeError
comparePoint must be aComparePoint
object
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 |
number
explodeModifier.order : The default modifier execution order.
Kind: instance property of ExplodeModifier
boolean
explodeModifier.compound ⇒ Whether the modifier should compound the results or not.
Kind: instance property of ExplodeModifier
Returns: boolean
- true
if it should compound, false
otherwise
string
explodeModifier.name ⇒ The name of the modifier.
Kind: instance property of ExplodeModifier
Returns: string
- 'explode'
string
explodeModifier.notation ⇒ The modifier's notation.
Kind: instance property of ExplodeModifier
boolean
explodeModifier.penetrate ⇒ Whether the modifier should penetrate the results or not.
Kind: instance property of ExplodeModifier
Returns: boolean
- true
if it should penetrate, false
otherwise
array
explodeModifier.defaultComparePoint(_context) ⇒ The default compare point definition
Kind: instance method of ExplodeModifier
Param | Type | Description |
---|---|---|
_context | StandardDice | RollGroup | The object that the modifier is attached to |
RollResults
explodeModifier.run(results, _context) ⇒ 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 |
Object
explodeModifier.toJSON() ⇒ Return an object for JSON serialising.
This is called automatically when JSON encoding the object.
Kind: instance method of ExplodeModifier