dropHighest: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "source>" to "syntaxhighlight>") |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
dropHighest(times, sides, ignore) | dropHighest(times, sides, ignore) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 16: | Line 16: | ||
|examples= | |examples= | ||
Roll ten twenty-sided dice, ignoring the highest five rolls. | Roll ten twenty-sided dice, ignoring the highest five rolls. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[t: dropHighest(10, 20, 5)] | [t: dropHighest(10, 20, 5)] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 22: | Line 22: | ||
Roll five ten-sided dice ignoring the highest two rolls, using variables. | Roll five ten-sided dice ignoring the highest two rolls, using variables. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: DiceTimes = 5] | [h: DiceTimes = 5] | ||
[h: DiceSides = 10] | [h: DiceSides = 10] |
Latest revision as of 23:59, 14 March 2023
dropHighest() Function
• Introduced in version 1.5.2
Generates random numbers to emulate dice rolls; returns the total of a dice roll that ignores a certain number of the highest dice rolled.
Usage
dropHighest(times, sides, ignore)
Parameters
times
- The number of times to roll the dice.sides
- The number of sides the dice possess.ignore
- The number of highest rolls that are ignored when totaling the roll.
Examples
Roll ten twenty-sided dice, ignoring the highest five rolls.
Returns a number than is between
[t: dropHighest(10, 20, 5)]
Returns a number that is between 5
and 100
, with a low average.
Roll five ten-sided dice ignoring the highest two rolls, using variables.
[h: DiceTimes = 5]
[h: DiceSides = 10]
[h: DiceIgnore = 2]
[t: dropHighest(DiceTimes, DiceSides, DiceIgnore)]
3
and 30
, with a low average.See Also
For another method of rolling dice, see Dice Expressions.
Version Changes
- 1.5.2 - Introduced