Code:
public bool IsTargetDodged(IRole attacker, IRole attacked)
{
if (attacker == null || attacked == null) return true;
int nDodge = 0;
if (attacked is Character || attacked is DynamicNpc || (attacked is Monster && (attacked as Monster).IsBoss))
nDodge = 40;
int atkHit = attacker.AttackHitRate;
int atkdDodge = attacked.Dodge;
int hitRate = Math.Min(100, Math.Max(40, 100 + atkHit - nDodge - atkdDodge));
return !Calculations.ChanceCalc(hitRate);
}
atkHit will store the attacker hitrate, but how do I get this value?
The attacker hitrate is the addition of all items agility (except talismans and steed).
Example: If I'm wearing 2 level 140 beads, I'll get 202 hitrate (since each one will have +23 agility from the plus and +78 from the beads).
Sure, after that, the attacker hitrate isn't finished yet, you need to add the user Agility Points.
The attacker hit rate after all will be divided by three. So we have 125,33 hitrate points.
My tests were done with 175 Agility Points in my character (and by my experience with monks, since i've been one for years), the same I used in my full +12 monk
over the years in Conquer 2.0, I should say that the calculation is 99% correct.
So after all, I've got (202 + 175)/3 which will give me around 125 hit rate points. Great!
The attacked dodge, will be the target dodge for sure. A full +12 player got 104 dodge.
But, as you can see. We add 100 points to the Attacker Hit Rate, so we get 225 points, we subtract the nDodge and the attacked dodge, so we have remaining
a 81% hitrate. Which is very precise, as far as I remember from the gold times killing fires with triple hit #16
I never really took time looking at the public sources to see how they calculate it, but I'm pretty sure that this algorithm is worth a try.
If you guys try it out, please leave a feedback. I tested this with a monk and I'll be doing more tests later. If you guys think there is something wrong or there is something that might be improved, please tell me.
Hope it's useful since I didn't find any really useful guide out there.






