Addition of PhysicalSkillCriticalRate effect.
Contributed by nasseka.
This commit is contained in:
@@ -250,6 +250,7 @@ public class EffectMasterHandler
|
||||
EffectHandler.getInstance().registerHandler("PhysicalEvasion", PhysicalEvasion::new);
|
||||
EffectHandler.getInstance().registerHandler("PhysicalMute", PhysicalMute::new);
|
||||
EffectHandler.getInstance().registerHandler("PhysicalShieldAngleAll", PhysicalShieldAngleAll::new);
|
||||
EffectHandler.getInstance().registerHandler("PhysicalSkillCriticalRate", PhysicalSkillCriticalRate::new);
|
||||
EffectHandler.getInstance().registerHandler("PhysicalSkillPower", PhysicalSkillPower::new);
|
||||
EffectHandler.getInstance().registerHandler("PhysicalSoulAttack", PhysicalSoulAttack::new);
|
||||
EffectHandler.getInstance().registerHandler("PkCount", PkCount::new);
|
||||
|
@@ -47,7 +47,7 @@ public class EnergyAttack extends AbstractEffect
|
||||
public EnergyAttack(StatSet params)
|
||||
{
|
||||
_power = params.getDouble("power", 0);
|
||||
_criticalChance = params.getInt("criticalChance", 0);
|
||||
_criticalChance = params.getInt("criticalChance", 10);
|
||||
_ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false);
|
||||
_overHit = params.getBoolean("overHit", false);
|
||||
_chargeConsume = params.getInt("chargeConsume", 0);
|
||||
|
@@ -57,7 +57,7 @@ public class PhysicalAttack extends AbstractEffect
|
||||
_power = params.getDouble("power", 0);
|
||||
_pAtkMod = params.getDouble("pAtkMod", 1.0);
|
||||
_pDefMod = params.getDouble("pDefMod", 1.0);
|
||||
_criticalChance = params.getDouble("criticalChance", 0);
|
||||
_criticalChance = params.getDouble("criticalChance", 10);
|
||||
_ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false);
|
||||
_overHit = params.getBoolean("overHit", false);
|
||||
final String abnormals = params.getString("abnormalType", null);
|
||||
@@ -134,7 +134,7 @@ public class PhysicalAttack extends AbstractEffect
|
||||
}
|
||||
|
||||
double damage = 1;
|
||||
final boolean critical = Formulas.calcCrit(_criticalChance, effected, effector, skill);
|
||||
final boolean critical = Formulas.calcCrit(_criticalChance, effector, effected, skill);
|
||||
|
||||
if (defence != -1)
|
||||
{
|
||||
|
@@ -50,7 +50,7 @@ public class PhysicalAttackWeaponBonus extends AbstractEffect
|
||||
public PhysicalAttackWeaponBonus(StatSet params)
|
||||
{
|
||||
_power = params.getDouble("power", 0);
|
||||
_criticalChance = params.getDouble("criticalChance", 0);
|
||||
_criticalChance = params.getDouble("criticalChance", 10);
|
||||
_ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false);
|
||||
_overHit = params.getBoolean("overHit", false);
|
||||
_pDefMod = params.getDouble("pDefMod", 1.0);
|
||||
|
@@ -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 NasSeKa
|
||||
*/
|
||||
public class PhysicalSkillCriticalRate extends AbstractStatPercentEffect
|
||||
{
|
||||
public PhysicalSkillCriticalRate(StatSet params)
|
||||
{
|
||||
super(params, Stat.CRITICAL_RATE_SKILL);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user