Qdr /

Roll and Keep

Execute a Roll & Keep test.

Usage

Format
rak(roll, poolSize[, keep])
Parameters
roll: The formula to be tested.
poolSize: Number of times roll is evaluated.
keep: Optional. Number of roll to keep. If not specified is equal to poolSize
Returns
The sum of the best keep out of poolSize evaluations of roll.

Description

The formula roll is evaluated poolSize times, but only the best keep results are summed together and returned by the function. If keep is equal or greater to poolSize the function just sums up all the outcome of roll. The maximum allowed value for poolSize is 50.

Examples

The formula rak(1d6, 5) is the same as rak(1d6, 5, 5).
Some results generated by rak(1d6, 4, 3).
[1,6!,4!,3!] = 13 (the "!" mark the kept values)
[4!,1,2!,5!] = 11
[2,2!,6!,4!] = 12

History

Supported since Quick Dice Roller 1.2.0
Parameter keep become optional since Quick Dice Roller 2.0.0


Page last modified on October 06, 2014, at 02:15 PM