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

MaxModifier

MaxModifier ⇐ Modifier

A MaxModifier causes die rolls over a maximum value to be treated as the maximum value.

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

  • MaxModifier ⇐ Modifier
    • new MaxModifier(max)
    • .order : number
    • .max ⇒ Number
    • .max
    • .name ⇒ string
    • .notation ⇒ string
    • .run(results, _context) ⇒ RollResults
    • .toJSON() ⇒ Object

new MaxModifier(max)

Create a MaxModifier instance.

Throws:

  • TypeError max must be a number
ParamTypeDescription
maxnumberThe maximum value

maxModifier.order : number

The default modifier execution order.

Kind: instance property of MaxModifier

maxModifier.max ⇒ Number

The maximum value.

Kind: instance property of MaxModifier

maxModifier.max

Set the maximum value.

Kind: instance property of MaxModifier
Throws:

  • TypeError max must be a number
ParamType
valuenumber

maxModifier.name ⇒ string

The name of the modifier.

Kind: instance property of MaxModifier
Returns: string - 'max'

maxModifier.notation ⇒ string

The modifier's notation.

Kind: instance property of MaxModifier

maxModifier.run(results, _context) ⇒ RollResults

Run the modifier on the results.

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

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

maxModifier.toJSON() ⇒ Object

Return an object for JSON serialising.

This is called automatically when JSON encoding the object.

Kind: instance method of MaxModifier

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