Addition of MaxMagicCriticalRate effect.
This commit is contained in:
@@ -217,6 +217,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
||||||
|
|||||||
31
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
vendored
Normal file
31
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1587,7 +1587,7 @@
|
|||||||
<operateType>P</operateType>
|
<operateType>P</operateType>
|
||||||
<magicLevel>85</magicLevel>
|
<magicLevel>85</magicLevel>
|
||||||
<effects>
|
<effects>
|
||||||
<effect name="MagicCriticalRate">
|
<effect name="MaxMagicCriticalRate">
|
||||||
<amount>550</amount>
|
<amount>550</amount>
|
||||||
<mode>DIFF</mode>
|
<mode>DIFF</mode>
|
||||||
</effect>
|
</effect>
|
||||||
|
|||||||
@@ -187,6 +187,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -217,6 +217,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1926,7 +1926,7 @@
|
|||||||
<operateType>P</operateType>
|
<operateType>P</operateType>
|
||||||
<magicLevel>85</magicLevel>
|
<magicLevel>85</magicLevel>
|
||||||
<effects>
|
<effects>
|
||||||
<effect name="MagicCriticalRate">
|
<effect name="MaxMagicCriticalRate">
|
||||||
<amount>550</amount>
|
<amount>550</amount>
|
||||||
<mode>DIFF</mode>
|
<mode>DIFF</mode>
|
||||||
</effect>
|
</effect>
|
||||||
|
|||||||
@@ -187,6 +187,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -217,6 +217,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
||||||
|
|||||||
31
L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
vendored
Normal file
31
L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1926,7 +1926,7 @@
|
|||||||
<operateType>P</operateType>
|
<operateType>P</operateType>
|
||||||
<magicLevel>85</magicLevel>
|
<magicLevel>85</magicLevel>
|
||||||
<effects>
|
<effects>
|
||||||
<effect name="MagicCriticalRate">
|
<effect name="MaxMagicCriticalRate">
|
||||||
<amount>550</amount>
|
<amount>550</amount>
|
||||||
<mode>DIFF</mode>
|
<mode>DIFF</mode>
|
||||||
</effect>
|
</effect>
|
||||||
|
|||||||
@@ -187,6 +187,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1844,7 +1844,7 @@
|
|||||||
<operateType>P</operateType>
|
<operateType>P</operateType>
|
||||||
<magicLevel>85</magicLevel>
|
<magicLevel>85</magicLevel>
|
||||||
<effects>
|
<effects>
|
||||||
<effect name="MagicCriticalRate">
|
<effect name="MaxMagicCriticalRate">
|
||||||
<amount>550</amount>
|
<amount>550</amount>
|
||||||
<mode>DIFF</mode>
|
<mode>DIFF</mode>
|
||||||
</effect>
|
</effect>
|
||||||
|
|||||||
@@ -191,6 +191,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -224,6 +224,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1844,7 +1844,7 @@
|
|||||||
<operateType>P</operateType>
|
<operateType>P</operateType>
|
||||||
<magicLevel>85</magicLevel>
|
<magicLevel>85</magicLevel>
|
||||||
<effects>
|
<effects>
|
||||||
<effect name="MagicCriticalRate">
|
<effect name="MaxMagicCriticalRate">
|
||||||
<amount>550</amount>
|
<amount>550</amount>
|
||||||
<mode>DIFF</mode>
|
<mode>DIFF</mode>
|
||||||
</effect>
|
</effect>
|
||||||
|
|||||||
@@ -194,6 +194,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -225,6 +225,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1844,7 +1844,7 @@
|
|||||||
<operateType>P</operateType>
|
<operateType>P</operateType>
|
||||||
<magicLevel>85</magicLevel>
|
<magicLevel>85</magicLevel>
|
||||||
<effects>
|
<effects>
|
||||||
<effect name="MagicCriticalRate">
|
<effect name="MaxMagicCriticalRate">
|
||||||
<amount>550</amount>
|
<amount>550</amount>
|
||||||
<mode>DIFF</mode>
|
<mode>DIFF</mode>
|
||||||
</effect>
|
</effect>
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -225,6 +225,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
||||||
|
|||||||
31
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.java
vendored
Normal file
31
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/MaxMagicCriticalRate.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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1934,7 +1934,7 @@
|
|||||||
<operateType>P</operateType>
|
<operateType>P</operateType>
|
||||||
<magicLevel>85</magicLevel>
|
<magicLevel>85</magicLevel>
|
||||||
<effects>
|
<effects>
|
||||||
<effect name="MagicCriticalRate">
|
<effect name="MaxMagicCriticalRate">
|
||||||
<amount>550</amount>
|
<amount>550</amount>
|
||||||
<mode>DIFF</mode>
|
<mode>DIFF</mode>
|
||||||
</effect>
|
</effect>
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -225,6 +225,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1951,7 +1951,7 @@
|
|||||||
<operateType>P</operateType>
|
<operateType>P</operateType>
|
||||||
<magicLevel>85</magicLevel>
|
<magicLevel>85</magicLevel>
|
||||||
<effects>
|
<effects>
|
||||||
<effect name="MagicCriticalRate">
|
<effect name="MaxMagicCriticalRate">
|
||||||
<amount>550</amount>
|
<amount>550</amount>
|
||||||
<mode>DIFF</mode>
|
<mode>DIFF</mode>
|
||||||
</effect>
|
</effect>
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -185,6 +185,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -185,6 +185,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -216,6 +216,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -186,6 +186,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -219,6 +219,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -189,6 +189,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -219,6 +219,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -189,6 +189,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtkByPAtk", MAtkByPAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtkByPAtk", MAtkByPAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -191,6 +191,7 @@ MAtk: M. Atk. stat.
|
|||||||
MAtkByPAtk: M. Atk. bonus from P. Atk stat. (l2jmobius)
|
MAtkByPAtk: M. Atk. bonus from P. Atk stat. (l2jmobius)
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
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"),
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
|
|
||||||
final double physicalBonus = creature.getStat().getValue(Stat.MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE, 0) * creature.getStat().getCriticalHit();
|
final double physicalBonus = creature.getStat().getValue(Stat.MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE, 0) * creature.getStat().getCriticalHit();
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, (baseValue * witBonus * 10) + physicalBonus), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, (baseValue * witBonus * 10) + physicalBonus), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -217,6 +217,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
|
||||||
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
|
||||||
EffectHandler.getInstance().registerHandler("Mp", Mp::new);
|
EffectHandler.getInstance().registerHandler("Mp", Mp::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 Mobius
|
||||||
|
*/
|
||||||
|
public class MaxMagicCriticalRate extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public MaxMagicCriticalRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.MAX_MAGIC_CRITICAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1844,7 +1844,7 @@
|
|||||||
<operateType>P</operateType>
|
<operateType>P</operateType>
|
||||||
<magicLevel>85</magicLevel>
|
<magicLevel>85</magicLevel>
|
||||||
<effects>
|
<effects>
|
||||||
<effect name="MagicCriticalRate">
|
<effect name="MaxMagicCriticalRate">
|
||||||
<amount>550</amount>
|
<amount>550</amount>
|
||||||
<mode>DIFF</mode>
|
<mode>DIFF</mode>
|
||||||
</effect>
|
</effect>
|
||||||
|
|||||||
@@ -187,6 +187,7 @@ ManaHealPercent: Increases current MP by a given percentage.
|
|||||||
MAtk: M. Atk. stat.
|
MAtk: M. Atk. stat.
|
||||||
MaxCp: Max. CP stat.
|
MaxCp: Max. CP stat.
|
||||||
MaxHp: Max. HP stat.
|
MaxHp: Max. HP stat.
|
||||||
|
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
|
||||||
MaxMp: Max. MP stat.
|
MaxMp: Max. MP stat.
|
||||||
ModifyVital: Modifies current HP/MP/CP
|
ModifyVital: Modifies current HP/MP/CP
|
||||||
MpConsumePerLevel: Consumes mana over time depending on your level.
|
MpConsumePerLevel: Consumes mana over time depending on your level.
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ public enum Stat
|
|||||||
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
|
||||||
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), MathUtil::add, MathUtil::add, 0, 1),
|
||||||
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
CRITICAL_RATE_SKILL("rCritSkill", Stat::defaultValue, MathUtil::add, MathUtil::add, 0, 1),
|
||||||
|
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
|
||||||
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
|
||||||
BLOW_RATE("blowRate"),
|
BLOW_RATE("blowRate"),
|
||||||
BLOW_RATE_DEFENCE("blowRateDefence"),
|
BLOW_RATE_DEFENCE("blowRateDefence"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? Config.MAX_MCRIT_RATE : Double.MAX_VALUE);
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * witBonus * 10), 0, creature.isPlayer() ? creature.getStat().getValue(Stat.MAX_MAGIC_CRITICAL_RATE, Config.MAX_MCRIT_RATE) : Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user