# Thread: How Mob ACC works

1. ## How Mob ACC works

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&#37; 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.

2. So it's ass backwards from the accuracy formula. Instead of getting a negative (your accuracy lower than their avoid) you get the positive (your avoid above their accuracy). Otherwise you're still penailized by level. Not bad. I like what KMS did by dumbing down the formulas. It's definitely a lot easier to calculator on our own as long as we know the monster's stats.

3. which calls for SP database.

4. I'm holding out on monsterbook.

5. But most Warriors would have incredibly low avoid, personally I'd have like 128 avoid, which means that I'm gonna get hit 100&#37; by anything that has 121 accuracy or higher.
Fiel, can we get a list of all monster accuracies? =D

6. ...you realize that someone with 400 avoid is only going to avoid getting hit an additional 9% of the time, right?

Edit: Oh wait, just looked at the avoid formula again. I guess it isn't too hard to get a couple thousand avoid as a non-STR based class.

7. Nice thing is, they (finally) gave STR a bonus other than raw damage - it can also add w.def (at 1.2 wdef per point)

Unfortunately they nerfed wdef (seriously Nexon? You thought wdef was too good, so you cut the effect in half from pre-BB?) so each point of STR is only worth 0.3 damage reduced. If you do have 1700+ str that's still a kinda decent 500 damage reduction.

Personally I was hoping they'd bring wdef up to equality (1 def = 1 damage) or better (1.5 damage? 2 damage?) but it looks like they just don't want there to be a way to reduce the ridiculous damage mobs do by wearing the right gear.

8. I'm sure the several hundred weapon defense from ZHelm, HTP, and other armor x 3 should add up to another 400-500 damage reduced.

9. Depends if they changed Shield Mastery to affect more than the shield itself (haven't heard anyone testing this skill - in GMS it only affects the shield's wdef/mdef, no other stats and no other equips) I guess.

And only really helps 1h Paladins. I guess if it does mean 300&#37; of all equipped wdef it might be a meaningful buff (like, 400 damage reduced due to shield mastery)

10. From what I've heard, it now affects all armor, but I haven't tested it myself. I don't see any reason for a Paladin to use a 2-handed weapon post-BB, anyway.

11. A picture I found a while back on Insoya
Maxed Shield Mastery for Paladins gives +200&#37; total defenses(or x300%), but I think it might not affect % defense on equips since I have +10% HP earrings on my Battlemage & Conversion didn't affect that.

Phys Def: 2102 x 300% = 6306 [short on def o.o?, doesn't affect % def on equips?]
Magic Def: 1080 x 300% = 3240 [this is right]

12. And I dunno why anyone would want to play a Shadower, before or after the Big Bang...

Interesting that it affects all defense though. Maybe I'll look into a decent 1h sword for post-BB damage whoring cause I'm sure as hell not gonna use 1h BWs. Taking off 1400~ damage per hit means nothing under level 90 or so will even damage me.ee

13. Great, thieves get all the avoid with their luk, and dex doesn't do squad for magic. Night lords can dodge all the attacks anywhere, mages should dodge magic semi efficiently, warriors have stance, so bowmen gotta go jump in and hug bodies?

Not nonetheless, thanks for the info Fiel, it's been what I'm looking for.

14. Pink Bean has 256 ACC. That should give you a good idea of how much ACC we're dealing with.

15. Thank god you said that. I was freaking out with seeing that I had, what, 1320 charAvoid at the moment, and assumed Lv. 50 mobs with 2500 Acc would still own my ass most of the time.

EDIT: Quick nooby math question: Just for my sanity of keeping things straight mentally, "flooring" something = truncating, correct?

16. Is it just me, or does this make it sound like it is obscenely easy to evade attacks?

EDIT: Wow, warriors really miss out on evade calculation. So do archers, to a lesser extent.

Thieves, however...

17. Officially: floor(x) equals to the largest (closest to positive infinity) value that is less than or equal to x and lies in .

So basically: Cut (remove) the part after the dot.

18. Ninja'd. o.o

19. So truncation is basically specific flooring? Makes sense. I was chopping off the end anyways, which is why I asked the question in the first place.

20. Another way to think of "floor" would be to round down. Always round down.

This is different from typecasting "int", though. "int" rounds toward zero whereas floor rounds down. That makes truncation different for values below zero. For the purposes of this calculation, though, floor and typecasting int do the same thing.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•