View Single Post
  #8  
Old 01-29-2019, 02:51 PM
Raev Raev is offline
Planar Protector


Join Date: Sep 2014
Posts: 2,290
Default

You are looking at Client::GetMitigation.

Code:
// this is the precise formula that Sony/DBG uses
// minus the drunkeness reduction (add this later)
int Client::GetAvoidance()
{
	int32 defense = GetSkill(SkillDefense);

	if (defense > 0)
	{
		defense = defense * 400 / 225;
	}

	return defense + (GetAGI() > 40 ? (GetAGI() - 40) * 8000 / 36000 : 0) 
+ itembonuses.AvoidMeleeChance;	//Item Mod 'Avoidence'
}
Warriors will have a base avoidance AC of 252 * 400 / 225 = 448 from defense skill. 150 agility improves avoidance AC by 150 * 8000 / 36000 = 33, which is about 7%. I think I got the 10% for when I ran the numbers on my Shaman, who only had 200 defense. Anyway, Agility is not worthless.

And all of that integer multiplication/division with non powers of 2 is really triggering me.

Edit: hmm, maybe they changed it after I read the code <shrg>
Last edited by Raev; 01-29-2019 at 02:56 PM..