Browse Source

Fix for CRIT_DAMAGE_EVASION chance calculation, thanks XavierElf.

_DS_ 15 years ago
parent
commit
1bc3ac8d3c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      L2_GameServer/java/net/sf/l2j/gameserver/skills/Formulas.java

+ 2 - 1
L2_GameServer/java/net/sf/l2j/gameserver/skills/Formulas.java

@@ -1666,7 +1666,8 @@ public final class Formulas
 			if (target == null)
 			if (target == null)
 				return true; // no effect
 				return true; // no effect
 			
 			
-			return target.getStat().calcStat(Stats.CRIT_DAMAGE_EVASION, 100, null, null) > Rnd.get(100);
+			// little weird, but remember what CRIT_DAMAGE_EVASION > 1 increase chances to _evade_ crit hits
+			return Rnd.get((int)target.getStat().calcStat(Stats.CRIT_DAMAGE_EVASION, 100, null, null)) > 100;
 		}
 		}
 		return success;
 		return success;
 	}
 	}