View Single Post
  #3  
Old 02-21-2009, 04:27 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

The reason we mult by 10 is so it's compatible with the item bonuses, which is clearly labeled in the comments right by it. You can either multiply it by 10 in the bonuses or in the combat code, either way it has to get done to combine them in one call but bonuses are called much less frequently than combat typically so it makes sense to put them in bonuses.

The problem was until recently it was divided by 100 instead of the 1250.. tho I'm not sure where the extra 250 is supposed to be coming from it should be 1000. So avoidance was 10x more powerful than it was supposed to be. Coupled with the fact that the hit chance calculation goes kinda low atm it's just a mess.

You take item avoidance where 10 = 1% and you take spell avoidance where 1 = 1%

Say you have capped avoidance at 100 and have evasive running at a 65% chance to be hit.

Code:
100 + (50 * 10)
100 + 500
600

65 - ((600 * 65) / 1000)
65 - (39000 / 1000)
65 - 39

26% chance to hit
That's how it should work but not how it was working which was more like:

Code:
100 + (50 * 10)
100 + 500
600

65 - ((600 * 65) / 100)
65 - (39000 / 100)
65 - 390

-325 < 5
5 % chance to hit
As to the original question: it will affect both but players are far more likely to have avoidance mods than npcs.
Reply With Quote