MinModifier
MinModifier ⇐ Modifier
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:
TypeErrormin must be a number
| Param | Type | Description |
|---|---|---|
| min | number | The minimum value |
minModifier.order : number
The default modifier execution order.
Kind: instance property of MinModifier
minModifier.min ⇒ Number
The minimum value.
Kind: instance property of MinModifier
minModifier.min
Set the minimum value.
Kind: instance property of MinModifier
Throws:
TypeErrormin must be a number
| Param | Type |
|---|---|
| value | number |
minModifier.name ⇒ string
The name of the modifier.
Kind: instance property of MinModifier
Returns: string - 'min'
minModifier.notation ⇒ string
The modifier's notation.
Kind: instance property of MinModifier
minModifier.run(results, _context) ⇒ RollResults
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 |
minModifier.toJSON() ⇒ Object
Return an object for JSON serialising.
This is called automatically when JSON encoding the object.
Kind: instance method of MinModifier