MinModifier
Modifier
MinModifier ⇐ A MinModifier
causes die rolls under a minimum value to be treated as the minimum value.
Kind: global class
Extends: Modifier
See: MaxModifier for the opposite of this modifier
Since: 4.3.0
- MinModifier ⇐
Modifier
- new MinModifier(min)
- .order :
number
- .min ⇒
Number
- .min
- .name ⇒
string
- .notation ⇒
string
- .run(results, _context) ⇒
RollResults
- .toJSON() ⇒
Object
new MinModifier(min)
Create a MinModifier
instance.
Throws:
TypeError
min must be a number
Param | Type | Description |
---|---|---|
min | number | The minimum value |
number
minModifier.order : The default modifier execution order.
Kind: instance property of MinModifier
Number
minModifier.min ⇒ The minimum value.
Kind: instance property of MinModifier
minModifier.min
Set the minimum value.
Kind: instance property of MinModifier
Throws:
TypeError
min must be a number
Param | Type |
---|---|
value | number |
string
minModifier.name ⇒ The name of the modifier.
Kind: instance property of MinModifier
Returns: string
- 'min'
string
minModifier.notation ⇒ The modifier's notation.
Kind: instance property of MinModifier
RollResults
minModifier.run(results, _context) ⇒ Run the modifier on the results.
Kind: instance method of MinModifier
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
minModifier.toJSON() ⇒ Return an object for JSON serialising.
This is called automatically when JSON encoding the object.
Kind: instance method of MinModifier