MaxModifier
Modifier
MaxModifier ⇐ 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
Param | Type | Description |
---|---|---|
max | number | The maximum value |
number
maxModifier.order : The default modifier execution order.
Kind: instance property of MaxModifier
Number
maxModifier.max ⇒ 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
Param | Type |
---|---|
value | number |
string
maxModifier.name ⇒ The name of the modifier.
Kind: instance property of MaxModifier
Returns: string
- 'max'
string
maxModifier.notation ⇒ The modifier's notation.
Kind: instance property of MaxModifier
RollResults
maxModifier.run(results, _context) ⇒ Run the modifier on the results.
Kind: instance method of MaxModifier
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
maxModifier.toJSON() ⇒ Return an object for JSON serialising.
This is called automatically when JSON encoding the object.
Kind: instance method of MaxModifier