Roll a number of dice, count results above a certain target.
Usage
- Format
-
pool(roll, poolSize, target[, extra[, fail[, explode[, limit]]]])
- Parameters
-
roll
: The formula to be tested.poolSize
: Number of times roll is evaluated.target
: Value to reach with roll to obtain a success.extra
: Optional. If specified represent the value to reach with roll to obtain an extra success.fail
: Optional. If specified represent the minimum value to reach with roll to avoid losing a success.explode
: Optional. If specified represent the value to reach with roll to obtain an extra roll.limit
: Optional. If specified represent the maximum number of extra roll. Set to 0 for unlimited extra rolls. - Returns
- Number of times that roll is evaluated greater than or equal to target.
Description
This is a generic function to handle dice pool test roll.
The value of roll is evaluated for poolSize times. Each time the value obtained is greater or equal to target, a success is achieved.
- If extra is specified and roll is evaluated greater or equal to it, an extra success is counted.
- If fail is specified and roll is evaluated lesser or equal to it, an success is lost.
- If explode is specified and roll is evaluated greater or equal to it, an extra roll is made.
- If limit is specified it represent the maximum number of extra rolls made triggering the explode rule.
The function return the number of success totalized.
Examples
Some results generated by pool(1d6, 5, 4)
.
[4!,2,1,4!,1] = 2 (each "!" denotes a success)
[5!,3,3,3,1] = 1
[4!,4!,3,6!,2] = 3
Some results generated by pool(1d6, 5, 4, 5, 1, 6, 1)
.
[5!!,3,3,3,1*] = 1 (each "*" denotes a lost success)
[4!,4!,3,6!!»6!!,2] = 6 (each "»" denotes an extra roll)
History
Supported since Quick Dice Roller 1.2.0
Optional parameters available since Quick Dice Roller 2.1.0
See also
Page last modified on January 31, 2015, at 11:20 PM