From 39226731ea63a4e5d6d7c24acaafb5897d9472ec Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 13 Sep 2017 13:48:50 +0000 Subject: [PATCH] Previous commit for Classic branch. --- .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/MagicalSkillPower.java | 31 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../gameserver/model/stats/Formulas.java | 1 + .../gameserver/model/stats/Stats.java | 1 + 5 files changed, 35 insertions(+) create mode 100644 L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MagicalSkillPower.java diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java index 6937db6e10..624993425c 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -183,6 +183,7 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("MagicalDamOverTime", MagicalDamOverTime::new); EffectHandler.getInstance().registerHandler("MagicalDefence", MagicalDefence::new); EffectHandler.getInstance().registerHandler("MagicalEvasion", MagicalEvasion::new); + EffectHandler.getInstance().registerHandler("MagicalSkillPower", MagicalSkillPower::new); EffectHandler.getInstance().registerHandler("MagicalSoulAttack", MagicalSoulAttack::new); EffectHandler.getInstance().registerHandler("MagicCriticalDamage", MagicCriticalDamage::new); EffectHandler.getInstance().registerHandler("MagicCriticalRate", MagicCriticalRate::new); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MagicalSkillPower.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MagicalSkillPower.java new file mode 100644 index 0000000000..4ce11cd502 --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/MagicalSkillPower.java @@ -0,0 +1,31 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package handlers.effecthandlers; + +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.stats.Stats; + +/** + * @author Mobius + */ +public class MagicalSkillPower extends AbstractStatEffect +{ + public MagicalSkillPower(StatsSet params) + { + super(params, Stats.MAGICAL_SKILL_POWER); + } +} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt index b76b1a3494..701d781f76 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt @@ -151,6 +151,7 @@ MagicalAttackSpeed: Casting Spd. stat MagicalDamOverTime: Magical attack over time. MagicalDefence: M. Def stat. MagicalEvasion: M. Evasion stat. +MagicalSkillPower: Magical Skill Power stat. (l2jmobius) MagicalSoulAttack: Magical attack based on souls formula. MagicCriticalDamage: Magical Critical Damage stat MagicCriticalRate: Magical Critical Rate stat. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Formulas.java index bc9430b32d..1f8ae64dd0 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -204,6 +204,7 @@ public final class Formulas } damage = damage * critMod * generalTraitMod * attributeMod * randomMod * pvpPveMod; + damage = attacker.getStat().getValue(Stats.MAGICAL_SKILL_POWER, damage); return damage; } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Stats.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Stats.java index b09b3e01f8..ee04033d04 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Stats.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Stats.java @@ -107,6 +107,7 @@ public enum Stats MAGIC_CRITICAL_DAMAGE("mCritPower"), PHYSICAL_SKILL_POWER("physicalSkillPower"), // Adding skill power (not multipliers) results in points added directly to final value unmodified by defence, traits, elements, criticals etc. // Even when damage is 0 due to general trait immune multiplier, added skill power is active and clearly visible (damage not being 0 but at the value of added skill power). + MAGICAL_SKILL_POWER("magicalSkillPower"), CRITICAL_DAMAGE_SKILL("cAtkSkill"), CRITICAL_DAMAGE_SKILL_ADD("cAtkSkillAdd"), MAGIC_CRITICAL_DAMAGE_ADD("mCritPowerAdd"),