fudge: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) (Initial write-up.) |
Verisimilar (talk | contribs) m (Corrected example.) |
||
Line 21: | Line 21: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: DiceTimes = 5] | [h: DiceTimes = 5] | ||
[t: fudge(DiceTimes | [t: fudge(DiceTimes)] | ||
</source> | </source> | ||
Returns a number than is between {{code|-5}} and {{code|5}}. | Returns a number than is between {{code|-5}} and {{code|5}}. |
Revision as of 15:20, 14 April 2009
fudge() Function
Generates random numbers to emulate dice rolls; returns the total of a special Fudge dice roll. When these dice are rolled, the result is
-1
, 0
, or 1
, this function then sums up all of the dice rolled and returns that sum.Usage
fudge(times)
Parameters
times
- The number of times to roll the dice.
Examples
Roll ten special Fudge dice.
Returns a number than is between
[t: fudge(10)]
Returns a number that is between -10
and 10
.
Roll five special Fudge dice, using variables.
[h: DiceTimes = 5]
[t: fudge(DiceTimes)]
-5
and 5
.See Also
For another method of rolling dice, see Dice Expressions.