Negative damage on some hits


  • retired

    [quote] Continued with a different bug - When shooting arrows, I hit him with 3. Out of them, 2 did the normal damage, however, 1 did NEGATIVE damage, and actually healed him. So, just a thought on why that happened? [/quote] OK this happens VERY rarely, but for some reason in the calculation for damage, every once in a long while you actually hit for negative damage. Very weird. I put some tracking in the logfiles that looks like this:

    damage right before hurting: negative dam, ch a black kitten, damage -12, dt 217, dam_type 20, victim Thorin

    I ran th rough the code about a million times and can't see what is causing it. We could put in a hack to set the damage to positive, but I would rather resolve the problem. Areo, can you have a look at this section of the code and see if you can spot anything that I didn't?

  • registered

    While on the topic of DAMAGE… you might want to check into the problem with having negative DAMROLL. The code (according to what I've seen on stat mob) performs a log() on the damroll and massages it to get the effective damroll. Well, if you have negative damrolls, that causes log() to go undefined, reading as infinite. I assume the code puts a cap on this as I've only seen reports of the damage being ~5k damage per HIT.

Log in to reply