Dice¶
-
Roll
(dice, sides, bonus, times)¶ Rolls arbitrary dice.
Parameters: - dice (int) – Number of dice to roll
- sides (int) – Number of sides the dice have
- bonus (int) – Bonus added to roll
- times (int) – Number of times to do roll.
-
DetermineBestDiceRoll
(roll1, roll2)¶ Determines the highest maximum roll. This selects based on the maximum value of the dice roll.
Parameters: - roll1 (
DiceRoll
) – Dice roll. - roll2 (
DiceRoll
) – Dice roll.
- roll1 (
-
IsValid
(roll)¶ Determines if roll is valid.
A roll is considered valid if dice and sides are greater than zero or the bonus is.
Parameters: - roll (
DiceRoll
) – Dice roll.
- roll (
-
DoRoll
(roll, times)¶ Do a dice roll.
Parameters: - roll (
DiceRoll
) – Dice roll. - times (int) – Number of times to do roll.
- roll (
-
DiceRollToString
(roll)¶ Converts a dice roll to formatted string.
Parameters: - roll (
DiceRoll
) – Dice roll.
- roll (
-
d2
(count)¶ Rolls a d2
Parameters: - count (int) – Number of dice to roll.
-
d3
(count)¶ Rolls a d3
Parameters: - count (int) – Number of dice to roll.
-
d4
(count)¶ Rolls a d4
Parameters: - count (int) – Number of dice to roll.
-
d6
(count)¶ Rolls a d6
Parameters: - count (int) – Number of dice to roll.
-
d8
(count)¶ Rolls a d8
Parameters: - count (int) – Number of dice to roll.
-
d10
(count)¶ Rolls a d10
Parameters: - count (int) – Number of dice to roll.
-
d12
(count)¶ Rolls a d12
Parameters: - count (int) – Number of dice to roll.
-
d20
(count)¶ Rolls a d20
Parameters: - count (int) – Number of dice to roll.
-
d100
(count)¶ Rolls a d100
Parameters: - count (int) – Number of dice to roll.