diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java index 3c6cbb4bca..e7337fd7bc 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -121,6 +121,7 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("DeleteTopAgro", DeleteTopAgro::new); EffectHandler.getInstance().registerHandler("DetectHiddenObjects", DetectHiddenObjects::new); EffectHandler.getInstance().registerHandler("Detection", Detection::new); + EffectHandler.getInstance().registerHandler("DisableSkill", DisableSkill::new); EffectHandler.getInstance().registerHandler("DisableTargeting", DisableTargeting::new); EffectHandler.getInstance().registerHandler("Disarm", Disarm::new); EffectHandler.getInstance().registerHandler("Disarmor", Disarmor::new); @@ -129,6 +130,7 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("DispelBySlot", DispelBySlot::new); EffectHandler.getInstance().registerHandler("DispelBySlotMyself", DispelBySlotMyself::new); EffectHandler.getInstance().registerHandler("DispelBySlotProbability", DispelBySlotProbability::new); + EffectHandler.getInstance().registerHandler("DispelCaster", DispelCaster::new); EffectHandler.getInstance().registerHandler("DoubleCast", DoubleCast::new); EffectHandler.getInstance().registerHandler("DuelistFury", DuelistFury::new); EffectHandler.getInstance().registerHandler("EnableCloak", EnableCloak::new); diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/DisableSkill.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/DisableSkill.java new file mode 100644 index 0000000000..4bf47deed2 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/DisableSkill.java @@ -0,0 +1,80 @@ +/* + * 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 java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.effects.AbstractEffect; +import com.l2jmobius.gameserver.model.skills.Skill; + +/** + * @author Ofelin + */ +public class DisableSkill extends AbstractEffect +{ + private final Set disableSkills; + private Skill knownSKill; + + public DisableSkill(StatsSet params) + { + String disable = params.getString("disable"); + if ((disable != null) && !disable.isEmpty()) + { + disableSkills = new HashSet<>(); + for (String slot : disable.split(";")) + { + disableSkills.add(Integer.parseInt(slot)); + } + } + else + { + disableSkills = Collections. emptySet(); + } + } + + @Override + public void onStart(L2Character effector, L2Character effected, Skill skill) + { + for (int disableSkillId : disableSkills) + { + knownSKill = effected.getKnownSkill(disableSkillId); + if (knownSKill != null) + { + effected.disableSkill(knownSKill, 0); + + } + effected.disableSkill(skill, 0); + } + } + + @Override + public void onExit(L2Character effector, L2Character effected, Skill skill) + { + for (int enableSkillId : disableSkills) + { + knownSKill = effected.getKnownSkill(enableSkillId); + if (knownSKill != null) + { + effected.enableSkill(knownSKill); + } + } + } +} diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/DispelCaster.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/DispelCaster.java new file mode 100644 index 0000000000..7eaf99feaa --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/DispelCaster.java @@ -0,0 +1,78 @@ +/* + * 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 java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.effects.AbstractEffect; +import com.l2jmobius.gameserver.model.effects.L2EffectType; +import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; +import com.l2jmobius.gameserver.model.skills.AbnormalType; +import com.l2jmobius.gameserver.model.skills.Skill; + +/** + * @author Gnacik, Zoey76, Adry_85 + */ +public class DispelCaster extends AbstractEffect +{ + private final Set _dispelAbnormals; + + public DispelCaster(StatsSet params) + { + String dispel = params.getString("dispel"); + if ((dispel != null) && !dispel.isEmpty()) + { + _dispelAbnormals = new HashSet<>(); + for (String slot : dispel.split(";")) + { + _dispelAbnormals.add(AbnormalType.getAbnormalType(slot)); + } + } + else + { + _dispelAbnormals = Collections. emptySet(); + } + } + + @Override + public L2EffectType getEffectType() + { + return L2EffectType.DISPEL_BY_SLOT; + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item) + { + if (_dispelAbnormals.isEmpty()) + { + return; + } + + // The effectlist should already check if it has buff with this abnormal type or not. + effector.getEffectList().stopEffects(info -> !info.getSkill().isIrreplacableBuff() && _dispelAbnormals.contains(info.getSkill().getAbnormalType()), true, true); + } +} diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/10000-10099.xml b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/10000-10099.xml index c224d9bb81..51f8fdc9ae 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/10000-10099.xml +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/10000-10099.xml @@ -550,6 +550,9 @@ DIFF + + SIGEL_SHIELD + @@ -1313,7 +1316,7 @@ {base + subIndex} {base + 10 + 0.5 * subIndex} - PD_UP_SPECIAL + SIGEL_SHIELD ULTIMATE_DEFENCE 5 @@ -1417,6 +1420,9 @@ DIFF + + 10020;10021 + @@ -1562,87 +1568,22 @@ - - - 50 - 5 - - 85 - 90 - 95 - 99 - 100 - 102 - 104 - - icon.skill10020 - T - NONE - 50 - NONE - - - 1 - 5 - - - - 616 - 684 - 761 - 845 - 939 - 1044 - 1160 - - DIFF - - - - 35 - 40 - 45 - 50 - 50 - 50 - 50 - - PER - - - - 1232 - 1368 - 1522 - 1690 - 1878 - 2088 - 2320 - - DIFF - - - - - - 1 10 - {base + 0.5 * subIndex} - REFLECT_MAGIC_DD - icon.skill10021 + SIGEL_SHIELD + icon.skill10020 A2 - 5 + NONE - 20 - 21 - 23 - 24 - 25 - 26 - 27 + 58 + 61 + 63 + 66 + 69 + 72 + 75 500 2 @@ -1662,20 +1603,88 @@ + + + 50 + 60 + 70 + 80 + 90 + 100 + + PER + - 10 - 15 - 20 - 25 - 27 - 30 - 32 + 10 - - 50 - MAGIC + + + -100 + + PER + + + + + 1 + + 10 + {base + 0.5 * subIndex} + + SIGEL_SHIELD + icon.skill10021 + A2 + 5 + + 58 + 61 + 63 + 66 + 69 + 72 + 75 + + 500 + 2 + NONE + NONE + 0 + + 85 + 90 + 95 + 99 + + 60000 + SELF + SINGLE + + + + + + + 50 + 60 + 70 + 80 + 90 + 100 + + PER + + + + 10 + + + + + -100 + + PER diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/documentation.txt index 66f0b5f9d5..3b07c13bb9 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/documentation.txt @@ -90,6 +90,7 @@ DeleteHateOfMe: Has a chance to delete target's hate towards you. DeleteTopAgro: Has a chance to delete target's most hated from the list. DetectHiddenObjects: Finds hidden doors Detection: Detects hidden creatures. +DisableSkill: Disables effectors known skills specified by skill ID. (l2jmobius) DisableTargeting: Disables your target's ability to target. Disarm: Removes the weapon of target player. Disarmor: Removes the armor of target player. @@ -98,6 +99,7 @@ DispelByCategory: Removes given amount of target's effects from a BUFF/DEBUFF ca DispelBySlot: Removes given amount of target's effects by specified AbnormalType and maximum abnormal level. DispelBySlotMyself: Removes given amount of effects by specified AbnormalType DispelBySlotProbability: Removes given amount of effects by specified AbnormalType at a given rate. +DispelCaster: Removes given amount of effects from caster by specified AbnormalType. (l2jmobius) DoubleCast: Triggers Fire, Water, Wind, Earth stance and enables the ability to cast two skills at once. DuelistFury: Synergy effect for Faceoff effect. (l2jmobius) EnableCloak: See/unsee cloaks. diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java index 3c6cbb4bca..e7337fd7bc 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -121,6 +121,7 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("DeleteTopAgro", DeleteTopAgro::new); EffectHandler.getInstance().registerHandler("DetectHiddenObjects", DetectHiddenObjects::new); EffectHandler.getInstance().registerHandler("Detection", Detection::new); + EffectHandler.getInstance().registerHandler("DisableSkill", DisableSkill::new); EffectHandler.getInstance().registerHandler("DisableTargeting", DisableTargeting::new); EffectHandler.getInstance().registerHandler("Disarm", Disarm::new); EffectHandler.getInstance().registerHandler("Disarmor", Disarmor::new); @@ -129,6 +130,7 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("DispelBySlot", DispelBySlot::new); EffectHandler.getInstance().registerHandler("DispelBySlotMyself", DispelBySlotMyself::new); EffectHandler.getInstance().registerHandler("DispelBySlotProbability", DispelBySlotProbability::new); + EffectHandler.getInstance().registerHandler("DispelCaster", DispelCaster::new); EffectHandler.getInstance().registerHandler("DoubleCast", DoubleCast::new); EffectHandler.getInstance().registerHandler("DuelistFury", DuelistFury::new); EffectHandler.getInstance().registerHandler("EnableCloak", EnableCloak::new); diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/DisableSkill.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/DisableSkill.java new file mode 100644 index 0000000000..4bf47deed2 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/DisableSkill.java @@ -0,0 +1,80 @@ +/* + * 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 java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.effects.AbstractEffect; +import com.l2jmobius.gameserver.model.skills.Skill; + +/** + * @author Ofelin + */ +public class DisableSkill extends AbstractEffect +{ + private final Set disableSkills; + private Skill knownSKill; + + public DisableSkill(StatsSet params) + { + String disable = params.getString("disable"); + if ((disable != null) && !disable.isEmpty()) + { + disableSkills = new HashSet<>(); + for (String slot : disable.split(";")) + { + disableSkills.add(Integer.parseInt(slot)); + } + } + else + { + disableSkills = Collections. emptySet(); + } + } + + @Override + public void onStart(L2Character effector, L2Character effected, Skill skill) + { + for (int disableSkillId : disableSkills) + { + knownSKill = effected.getKnownSkill(disableSkillId); + if (knownSKill != null) + { + effected.disableSkill(knownSKill, 0); + + } + effected.disableSkill(skill, 0); + } + } + + @Override + public void onExit(L2Character effector, L2Character effected, Skill skill) + { + for (int enableSkillId : disableSkills) + { + knownSKill = effected.getKnownSkill(enableSkillId); + if (knownSKill != null) + { + effected.enableSkill(knownSKill); + } + } + } +} diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/DispelCaster.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/DispelCaster.java new file mode 100644 index 0000000000..7eaf99feaa --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/DispelCaster.java @@ -0,0 +1,78 @@ +/* + * 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 java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.effects.AbstractEffect; +import com.l2jmobius.gameserver.model.effects.L2EffectType; +import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; +import com.l2jmobius.gameserver.model.skills.AbnormalType; +import com.l2jmobius.gameserver.model.skills.Skill; + +/** + * @author Gnacik, Zoey76, Adry_85 + */ +public class DispelCaster extends AbstractEffect +{ + private final Set _dispelAbnormals; + + public DispelCaster(StatsSet params) + { + String dispel = params.getString("dispel"); + if ((dispel != null) && !dispel.isEmpty()) + { + _dispelAbnormals = new HashSet<>(); + for (String slot : dispel.split(";")) + { + _dispelAbnormals.add(AbnormalType.getAbnormalType(slot)); + } + } + else + { + _dispelAbnormals = Collections. emptySet(); + } + } + + @Override + public L2EffectType getEffectType() + { + return L2EffectType.DISPEL_BY_SLOT; + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item) + { + if (_dispelAbnormals.isEmpty()) + { + return; + } + + // The effectlist should already check if it has buff with this abnormal type or not. + effector.getEffectList().stopEffects(info -> !info.getSkill().isIrreplacableBuff() && _dispelAbnormals.contains(info.getSkill().getAbnormalType()), true, true); + } +} diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/10000-10099.xml b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/10000-10099.xml index c224d9bb81..51f8fdc9ae 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/10000-10099.xml +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/10000-10099.xml @@ -550,6 +550,9 @@ DIFF + + SIGEL_SHIELD + @@ -1313,7 +1316,7 @@ {base + subIndex} {base + 10 + 0.5 * subIndex} - PD_UP_SPECIAL + SIGEL_SHIELD ULTIMATE_DEFENCE 5 @@ -1417,6 +1420,9 @@ DIFF + + 10020;10021 + @@ -1562,87 +1568,22 @@ - - - 50 - 5 - - 85 - 90 - 95 - 99 - 100 - 102 - 104 - - icon.skill10020 - T - NONE - 50 - NONE - - - 1 - 5 - - - - 616 - 684 - 761 - 845 - 939 - 1044 - 1160 - - DIFF - - - - 35 - 40 - 45 - 50 - 50 - 50 - 50 - - PER - - - - 1232 - 1368 - 1522 - 1690 - 1878 - 2088 - 2320 - - DIFF - - - - - - 1 10 - {base + 0.5 * subIndex} - REFLECT_MAGIC_DD - icon.skill10021 + SIGEL_SHIELD + icon.skill10020 A2 - 5 + NONE - 20 - 21 - 23 - 24 - 25 - 26 - 27 + 58 + 61 + 63 + 66 + 69 + 72 + 75 500 2 @@ -1662,20 +1603,88 @@ + + + 50 + 60 + 70 + 80 + 90 + 100 + + PER + - 10 - 15 - 20 - 25 - 27 - 30 - 32 + 10 - - 50 - MAGIC + + + -100 + + PER + + + + + 1 + + 10 + {base + 0.5 * subIndex} + + SIGEL_SHIELD + icon.skill10021 + A2 + 5 + + 58 + 61 + 63 + 66 + 69 + 72 + 75 + + 500 + 2 + NONE + NONE + 0 + + 85 + 90 + 95 + 99 + + 60000 + SELF + SINGLE + + + + + + + 50 + 60 + 70 + 80 + 90 + 100 + + PER + + + + 10 + + + + + -100 + + PER diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/documentation.txt index 66f0b5f9d5..3b07c13bb9 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/documentation.txt @@ -90,6 +90,7 @@ DeleteHateOfMe: Has a chance to delete target's hate towards you. DeleteTopAgro: Has a chance to delete target's most hated from the list. DetectHiddenObjects: Finds hidden doors Detection: Detects hidden creatures. +DisableSkill: Disables effectors known skills specified by skill ID. (l2jmobius) DisableTargeting: Disables your target's ability to target. Disarm: Removes the weapon of target player. Disarmor: Removes the armor of target player. @@ -98,6 +99,7 @@ DispelByCategory: Removes given amount of target's effects from a BUFF/DEBUFF ca DispelBySlot: Removes given amount of target's effects by specified AbnormalType and maximum abnormal level. DispelBySlotMyself: Removes given amount of effects by specified AbnormalType DispelBySlotProbability: Removes given amount of effects by specified AbnormalType at a given rate. +DispelCaster: Removes given amount of effects from caster by specified AbnormalType. (l2jmobius) DoubleCast: Triggers Fire, Water, Wind, Earth stance and enables the ability to cast two skills at once. DuelistFury: Synergy effect for Faceoff effect. (l2jmobius) EnableCloak: See/unsee cloaks.