Ask fellow adventurers how to stay alive in the deep, dark, dangerous dungeon below, or share your own accumulated wisdom.

Lair Larrikin

Posts: 26

Joined: Sunday, 22nd January 2017, 02:47

Priority (if you can't answer, then go down to the next)

What is the dice notation for Irradiate damage as a function of power?
What is the dice notation for max power Irradiate?
Which spells outdamage it, and which do not?

(Don't tell me if it is worth it or not; I want to find out for myself)

Spider Stomper

Posts: 242

Joined: Friday, 17th April 2015, 16:22

Irradiate is even weirder than most crawl spells for damage. It determines a max amount of damage it can do, which is 30 + (Power/2). It then splits that across six dice and rolls 6dSomething, such that the max damage is what it determined earlier.

Rounding here is not handled by flooring as you'd expect, but by a special function that randomly chooses a direction to round to based on which value would be closer. Specifically, it rounds up if a random number between 0 and the denominator is less than the remainder, and rounds down otherwise.

Irradiate's max power is 200, at which point it aims for a max of 130 damage. This has a 1/3 chance of doing 6d21 damage, and a 2/3 chance of doing 6d22 damage.

For this message the author Doesnt has received thanks: 2
Paperbell, ThreeInvisibleDucks

Lair Larrikin

Posts: 26

Joined: Sunday, 22nd January 2017, 02:47

2 questions:

Where is rounding applied? (Is it like when some stat is like 4.66, so it is treated as a 5 more often than a 4?)

What is flooring? (Is it rounding down no matter what?)

Spider Stomper

Posts: 242

Joined: Friday, 17th April 2015, 16:22

Yes and yes.

For this message the author Doesnt has received thanks:
Paperbell

Ziggurat Zagger

Posts: 6395

Joined: Tuesday, 30th October 2012, 19:06

Doesnt wrote:Irradiate is even weirder than most crawl spells for damage. It determines a max amount of damage it can do, which is 30 + (Power/2). It then splits that across six dice and rolls 6dSomething, such that the max damage is what it determined earlier.

Rounding here is not handled by flooring as you'd expect, but by a special function that randomly chooses a direction to round to based on which value would be closer. Specifically, it rounds up if a random number between 0 and the denominator is less than the remainder, and rounds down otherwise.

Irradiate's max power is 200, at which point it aims for a max of 130 damage. This has a 1/3 chance of doing 6d21 damage, and a 2/3 chance of doing 6d22 damage.

It's not really that weird for crawl, both "figure out the max damage and divide that among dice" and "randomly round up or down with greater chances depending on how close you are to that value" are pretty standard crawl functions.

Of the "standard" attack spells defined in zap-data, 21 use the max-damage method, and 28 use a "determine the number of dice directly from power" method. (calcdice_calculator and dicedef_calculator respectively)
All of which use the "round with better chances of the one that's closer to the actual value" when doing the dividing, which is used in many places, not just damage.

The "round with better chances of the one that's closer to the actual value" is pretty readily observable when watching the time it takes to attack, for example.
Spoiler: show
This high quality signature has been hidden for your protection. To unlock it's secret, send 3 easy payments of \$9.99 to me, by way of your nearest theta band or ley line. Complete your transmission by midnight tonight for a special free gift!