CounterDiceRoll

From Eternity Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

Calculates damage numbers the same way that one might for a tabletop role-playing game, rolling multiple dice with a certain number of sides. This value is then assigned or added to a counter.

Usage

CounterDiceRoll(ctr, multiplier, dicesides, staticdmg, setoradd, randomtype)

Parameters

  • ctr: the counter to assign or add to (0 to 7)
  • multiplier: the multiplier of the dice outctome, or the number of dice to roll
  • dicesides: the number of sides each die has
  • staticdmg: static damage to add to the result regardless of dice roll outcome
  • setoradd: one of the following:
assign or 0: assigns the result of the calculation to ctr
add or 1: adds the result of the calculation to ctr
  • randomtype: one of the following:
multiplyone or 0: roll for damage once then multiply by multiplier and add staticdmg
rollmany or 1: roll for damage multiplier times, summing up the rolls, then add staticdmg

Examples

To set counter to a value between 3-24 with the same way occurrence as a melee imp attack:

A_CounterDiceRoll(0, 3, 8, 0, assign, multiplyone)

Notes

No particular notes.

See also