All pastes #734407 Raw Edit

h

public text v1 · immutable
·published 2007-10-12 18:02 UTC
rendered paste body
Index: C:/Documents and Settings/Sparrowhawk/workspace/l2J/java/net/sf/l2j/gameserver/skills/Formulas.java
===================================================================
--- C:/Documents and Settings/Sparrowhawk/workspace/l2J/java/net/sf/l2j/gameserver/skills/Formulas.java	(revision 1213)
+++ C:/Documents and Settings/Sparrowhawk/workspace/l2J/java/net/sf/l2j/gameserver/skills/Formulas.java	(working copy)
@@ -1470,6 +1470,7 @@
 				return (int) target.calcStat(Stats.SLEEP_RES, 0, target, null);
 			case MUTE:
 			case FEAR:
+				return (int) target.calcStat(Stats.DERANGEMENT_RES, 0, target, null);
 			case BETRAY:
 			case AGGREDUCE_CHAR:
 				return (int) target.calcStat(Stats.DERANGEMENT_RES, 0, target, null);
@@ -1489,9 +1490,11 @@
 		switch (type)
 		{
 			case STUN:
+				return (int) (Math.sqrt(CONbonus[target.getCON()]) * 100 - 100);
 			case BLEED:
 				return (int) (Math.sqrt(CONbonus[target.getCON()]) * 100 - 100);
 			case POISON:
+				return (int) (Math.sqrt(MENbonus[target.getMEN()]) * 100 - 100);
 			case SLEEP:
 			case DEBUFF:
 			case WEAKNESS:
@@ -1499,6 +1502,7 @@
 			case ROOT:
 			case MUTE:
 			case FEAR:
+				return (int) (Math.sqrt(MENbonus[target.getMEN()]) * 100 - 100);
 			case BETRAY:
 			case CONFUSION:
 			case AGGREDUCE_CHAR:
@@ -1553,11 +1557,15 @@
 			* lvlDepend;
 		int statmodifier = -calcSkillStatModifier(type, target);
 		int resmodifier = -calcSkillResistance(type, target);
-
+			
 		int ssmodifier = 100;
-		if (bss) ssmodifier = 200;
-		else if (sps) ssmodifier = 150;
-		else if (ss) ssmodifier = 150;
+		if(skill.isMagic()) {
+			if (bss) ssmodifier = 200;
+			else if (sps) ssmodifier = 150;
+		}
+		else {
+			if (ss) ssmodifier = 150;
+		}
 
 		int rate = value + statmodifier + lvlmodifier + resmodifier;
 		if (skill.isMagic())