CounterDiceRoll: Difference between revisions
From Eternity Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
:'''multiplyone''' or 0: roll for damage once then multiply by ''multiplier'' and add ''staticdmg'' | :'''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'' | :'''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) | |||
|seealso= | |seealso= | ||
*[[CounterOp]] | *[[CounterOp]] |
Latest revision as of 09:53, 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 (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.