File: Util.em

Description: Utility functions
Last Modified: 1/22/2003

RandomDiceRoll(String dice_string)
Parameters:
Name | Type
dice_string | String
Explanation
Returns a random number according to the passed die roll string. This is standard NdS+X format. N=number of dies to roll, S=number of sides per die, X=integer to add(or subtract) after roll.
Here's some acceptable examples:
    4
    d4
    d6+6
    d6-2
    2d12
    2d8+12
    2d8-4
Return values
Valkyrie's pedantic wording: "returns an integer greater or equal to N+X and not more than N*S+X"

RandomInt(integer below_this_number)
Parameters:
Name | Type
below_this_number | Integer
Explanation
Returns a random integer below the passed parameter and greater or equal to zero.
Return values
returns integer R such that 0 less or equal to R less than below_this_number

If you know if any information is incorrect on these pages, mail your corrections to racalac@burdell.org

Copyright ©2003 David Carpman, all rights reserved. DO NOT REPRODUCE, MIRROR, ALTER, SPINDLE, MUTILATE, OR SIT ON.