|
|
|
@ -19,6 +19,7 @@ import engine.net.client.msg.UpdateStateMsg;
@@ -19,6 +19,7 @@ import engine.net.client.msg.UpdateStateMsg;
|
|
|
|
|
import engine.objects.*; |
|
|
|
|
import engine.powers.DamageShield; |
|
|
|
|
import engine.powers.effectmodifiers.AbstractEffectModifier; |
|
|
|
|
import engine.powers.effectmodifiers.WeaponProcEffectModifier; |
|
|
|
|
import engine.server.MBServerStatics; |
|
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
|
|
|
|
|
@ -196,6 +197,8 @@ public enum CombatManager {
@@ -196,6 +197,8 @@ public enum CombatManager {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
checkForProc(attacker,target,weapon); |
|
|
|
|
|
|
|
|
|
//get delay for the auto attack job
|
|
|
|
|
long delay = 5000; |
|
|
|
|
|
|
|
|
@ -651,4 +654,20 @@ public enum CombatManager {
@@ -651,4 +654,20 @@ public enum CombatManager {
|
|
|
|
|
int masteryLevel = 0; |
|
|
|
|
return max * (pow(0.0124 * primary + 0.118 * (primary - 0.75), 0.5) + pow(0.0022 * secondary + 0.028 * (secondary - 0.75), 0.5) + 0.0075 * (focusLevel + masteryLevel)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void checkForProc(AbstractCharacter attacker, AbstractWorldObject target, Item weapon){ |
|
|
|
|
|
|
|
|
|
if(weapon == null) // cant proc without a weapon
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
for(Effect eff : weapon.effects.values()){ |
|
|
|
|
for(AbstractEffectModifier mod : eff.getEffectsBase().getModifiers()){ |
|
|
|
|
if(mod.modType.equals(mbEnums.ModType.WeaponProc)) |
|
|
|
|
if(ThreadLocalRandom.current().nextInt(0,101) < 6) |
|
|
|
|
((WeaponProcEffectModifier)mod).applyProc(attacker,target); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |