Explorar el Código

Fix for CRIT_DAMAGE_EVASION chance calculation, thanks XavierElf.

_DS_ hace 15 años
padre
commit
1bc3ac8d3c
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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)
 				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;
 	}