31 inline int32 RANDOM(int32 minV, int32 maxV) {
35 inline int32 diceRoll(
int dice,
int sides,
int perDieMod,
int base) {
38 for (
int i = 0; i <
ABS(dice); i++)
39 rv += (RANDOM(1, sides) + perDieMod * (dice > 0 ? 1 : -1));
55 int32 roll(int32 resist = 0) {
56 return diceRoll(_dice, _side, resist, 0);
uint32 getRandomNumber(uint maxNum)
Definition: ags.h:109
T ABS(T x)
Definition: util.h:56