From a2134a55dbe546cb25391956b98aa1b6d3731eb9 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 29 Feb 2020 14:22:31 +0000 Subject: [PATCH] Addition of ImmobileDamageBonus and ImmobileDamageResist effects. --- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- .../scripts/handlers/EffectMasterHandler.java | 2 ++ .../effecthandlers/ImmobileDamageBonus.java | 32 +++++++++++++++++++ .../effecthandlers/ImmobileDamageResist.java | 32 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 4 ++- .../gameserver/model/actor/Creature.java | 7 ++++ .../gameserver/model/stats/Stat.java | 7 ++-- 90 files changed, 1200 insertions(+), 60 deletions(-) create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java create mode 100644 L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java create mode 100644 L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java index eeee25f75d..1aeadb9bef 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -178,6 +178,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt index d480168313..1acd9a9bae 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt @@ -149,7 +149,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java index c01ad8c681..49e9777716 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4383,6 +4383,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java index 1e2a81e3a4..6bd9bb0c04 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -281,9 +280,11 @@ public enum Stat STAT_BONUS_SPEED("statSpeed"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java index eeee25f75d..1aeadb9bef 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -178,6 +178,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt index d480168313..1acd9a9bae 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt @@ -149,7 +149,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java index c01ad8c681..49e9777716 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4383,6 +4383,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java index 1e2a81e3a4..6bd9bb0c04 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -281,9 +280,11 @@ public enum Stat STAT_BONUS_SPEED("statSpeed"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java index eeee25f75d..1aeadb9bef 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -178,6 +178,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt index d480168313..1acd9a9bae 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt @@ -149,7 +149,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java index baa6d8b8d9..11c7a5afd2 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4383,6 +4383,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java index 1e2a81e3a4..6bd9bb0c04 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -281,9 +280,11 @@ public enum Stat STAT_BONUS_SPEED("statSpeed"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java index fa7cbaf40c..c946aa3947 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -182,6 +182,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt index 9bd91e0781..08d4426656 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt @@ -153,7 +153,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java index baa6d8b8d9..11c7a5afd2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4383,6 +4383,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java index 804220c9dc..3169a93be9 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -282,9 +281,11 @@ public enum Stat CRAFTING_CRITICAL("craftingCritical"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; 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 40be12cc64..141bca50fc 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 @@ -184,6 +184,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} 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 c13bfb7e7d..5195e10161 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 @@ -155,7 +155,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java index feac9dcb60..8e636ff929 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4383,6 +4383,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java index 80d2def63e..3bf1e47c2e 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -287,9 +286,11 @@ public enum Stat CRAFTING_CRITICAL("craftingCritical"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; 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 599a1dd011..21d2f8e4e8 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 @@ -185,6 +185,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} 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 6588e71bf7..7abdb283c8 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 @@ -156,7 +156,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java index feac9dcb60..8e636ff929 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4383,6 +4383,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java index 9c03de1477..a52443d4a7 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -290,9 +289,11 @@ public enum Stat CRAFTING_CRITICAL("craftingCritical"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java index 599a1dd011..21d2f8e4e8 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -185,6 +185,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/skills/documentation.txt index 6588e71bf7..7abdb283c8 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/skills/documentation.txt @@ -156,7 +156,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java index feac9dcb60..8e636ff929 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4383,6 +4383,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java index 9c03de1477..a52443d4a7 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -290,9 +289,11 @@ public enum Stat CRAFTING_CRITICAL("craftingCritical"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java index c7ac2328c3..247354c068 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -185,6 +185,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt index 66475ff68e..ef67007b36 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt @@ -156,7 +156,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java index e3658e33d1..199a4ea3ca 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4382,6 +4382,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java index 9c03de1477..a52443d4a7 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -290,9 +289,11 @@ public enum Stat CRAFTING_CRITICAL("craftingCritical"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; 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 0ec64be129..3d583f4789 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 @@ -176,6 +176,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} 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 e33bd7da23..2cf4b61768 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 @@ -147,7 +147,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Creature.java index 4d841a5fe9..8e1d560346 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4372,6 +4372,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Stat.java index b04bcf1c3f..d26237d3ab 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -279,9 +278,11 @@ public enum Stat STAT_BONUS_SPEED("statSpeed"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/EffectMasterHandler.java index 0ec64be129..3d583f4789 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -176,6 +176,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/documentation.txt index e33bd7da23..2cf4b61768 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/documentation.txt @@ -147,7 +147,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Creature.java index 4d841a5fe9..8e1d560346 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4372,6 +4372,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/stats/Stat.java index b04bcf1c3f..d26237d3ab 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -279,9 +278,11 @@ public enum Stat STAT_BONUS_SPEED("statSpeed"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/EffectMasterHandler.java index 8632cc0c97..d7674d8cf3 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -177,6 +177,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/documentation.txt index ab9d3b4df4..b1e81daaf4 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/documentation.txt @@ -148,7 +148,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Creature.java index 7180587407..bf900b7b38 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4372,6 +4372,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/stats/Stat.java index 8a96395583..f08d1b6c00 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -284,9 +283,11 @@ public enum Stat STAT_BONUS_SPEED("statSpeed"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java index 2bcdbb3bbf..bf09ba570e 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -180,6 +180,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/skills/documentation.txt index e64cd31365..be99e0ea9b 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/skills/documentation.txt @@ -151,7 +151,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Creature.java index 027d4cc782..7675a63e88 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4385,6 +4385,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Stat.java index f942aa80e2..eab4fcdeef 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -300,9 +299,11 @@ public enum Stat STAT_BONUS_SPEED("statSpeed"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java index 2bcdbb3bbf..bf09ba570e 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -180,6 +180,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt index e64cd31365..be99e0ea9b 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt @@ -151,7 +151,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Creature.java index 027d4cc782..7675a63e88 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4385,6 +4385,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Stat.java index f942aa80e2..eab4fcdeef 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -300,9 +299,11 @@ public enum Stat STAT_BONUS_SPEED("statSpeed"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java index 5b695a9dd2..b077073c71 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -180,6 +180,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt index 2d317b82a4..ec61c8d9e4 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt @@ -151,7 +151,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java index e9bdc9fd4a..2cf891ab3f 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4384,6 +4384,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java index 91b4f12291..cd45d6aa15 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -302,9 +301,11 @@ public enum Stat STAT_BONUS_SPEED("statSpeed"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value; diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java index eeee25f75d..1aeadb9bef 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -178,6 +178,8 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("HpRegen", HpRegen::new); EffectHandler.getInstance().registerHandler("HpToOwner", HpToOwner::new); EffectHandler.getInstance().registerHandler("IgnoreDeath", IgnoreDeath::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageBonus", ImmobileDamageBonus::new); + EffectHandler.getInstance().registerHandler("ImmobileDamageResist", ImmobileDamageResist::new); EffectHandler.getInstance().registerHandler("ImmobilePetBuff", ImmobilePetBuff::new); EffectHandler.getInstance().registerHandler("InstantKillResist", InstantKillResist::new); EffectHandler.getInstance().registerHandler("JewelSlot", JewelSlot::new); diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java new file mode 100644 index 0000000000..f124e67e2d --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageBonus.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Bonus damage to immobile targets. + * @author Mobius + */ +public class ImmobileDamageBonus extends AbstractStatPercentEffect +{ + public ImmobileDamageBonus(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_BONUS); + } +} diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java new file mode 100644 index 0000000000..5a14501280 --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/ImmobileDamageResist.java @@ -0,0 +1,32 @@ +/* + * 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.stats.Stat; + +/** + * Resist damage while immobile. + * @author Mobius + */ +public class ImmobileDamageResist extends AbstractStatPercentEffect +{ + public ImmobileDamageResist(StatSet params) + { + super(params, Stat.IMMOBILE_DAMAGE_RESIST); + } +} diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt index 7ca4d4eac3..9eebcee3f8 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt @@ -149,7 +149,9 @@ Hp: Increases current HP by a static value. HpRegen: HP Regeneration stat. HpToOwner: DOT effect that absorbs HP over time. IgnoreDeath: Become undying. Hp cannot decrease below 1. -ImmobilePetBuff: Causes your pet to become immobolized. +ImmobileDamageBonus: Bonus damage to immobile targets. (l2jmobius) +ImmobileDamageResist: Resist damage while immobile. (l2jmobius) +ImmobilePetBuff: Causes your pet to become immobilized. InstantKillResist: Resist against Lethal strike. KarmaCount: Sets current Karma. KnockBack: Knocks back or knocks down target. diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java index 4d841a5fe9..8e1d560346 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -4372,6 +4372,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe getAI().clientStartAutoAttack(); + // ImmobileDamageBonus and ImmobileDamageResist effect bonuses. + if (target.isImmobilized()) + { + damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1); + damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1); + } + if (!reflect && !isDOT) { // RearDamage effect bonus. diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java index 1e2a81e3a4..6bd9bb0c04 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.stats; import java.util.NoSuchElementException; import java.util.OptionalDouble; import java.util.function.DoubleBinaryOperator; -import java.util.logging.Logger; import org.l2jmobius.gameserver.enums.AttributeType; import org.l2jmobius.gameserver.model.actor.Creature; @@ -281,9 +280,11 @@ public enum Stat STAT_BONUS_SPEED("statSpeed"), SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()), WORLD_CHAT_POINTS("worldChatPoints"), - ATTACK_DAMAGE("attackDamage"); + ATTACK_DAMAGE("attackDamage"), + + IMMOBILE_DAMAGE_BONUS("immobileBonus"), + IMMOBILE_DAMAGE_RESIST("immobileResist"); - static final Logger LOGGER = Logger.getLogger(Stat.class.getName()); public static final int NUM_STATS = values().length; private final String _value;