Thread: Game Mechanics: AC may not be working correctly
View Single Post
  #7  
Old 11-26-2013, 01:52 AM
Alecta Alecta is offline
VIP / Contributor


Join Date: Apr 2013
Location: Red '99
Posts: 271
Default

Disclaimer: I cant step through my debugger right now, it's late, and I am out of town for the week, so this information might be wrong.

The AC system isn't very clean, but from what I can tell:
  • The shield AC isnt handled any differently from normal AC
  • Soft caps arent in place (?)

These are both due to the fact that the "NPC hitting a target" code uses the AC variable (which is what is displayed client side) and doesnt use the RealAC variable (which is what takes into account soft caps, shield AC, etc).

Also, I'd ignore the #ac_test command since that simulates "Player attacking something" and not "NPC attacking something" - and those follow different code paths.

NPC::ProcessAttack -> Mob::MeleeMitigation -> defender->GetAC()
vs
Client::ProcessAttack -> Client::ThrowATKvAC_D20I -> defender->GetRealAC()

Off topic: I am curious if the Monk AC bonus is working properly all the time. It seems that due to the order the bonuses are calculated, it might not be.

Anyway, will post more when I have more time to dig into this.
Reply With Quote