diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java index b48a67e771..a31b4b1961 100644 --- a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -336,6 +336,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("SpModify", SpModify::new); EffectHandler.getInstance().registerHandler("Spoil", Spoil::new); EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new); + EffectHandler.getInstance().registerHandler("StatAddForMp", StatAddForMp::new); EffectHandler.getInstance().registerHandler("StatBonusSkillCritical", StatBonusSkillCritical::new); EffectHandler.getInstance().registerHandler("StatBonusSpeed", StatBonusSpeed::new); EffectHandler.getInstance().registerHandler("StatByMoveType", StatByMoveType::new); diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/StatAddForMp.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/StatAddForMp.java new file mode 100644 index 0000000000..a163cfe2b1 --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/StatAddForMp.java @@ -0,0 +1,49 @@ +/* + * 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 org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.effects.AbstractEffect; +import org.l2jmobius.gameserver.model.skills.Skill; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author Mobius + */ +public class StatAddForMp extends AbstractEffect +{ + private final int _mp; + private final Stat _stat; + private final double _amount; + + public StatAddForMp(StatSet params) + { + _mp = params.getInt("mp", 0); + _stat = params.getEnum("stat", Stat.class); + _amount = params.getDouble("amount", 0); + } + + @Override + public void pump(Creature effected, Skill skill) + { + if (effected.getMaxMp() >= _mp) + { + effected.getStat().mergeAdd(_stat, _amount); + } + } +} diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_8.0_Homunculus/dist/game/data/stats/skills/documentation.txt index d56dc74f05..fcf9bbe6a8 100644 --- a/L2J_Mobius_8.0_Homunculus/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/stats/skills/documentation.txt @@ -304,6 +304,7 @@ SphericBarrier: Blocks damage and buff/debuff incoming from outside the specifie SpModify: Bonus SP stat. Spoil: Spoils a mob activating its extra sweep drop. StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius) +StatAddForMp: Adds a fixed amount of a Stat for when player max MP is over a value. (l2jmobius) StatBonusSkillCritical: Changes skill critical rate to depend on the specified base stat. StatBonusSpeed: Changes Speed stat to depend on the specified base stat. StatByMoveType: Adds stat based on your movement type (standing, running, walking). diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java index 28f4e7ce99..a380c3eb2a 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -333,6 +333,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("SpModify", SpModify::new); EffectHandler.getInstance().registerHandler("Spoil", Spoil::new); EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new); + EffectHandler.getInstance().registerHandler("StatAddForMp", StatAddForMp::new); EffectHandler.getInstance().registerHandler("StatBonusSkillCritical", StatBonusSkillCritical::new); EffectHandler.getInstance().registerHandler("StatBonusSpeed", StatBonusSpeed::new); EffectHandler.getInstance().registerHandler("StatByMoveType", StatByMoveType::new); diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/StatAddForMp.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/StatAddForMp.java new file mode 100644 index 0000000000..a163cfe2b1 --- /dev/null +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/StatAddForMp.java @@ -0,0 +1,49 @@ +/* + * 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 org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.effects.AbstractEffect; +import org.l2jmobius.gameserver.model.skills.Skill; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author Mobius + */ +public class StatAddForMp extends AbstractEffect +{ + private final int _mp; + private final Stat _stat; + private final double _amount; + + public StatAddForMp(StatSet params) + { + _mp = params.getInt("mp", 0); + _stat = params.getEnum("stat", Stat.class); + _amount = params.getDouble("amount", 0); + } + + @Override + public void pump(Creature effected, Skill skill) + { + if (effected.getMaxMp() >= _mp) + { + effected.getStat().mergeAdd(_stat, _amount); + } + } +} diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt index d3af3b8fda..8fec4baa04 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt @@ -302,6 +302,7 @@ SpiritExpModify: Spirit EXP modify stat effect. (JoeAlisson) SpModify: Bonus SP stat. Spoil: Spoils a mob activating its extra sweep drop. StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius) +StatAddForMp: Adds a fixed amount of a Stat for when player max MP is over a value. (l2jmobius) StatBonusSkillCritical: Changes skill critical rate to depend on the specified base stat. StatBonusSpeed: Changes Speed stat to depend on the specified base stat. StatByMoveType: Adds stat based on your movement type (standing, running, walking).