Addition of FatalBlowDefence effect.
Contributed by Sahar.
This commit is contained in:
@@ -140,6 +140,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
31
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/FatalBlowRateDefence.java
vendored
Normal file
31
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/FatalBlowRateDefence.java
vendored
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -111,6 +111,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -111,6 +111,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
31
L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/FatalBlowRateDefence.java
vendored
Normal file
31
L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/FatalBlowRateDefence.java
vendored
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -111,6 +111,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -115,6 +115,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -117,6 +117,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -118,6 +118,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
31
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/FatalBlowRateDefence.java
vendored
Normal file
31
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/FatalBlowRateDefence.java
vendored
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -118,6 +118,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -118,6 +118,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1383,8 +1383,8 @@
|
|||||||
<abnormalLvl>
|
<abnormalLvl>
|
||||||
<value level="1">1</value>
|
<value level="1">1</value>
|
||||||
<value level="2">2</value>
|
<value level="2">2</value>
|
||||||
<value level="3">2</value> <!-- FIXME: AUTO GENERATED LEVEL -->
|
<value level="3">3</value>
|
||||||
<value level="4">2</value> <!-- FIXME: AUTO GENERATED LEVEL -->
|
<value level="4">4</value>
|
||||||
</abnormalLvl>
|
</abnormalLvl>
|
||||||
<abnormalTime>30</abnormalTime>
|
<abnormalTime>30</abnormalTime>
|
||||||
<abnormalType>REAL_TARGET</abnormalType>
|
<abnormalType>REAL_TARGET</abnormalType>
|
||||||
@@ -1402,8 +1402,8 @@
|
|||||||
<magicLvl>
|
<magicLvl>
|
||||||
<value level="1">78</value>
|
<value level="1">78</value>
|
||||||
<value level="2">80</value>
|
<value level="2">80</value>
|
||||||
<value level="3">80</value> <!-- FIXME: AUTO GENERATED LEVEL -->
|
<value level="3">80</value>
|
||||||
<value level="4">80</value> <!-- FIXME: AUTO GENERATED LEVEL -->
|
<value level="4">80</value>
|
||||||
</magicLvl>
|
</magicLvl>
|
||||||
<mpConsume>
|
<mpConsume>
|
||||||
<value level="1">55</value>
|
<value level="1">55</value>
|
||||||
@@ -1420,8 +1420,8 @@
|
|||||||
<BOW>
|
<BOW>
|
||||||
<value level="1">-12</value>
|
<value level="1">-12</value>
|
||||||
<value level="2">-16</value>
|
<value level="2">-16</value>
|
||||||
<value level="3">-16</value> <!-- FIXME: AUTO GENERATED LEVEL -->
|
<value level="3">-20</value>
|
||||||
<value level="4">-16</value> <!-- FIXME: AUTO GENERATED LEVEL -->
|
<value level="4">-24</value>
|
||||||
</BOW>
|
</BOW>
|
||||||
</effect>
|
</effect>
|
||||||
</effects>
|
</effects>
|
||||||
@@ -1718,7 +1718,6 @@
|
|||||||
<condition name="EquipWeapon">
|
<condition name="EquipWeapon">
|
||||||
<weaponType>
|
<weaponType>
|
||||||
<item>DUAL</item>
|
<item>DUAL</item>
|
||||||
<item>DUALBLUNT</item>
|
|
||||||
</weaponType>
|
</weaponType>
|
||||||
</condition>
|
</condition>
|
||||||
</conditions>
|
</conditions>
|
||||||
@@ -1767,7 +1766,7 @@
|
|||||||
<amount>10</amount>
|
<amount>10</amount>
|
||||||
<mode>PER</mode>
|
<mode>PER</mode>
|
||||||
</effect>
|
</effect>
|
||||||
<effect name="FatalBlowRate">
|
<effect name="FatalBlowRateDefence">
|
||||||
<amount>10</amount>
|
<amount>10</amount>
|
||||||
<mode>PER</mode>
|
<mode>PER</mode>
|
||||||
</effect>
|
</effect>
|
||||||
@@ -2981,10 +2980,6 @@
|
|||||||
<overHit>true</overHit>
|
<overHit>true</overHit>
|
||||||
<chanceBoost>200</chanceBoost>
|
<chanceBoost>200</chanceBoost>
|
||||||
</effect>
|
</effect>
|
||||||
<effect name="Lethal">
|
|
||||||
<fullLethal>0</fullLethal>
|
|
||||||
<halfLethal>10</halfLethal>
|
|
||||||
</effect>
|
|
||||||
</effects>
|
</effects>
|
||||||
</skill>
|
</skill>
|
||||||
<skill id="581" toLevel="4" name="Sand Cloud">
|
<skill id="581" toLevel="4" name="Sand Cloud">
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1766,7 +1766,7 @@
|
|||||||
<amount>10</amount>
|
<amount>10</amount>
|
||||||
<mode>PER</mode>
|
<mode>PER</mode>
|
||||||
</effect>
|
</effect>
|
||||||
<effect name="FatalBlowRate">
|
<effect name="FatalBlowRateDefence">
|
||||||
<amount>10</amount>
|
<amount>10</amount>
|
||||||
<mode>PER</mode>
|
<mode>PER</mode>
|
||||||
</effect>
|
</effect>
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1778,7 +1778,7 @@
|
|||||||
</amount>
|
</amount>
|
||||||
<mode>PER</mode>
|
<mode>PER</mode>
|
||||||
</effect>
|
</effect>
|
||||||
<effect name="FatalBlowRate">
|
<effect name="FatalBlowRateDefence">
|
||||||
<amount>
|
<amount>
|
||||||
<value level="1">10</value>
|
<value level="1">10</value>
|
||||||
<value level="2">20</value>
|
<value level="2">20</value>
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1778,7 +1778,7 @@
|
|||||||
</amount>
|
</amount>
|
||||||
<mode>PER</mode>
|
<mode>PER</mode>
|
||||||
</effect>
|
</effect>
|
||||||
<effect name="FatalBlowRate">
|
<effect name="FatalBlowRateDefence">
|
||||||
<amount>
|
<amount>
|
||||||
<value level="1">10</value>
|
<value level="1">10</value>
|
||||||
<value level="2">20</value>
|
<value level="2">20</value>
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -1095,8 +1095,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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1786,7 +1786,7 @@
|
|||||||
</amount>
|
</amount>
|
||||||
<mode>PER</mode>
|
<mode>PER</mode>
|
||||||
</effect>
|
</effect>
|
||||||
<effect name="FatalBlowRate">
|
<effect name="FatalBlowRateDefence">
|
||||||
<amount>
|
<amount>
|
||||||
<value level="1">10</value>
|
<value level="1">10</value>
|
||||||
<value level="2">20</value>
|
<value level="2">20</value>
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -1095,8 +1095,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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1772,7 +1772,7 @@
|
|||||||
</amount>
|
</amount>
|
||||||
<mode>PER</mode>
|
<mode>PER</mode>
|
||||||
</effect>
|
</effect>
|
||||||
<effect name="FatalBlowRate">
|
<effect name="FatalBlowRateDefence">
|
||||||
<amount>
|
<amount>
|
||||||
<value level="1">10</value>
|
<value level="1">10</value>
|
||||||
<value level="2">20</value>
|
<value level="2">20</value>
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -1095,8 +1095,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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ public enum Stat
|
|||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE("mCritRateByRCrit"),
|
MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE("mCritRateByRCrit"),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
EffectHandler.getInstance().registerHandler("FakeDeath", FakeDeath::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
EffectHandler.getInstance().registerHandler("FatalBlow", FatalBlow::new);
|
||||||
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
EffectHandler.getInstance().registerHandler("FatalBlowRate", FatalBlowRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("FatalBlowRateDefence", FatalBlowRateDefence::new);
|
||||||
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
EffectHandler.getInstance().registerHandler("Fear", Fear::new);
|
||||||
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
EffectHandler.getInstance().registerHandler("Feed", Feed::new);
|
||||||
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
EffectHandler.getInstance().registerHandler("FishingExpSpBonus", FishingExpSpBonus::new);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -111,6 +111,7 @@ Faceoff: Focuses attacking a given target with all other damage blocked.
|
|||||||
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
FakeDeath: Plays dead to avoid enemy NPC aggression.
|
||||||
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
FatalBlow: Physical attack based on blow formula. Deadly Blow, Lethal Blow etc.
|
||||||
FatalBlowRate: Blow land rate stat.
|
FatalBlowRate: Blow land rate stat.
|
||||||
|
FatalBlowRateDefence: Blow land rate defence stat. (l2jmobius)
|
||||||
Fear: Causes the target to run away. Does not block it though.
|
Fear: Causes the target to run away. Does not block it though.
|
||||||
Feed: Gives food to pet.
|
Feed: Gives food to pet.
|
||||||
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
FishingExpSpBonus: Bonus Exp and SP from fishing. (l2jmobius)
|
||||||
|
|||||||
@@ -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 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 chanceBoostMod = (100 + chanceBoost) / 100;
|
||||||
final double blowRateMod = creature.getStat().getValue(Stat.BLOW_RATE, 1);
|
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%
|
// Blow rate is capped at 80%
|
||||||
return Rnd.get(100) < Math.min(rate, 80);
|
return Rnd.get(100) < Math.min(rate, 80);
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public enum Stat
|
|||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
DEFENCE_CRITICAL_RATE("defCritRate"),
|
DEFENCE_CRITICAL_RATE("defCritRate"),
|
||||||
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
|
||||||
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
|
||||||
|
|||||||
Reference in New Issue
Block a user