FORUM ARCHIVED

Damage Calculation is Wonky

Discussion in 'Bugs' started by RaustBlackDragon, Feb 19, 2012.

  1. I was just starting over, giving my omnidisciplinary warrior build another go, when I noticed something... odd... about the damage system. I was under the impression that damage calculation for melee went something like this:

    *Take all inflicted damage types, add melee power to whichever of the mundane damage types you would be doing the most of.

    *Subtract resistances, and then subtract armor absorb from the highest-value mundane damage type remaining. (and maybe if there's spillover resistance, apply to remaining mundane damage types)

    *Inflict the resulting damage values.

    However, it appears that's not how things are happening. I've been dual-wielding a club and axe (with both mace and axe skill at level 1), meaning I have damage values of 4 crushing, and 4 slashing. I also have +5 melee power. If the damage calculations worked by the system outlined above, or anything similar, I should expect to do either 9 slashing, 4 crushing, or vice versa. I'm not. I'm doing 4 crushing, 4 slashing.

    I'm assuming that there's some sort of hidden armor absorb or something, because the rest of my findings are not consistent with melee power merely not working, and of course I know it does work, I'd notice if it didn't at higher levels.

    The second thing I noticed was that when duck and cover activated, reducing my melee power by 1, I went from doing 4 + 4 damage to 3 + 3 damage. In other words, melee power seems to have been applying to BOTH damage types.

    This made me think that maybe it was an issue with the two damage types being tied, and thus both being the "highest", and the game maybe applied melee power to both. I continued thinking this until I came across a ring of +2 blasting. I put it on, expecting to do 2 more damage to my enemies. Instead, I got this (top two messages are from before putting on the blasting ring, the bottom two are after. Nothing else changed in the meantime, I attacked the same enemy, and duck and cover didn't kick in.)

    Whatthe.png

    Now, the ring only added +2 to my blasting power, and I've checked dredmorpedia (which accesses the game's files) and am reasonably sure that diggles don't have negative resistance to blasting.

    What I THINK is happening is that the takes the mundane damage types, adds them together, adds melee power, subtracts armor absorb, checks which mundane damage types you do, divides the total damage by that number, and then ditches the remainder.

    This results in some pretty wonky rounding errors. Not only was there the duck and cover incident outlined above, but there's also the fact that a +2 blasting ring SHOULD be making me deal 2 more damage, but 4*2 is 8, and 3*3 is 9, meaning that this rounding bug has chopped off an entire precious point of damage, which really REALLY counts in the early game.

    Just thought I'd put this out there. It has little to no impact late game, but early game it's really REALLY odd and worrisome.
     
    blob and r_b_bergstrom like this.