## Qdr.Rolemaster History

Hide minor edits - Show changes to output

Changed line 29 from:

To avoid infinite loops, at least one outcome out of 3 of ''roll~~'' and ''newRoll~~'' should not explode, otherwise an error is generated and the function is not computed.

to:

To avoid infinite loops, at least one outcome out of 3 of ''roll'' should not explode, otherwise an error is generated and the function is not computed.

Added lines 1-46:

(:title Rolemaster:)

(:category: Function :)

(:Summary: Roll can explode accroding to '''Rolemaster''' rules. :)

(:format: @@rolemaster(roll[, target[, fumble[, limit]]])@@ :)

(:sinceVersion: 2.1.0 :)

(:lastVersion: 2.1.0 :)

{$:Summary}

! Usage

:Format: {$:format}

:Parameters: \

@@roll@@: A formula representing the dice to roll. Must be an indeterministic formula.\\

@@target@@: Optional. The value to reach to obtain an explosion. If not specified is equal to the maximum of ''roll''.\\

@@fumble@@: Optional. The value to overcome to avoid a fumble. If not specified is equal to the minimum of ''roll''.\\

@@limit@@: Optional. The maximum number of explosions. Set to 0 to make explosions limitless. If not specified is set to 0.

:Returns: The value of ''roll'', eventually exploded accroding to '''Rolemaster''' rules. Read the description for further details.

! Description

Makes an exploding roll accroding to the '''Rolemaster''' rules.

The value of ''roll'' is evaluated once. As long as its value is greater or equal to ''target'' then it is evaluated again (for a maximum of ''limit'' times) and added to the previous result.

If any of the outcome of ''roll'' is lesser or equal to ''fumble'' then it is evaluated again but the new result and all subsequent ones will be subtracted to the previous result instead of being added.

To avoid infinite loops, at least one outcome out of 3 of ''roll'' and ''newRoll'' should not explode, otherwise an error is generated and the function is not computed.

! Examples

The formula @@rolemaster(1d10)@@ is the same as @@rolemaster(1d10, 10, 1, 0)@@.\\

Some results generated by @@rolemaster(1d10, 10, 1, 0)@@:\\

[8] = 8\\

[10»3] = 13 (each "»" denotes an extra roll)\\

[1»-7] = -6\\

[10»1»-6] = 5\\

[1»-10»-3] = -12

! History

Supported since Quick Dice Roller {$:sinceVersion}\\

! See also

* [[Functions|+]]

* [[exp|+]]

* [[expUp|+]]

(:category: Function :)

(:Summary: Roll can explode accroding to '''Rolemaster''' rules. :)

(:format: @@rolemaster(roll[, target[, fumble[, limit]]])@@ :)

(:sinceVersion: 2.1.0 :)

(:lastVersion: 2.1.0 :)

{$:Summary}

! Usage

:Format: {$:format}

:Parameters: \

@@roll@@: A formula representing the dice to roll. Must be an indeterministic formula.\\

@@target@@: Optional. The value to reach to obtain an explosion. If not specified is equal to the maximum of ''roll''.\\

@@fumble@@: Optional. The value to overcome to avoid a fumble. If not specified is equal to the minimum of ''roll''.\\

@@limit@@: Optional. The maximum number of explosions. Set to 0 to make explosions limitless. If not specified is set to 0.

:Returns: The value of ''roll'', eventually exploded accroding to '''Rolemaster''' rules. Read the description for further details.

! Description

Makes an exploding roll accroding to the '''Rolemaster''' rules.

The value of ''roll'' is evaluated once. As long as its value is greater or equal to ''target'' then it is evaluated again (for a maximum of ''limit'' times) and added to the previous result.

If any of the outcome of ''roll'' is lesser or equal to ''fumble'' then it is evaluated again but the new result and all subsequent ones will be subtracted to the previous result instead of being added.

To avoid infinite loops, at least one outcome out of 3 of ''roll'' and ''newRoll'' should not explode, otherwise an error is generated and the function is not computed.

! Examples

The formula @@rolemaster(1d10)@@ is the same as @@rolemaster(1d10, 10, 1, 0)@@.\\

Some results generated by @@rolemaster(1d10, 10, 1, 0)@@:\\

[8] = 8\\

[10»3] = 13 (each "»" denotes an extra roll)\\

[1»-7] = -6\\

[10»1»-6] = 5\\

[1»-10»-3] = -12

! History

Supported since Quick Dice Roller {$:sinceVersion}\\

! See also

* [[Functions|+]]

* [[exp|+]]

* [[expUp|+]]

Page last modified on February 01, 2015, at 03:46 PM