Perform a test using the Shadowrun 4ed system.
shrun4(roll, poolSize, target, rollAgain, failTarget)
roll
: Dice to roll, tipically 1d6.poolSize
: Number of times roll is evaluated.target
: Value to reach with roll to obtain a "hit".rollAgain
: Value to reach to obtain an extra roll.failTarget
: Value used to compute "Glitch" and "Critical Glitch", tipically 1.This function perform a test using the Shadowrun 4ed system.
The value of roll is evaluated (at least) poolSize times. Each time its value is greater or equal to target, a "hit" is counted.
If roll is evaluated greater or equal to rollAgain, then an extra roll is immediately done and counted as above. The extra rolls can be disabled using a value larger than the maximum of roll, i.e. using 7 if roll is 1d6.
Each time roll is evaluated lower or equal to failTarget, a "failure" is counted. If the number of "failures" is greater or equal to half of the total number of dice rolled, then the test is a "Glitch". If no "hit" where counted, the test is a "Critical Glitch".
Some results generated by shrun4(1d6, 3, 5, 6, 1)
:
[5!,4,4] = 1 (each "!" denotes a hit)
[5!,3,6!»6!»4] = 3 (each "»" denotes an extra roll)
[1,1,6!»3≡G] = 1 (the "G" indicate a Glitch)
[1,1,3≡C] = 0 (the "C" indicate a Critical Glitch)
Supported since Quick Dice Roller 2.0.0