CounterDiceRoll: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(Add A_CounterDiceRoll.)
 
No edit summary
Line 17: Line 17:
|seealso=
|seealso=
*[[CounterOp]]
*[[CounterOp]]
*[[Scratch]]
*[[SetCounter]]
*[[SetCounter]]
}}
}}

Revision as of 09:46, 13 February 2021

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
  • 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

No examples given.

Notes

No particular notes.

See also