diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_9.2_ReturnOfTheQueenAnt_Ch2/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_Essence_5.0_Sylph/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_Essence_5.0_Sylph/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_Essence_5.0_Sylph/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java index 5624fe4e60..7c30a1f160 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttack.java @@ -48,8 +48,8 @@ public class PhysicalAttack extends AbstractEffect private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; - private final Set _abnormals; + private final double _abnormalDamageMod; private final double _abnormalPowerMod; public PhysicalAttack(StatSet params) @@ -60,7 +60,6 @@ public class PhysicalAttack extends AbstractEffect _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); - final String abnormals = params.getString("abnormalType", null); if ((abnormals != null) && !abnormals.isEmpty()) { @@ -74,7 +73,8 @@ public class PhysicalAttack extends AbstractEffect { _abnormals = Collections. emptySet(); } - _abnormalPowerMod = params.getDouble("damageModifier", 1); + _abnormalDamageMod = params.getDouble("damageModifier", 1); + _abnormalPowerMod = params.getDouble("powerModifier", 1); } @Override @@ -147,10 +147,21 @@ public class PhysicalAttack extends AbstractEffect final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. + boolean hasAbnormalType = false; + if (!_abnormals.isEmpty()) + { + for (AbnormalType abnormal : _abnormals) + { + if (effected.hasAbnormalType(abnormal)) + { + hasAbnormalType = true; + break; + } + } + } + final double power = ((_power * (hasAbnormalType ? _abnormalPowerMod : 1)) + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0)); final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; - final double power = _power + effector.getStat().getValue(Stat.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; - final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) @@ -169,7 +180,7 @@ public class PhysicalAttack extends AbstractEffect // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; - damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; + damage = baseMod * (hasAbnormalType ? _abnormalDamageMod : 1) * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stat.PHYSICAL_SKILL_POWER, 1); }