Roll a number of dice, count results above a certain target.
pool(roll, poolSize, target[, extra[, fail[, explode[, limit]]]])
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.
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.
The function return the number of success totalized.
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)
Supported since Quick Dice Roller 1.2.0
Optional parameters available since Quick Dice Roller 2.1.0