Addition of FatalBlowDefence effect.

Contributed by Sahar.
This commit is contained in:
MobiusDevelopment
2020-06-20 10:10:29 +00:00
parent 640840c2a3
commit cedd794473
81 changed files with 552 additions and 32 deletions

View File

@@ -140,6 +140,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);

View File

@@ -0,0 +1,31 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author Sahar
*/
public class FatalBlowRateDefence extends AbstractStatEffect
{
public FatalBlowRateDefence(StatSet params)
{
super(params, Stat.BLOW_RATE_DEFENCE);
}
}

View File

@@ -111,6 +111,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
FakeDeath: Plays dead to avoid enemy NPC aggression.
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
FatalBlowRate: Blow land rate stat.
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
Fear: Causes the target to run away. Does not block it though.
Feed: Gives food to pet.
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)

View File

@@ -1094,8 +1094,9 @@ public class Formulas
final double criticalPosition = calcCriticalPositionBonus(creature, target); // 30% chance from back, 10% chance from side. Include buffs that give positional crit rate.
final double chanceBoostMod = (100 + chanceBoost) / 100;
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
final double blowRateDefenseMod = target.getStat().getValue(Stat.BLOW_RATE_DEFENCE, 1);
final double rate = criticalPosition * critHeightBonus * weaponCritical * chanceBoostMod * blowRateMod;
final double rate = criticalPosition * critHeightBonus * weaponCritical * chanceBoostMod * blowRateMod * blowRateDefenseMod;
// Blow rate is capped at 80%
return Rnd.get(100) < Math.min(rate, 80);

View File

@@ -127,6 +127,7 @@ public enum Stat
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
DEFENCE_CRITICAL_RATE("defCritRate"),
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),