It's all about YOU
When working with this formula, understand that it is calculated in the manner that you are hit by the mob. It is up to you, the player, to avoid that hit.
Code:
Base Physical Avoid = DEX + LUK * 2
Base Magic Avoid = INT + LUK * 2
Code:
int calc_evar(int charAvoid, int mobACC, int charLevel, int mobLevel)
{
int avoidRate;
int difference;
avoidRate = (int)sqrt((double)charAvoid) - (int)sqrt((double)mobACC);
if(avoidRate < 0)
{
avoidRate = 0;
}
if(mobLevel > charLevel)
{
difference = 5 * (mobLevel - charLevel);
if(difference > avoidRate)
{
avoidRate = difference;
}
avoidRate -= difference;
}
return avoidRate;
}
so...
avoidRate = floor(sqrt(charAvoid)) - floor(sqrt(mobACC))
If avoid rate is lower than 0, make avoid rate equal to 0.
If the mob's level is higher than yours, reduce the avoid rate by 5 for every level.
If avoid rate is lower than 0, make avoid rate equal to 0
Facts taken from the formula:
- It is impossible for you to evade the enemy 100% of the time. Since your avoid cannot be higher than 9999 and because the mob's ACC cannot be higher than 9999, you can never avoid 100% of hits.
- Because everything is floored after calculating the square root, any avoid you get above 99 * 99 (9801) is worthless.
- Avoid gained in between perfect squares does jack squat for you. For example, going from 230 avoid to 245 avoid doesn't help you a damn bit because flooring the square root yields 15 either way.
Example:
You have 1050 avoid. The mob has 256 ACC. You are level 49. The mob is level 50.
avoidRate = floor(sqrt(1050)) - floor(sqrt(256)) = floor(32.40) - floor(16) = 32 - 16 = 16
If the avoid rate is below 0, make it 0. <-- doesn't apply
Because the mob's level is higher:
avoid reduction = 5 * (mobLevel - charLevel) = 5
final avoid rate = 16 - 5 = 11%
You would avoid the mob's hit 11% of the time.
Bookmarks