Crypt Cleanser

**Posts:** 689

**Joined:** Saturday, 12th December 2015, 23:54

### Post itt every time you lol at the airstrike damage formula

From Duvessa's spell guide:

Airstrike's damage fomula is 8+random2(random2(4)+floor(random2(power)/6)+floor(random2(power)/7)).

Yet, for all of this nested die rolling nonsense, the effect of power on damage is pretty straightforward:

each point of power past 6 gives you about +0.08 mean damage and about +0.32 max damage, and the median isn't much lower than the mean.

It's easy to replace this damage formula with something much simpler that retains roughly the same mean damage. You want a formula that looks like A + random2(B + div_rand_round(pow,C)). A gives you some constant damage. B > 1 gives you some amount of variability in the damage even at 0 power, and B needs to be at least 1 or the first C points of power won't do anything. C divides spellpower and controls how well the damage scales. Div_rand_round is in there to avoid integer division, which would give really ugly power breakpoints. From there it is just a matter of finding good constants to fit airstrike's mean damage well across all power levels.

Duvessa suggested 8 + random2(2 + div_rand_round(pow,7)) on irc. This is slightly stronger at low power and slightly worse at high power. You could just as easily use 8 + random2(1 + div_rand_round(pow,6)) if you wanted it to scale a little better (the average damage is a couple points higher at 200 power). Or, if you really want to get fancy about it, you can find some fraction that gets even closer to the current behavior and multiply power accordingly. The effect of spellpower on damage becomes much clearer with a formula of this type, and it's easy to understand what to tweak if you decide that the balance needs to be adjusted later.

You do not preserve some other properties of airstrike's damage formula, including:

- The first 6 points of power not doing anything (You can preserve this by making B = 0, but this behavior seems bad anyway)
- The big max damage and the long tail of the distribution
- The median damage being a few points lower than the mean damage
- The mode always being 8

tl;dr: replace airstrike's damage formula with 8 + random2(2 + div_rand_round(pow,7)) or similar.

- For this message the author Hellmonk has received thanks: 7
- duvessa, Lasty, Leszczynek, nago, Shard1697, Sprucery, VeryAngryFelid