RPG Dice RollerRPG Dice Roller
Home
Guide
API
  • Contributing
  • Code of Conduct
GitHub
Home
Guide
API
  • Contributing
  • Code of Conduct
GitHub
  • API

    • Introduction
    • ComparePoint
    • Description
    • DiceRoll
    • DiceRoller
    • RollGroup
  • dice

    • FudgeDice
    • PercentileDice
    • StandardDice
  • exceptions

    • CompareOperatorError
    • DataFormatError
    • DieActionValueError
    • NotationError
    • RequiredArgumentError
  • modifiers

    • ComparisonModifier
    • CriticalFailureModifier
    • CriticalSuccessModifier
    • DropModifier
    • ExplodeModifier
    • KeepModifier
    • MaxModifier
    • MinModifier
    • Modifier
    • ReRollModifier
    • SortingModifier
    • TargetModifier
    • UniqueModifier
    • modifier-flags
  • parser

    • Parser
  • results

    • ResultGroup
    • RollResult
    • RollResults
  • traits

    • HasDescription
  • utilities

    • ExportFormats
    • NumberGenerator
    • math
    • utils

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:

  • 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

Edit this page
Last Updated: 07/02/2026, 21:45
Prev
DropModifier
Next
KeepModifier