[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  AC calculation
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

AC calculation

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Gatz   (17 posts)  [Biography] bio
Date Wed 27 Dec 2006 03:11 AM (UTC)
Message
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.

Owner of NarutoMUD, a fun and fast paced Naruto MUD!
Check it out at: http://narutofor.us/ today!
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #1 on Wed 27 Dec 2006 03:29 AM (UTC)
Message
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.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Gatz   (17 posts)  [Biography] bio
Date Reply #2 on Thu 28 Dec 2006 03:25 AM (UTC)
Message
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?

Owner of NarutoMUD, a fun and fast paced Naruto MUD!
Check it out at: http://narutofor.us/ today!
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #3 on Thu 28 Dec 2006 03:29 AM (UTC)
Message
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.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Conner   USA  (381 posts)  [Biography] bio
Date Reply #4 on Thu 28 Dec 2006 11:14 PM (UTC)
Message
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?

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


3,964 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]