[Retribution] Issue in Mitigation

Topics: Retired
Dec 1, 2008 at 10:11 AM
Hi,

Seen green level 68 weapon above Naxxramas Heroics, make me think there are some error in weight calculation.As these weapon having only armor penetration and no other stats make me look at the following code :

            #region Mitigation
            {
                float targetArmor = calcOpts.BossArmor, totalArP = stats.ArmorPenetration;

                // Effective armor after ArP
                targetArmor -= totalArP;
                float ratingCoeff = stats.ArmorPenetrationRating / 15.4f;
                targetArmor *= ( 1 - ratingCoeff);
                if ( targetArmor < 0 ) targetArmor = 0f;

                // Convert armor to mitigation
                //mitigation = 1f - (targetArmor/(targetArmor + 10557.5f));
                mitigation = 1f - targetArmor / ( targetArmor + 400f + 85f * ( 5.5f * (float)calcOpts.TargetLevel - 265.5f ) );
            }
            #endregion

I think the error is in the : 
                float ratingCoeff = stats.ArmorPenetrationRating / 15.4f;
                targetArmor *= ( 1 - ratingCoeff);

Rating are Percent and then must be divide per 100 to make a correct calculation of the target armor. Correcting to
                float ratingCoeff = stats.ArmorPenetrationRating / 15.4f;
                targetArmor *= ( 1 - ratingCoeff / 100);
seems to make better results in my opinion.

Another option is to modify this line to reflect the method use for the other calculation :
                float ratingCoeff = stats.ArmorPenetrationRating / 1540f;
                targetArmor *= ( 1 - ratingCoeff);

Faerian
Coordinator
Dec 2, 2008 at 11:45 AM
Thanks, I've made this change, will be in the next release.