AC calculation

Posted by Gatz on Wed 27 Dec 2006 03:11 AM — 5 posts, 20,238 views.

#0
I've been milling over damage() function in fight.c. Where does AC figure into the damage? The only section I found where it seems AC is considered is:

if ( diceroll == 0
|| ( diceroll != 19 && diceroll < thac0 - victim_ac ) )
{
/* Miss. */
if ( prof_gsn != -1 )
learn_from_failure( ch, prof_gsn );
damage( ch, victim, 0, dt );
tail_chain( );
return rNONE;
}

Which only seems to apply to missing.
USA #1
Correct me if I'm wrong, but AC determines how hard it is to hit that character. It doesn't actually reduce damage. At least that's the typical armor class, like in D&D.
#2
I truly fail to see what you mean. So...AC is used to figure out the damage, not reduce it once it is figured out? So, do you mean my snippet of code is the only spot in fight.c where it uses AC or do you mean I am looking in the totally wrong spot to see where to use it?
USA #3
AC has nothing to do with damage. It basically determines if the character will dodge an attack (or the attack will miss).

So yes, the snippet of code you posted is the only part where it comes into play. I think. I didn't see it anywhere else.
USA #4
Basically, armor class is how good your armor is at deflecting a blow that would otherwise have hit you (combined with your own dexterity, etc to determine how good you are at dodging the blow). It's not about absorbing the blow or damage reduction or anything that would determine how much damage you take from the blow. That'd be a different factor, perhaps what you're after is Damage Reduction, which isn't currently built into Smaug, of some sort, or Damage Absorbing armor, which, again, doesn't exist in Smaug at this point?