DropModifier
KeepModifier
DropModifier ⇐ A DropModifier
will "drop" (Remove from total calculations) dice from a roll.
Kind: global class
Extends: KeepModifier
See: KeepModifier for the opposite of this modifier
- DropModifier ⇐
KeepModifier
- new DropModifier([end], [qty])
- .order :
number
- .name ⇒
string
- .notation ⇒
string
- .rangeToDrop(_results) ⇒
Array.<number>
new DropModifier([end], [qty])
Create a DropModifier
instance.
Throws:
RangeError
End must be one of 'h' or 'l'TypeError
qty must be a positive integer
Param | Type | Default | Description |
---|---|---|---|
[end] | string | "l" | Either `h |
[qty] | number | 1 | The amount of dice to drop |
number
dropModifier.order : The default modifier execution order.
Kind: instance property of DropModifier
string
dropModifier.name ⇒ The name of the modifier.
Kind: instance property of DropModifier
Returns: string
- 'drop-l' or 'drop-h'
string
dropModifier.notation ⇒ The modifier's notation.
Kind: instance property of DropModifier
Array.<number>
dropModifier.rangeToDrop(_results) ⇒ Determine the start and end (end exclusive) range of rolls to drop.
Kind: instance method of DropModifier
Returns: Array.<number>
- The min / max range to drop
Param | Type | Description |
---|---|---|
_results | RollResults | The results to drop from |