Qdr /

Shadowrun 4

Qdr.Shrun4 History

Hide minor edits - Show changes to output

Added lines 1-40:
(:title Shadowrun 4:)
(:category: Function :)
(:Summary: Perform a test using the '''Shadowrun 4ed''' system. :)
(:format: @@shrun4(roll, poolSize, target, rollAgain, failTarget)@@ :)
(:sinceVersion: 2.0.0 :)
(:lastVersion: 2.0.0 :)


! Usage
:Format: {$:format}

:Parameters: \
@@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''.\\

:Returns: Number of times that ''roll'' is evaluated greater than or equal to ''target''.

! Description
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".

! Examples
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)\\

! History
Supported since Quick Dice Roller {$:sinceVersion}\\
Page last modified on October 23, 2014, at 08:50 PM