Addition of ImmobileDamageBonus and ImmobileDamageResist effects.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user