Addition of MaxMagicCriticalRate effect.

This commit is contained in:
MobiusDevelopment 2020-10-19 23:08:25 +00:00
parent 8925028cc2
commit 4083dd2dee
84 changed files with 534 additions and 24 deletions

View File

@ -217,6 +217,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -1587,7 +1587,7 @@
<operateType>P</operateType>
<magicLevel>85</magicLevel>
<effects>
<effect name="MagicCriticalRate">
<effect name="MaxMagicCriticalRate">
<amount>550</amount>
<mode>DIFF</mode>
</effect>

View File

@ -187,6 +187,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -125,6 +125,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -217,6 +217,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -1926,7 +1926,7 @@
<operateType>P</operateType>
<magicLevel>85</magicLevel>
<effects>
<effect name="MagicCriticalRate">
<effect name="MaxMagicCriticalRate">
<amount>550</amount>
<mode>DIFF</mode>
</effect>

View File

@ -187,6 +187,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -125,6 +125,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -217,6 +217,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -1926,7 +1926,7 @@
<operateType>P</operateType>
<magicLevel>85</magicLevel>
<effects>
<effect name="MagicCriticalRate">
<effect name="MaxMagicCriticalRate">
<amount>550</amount>
<mode>DIFF</mode>
</effect>

View File

@ -187,6 +187,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -125,6 +125,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -221,6 +221,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -1844,7 +1844,7 @@
<operateType>P</operateType>
<magicLevel>85</magicLevel>
<effects>
<effect name="MagicCriticalRate">
<effect name="MaxMagicCriticalRate">
<amount>550</amount>
<mode>DIFF</mode>
</effect>

View File

@ -191,6 +191,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -125,6 +125,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -224,6 +224,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -1844,7 +1844,7 @@
<operateType>P</operateType>
<magicLevel>85</magicLevel>
<effects>
<effect name="MagicCriticalRate">
<effect name="MaxMagicCriticalRate">
<amount>550</amount>
<mode>DIFF</mode>
</effect>

View File

@ -194,6 +194,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -127,6 +127,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -225,6 +225,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -1844,7 +1844,7 @@
<operateType>P</operateType>
<magicLevel>85</magicLevel>
<effects>
<effect name="MagicCriticalRate">
<effect name="MaxMagicCriticalRate">
<amount>550</amount>
<mode>DIFF</mode>
</effect>

View File

@ -195,6 +195,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -127,6 +127,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -225,6 +225,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -1934,7 +1934,7 @@
<operateType>P</operateType>
<magicLevel>85</magicLevel>
<effects>
<effect name="MagicCriticalRate">
<effect name="MaxMagicCriticalRate">
<amount>550</amount>
<mode>DIFF</mode>
</effect>

View File

@ -195,6 +195,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -127,6 +127,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -225,6 +225,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -1951,7 +1951,7 @@
<operateType>P</operateType>
<magicLevel>85</magicLevel>
<effects>
<effect name="MagicCriticalRate">
<effect name="MaxMagicCriticalRate">
<amount>550</amount>
<mode>DIFF</mode>
</effect>

View File

@ -195,6 +195,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -127,6 +127,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -215,6 +215,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -185,6 +185,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -125,6 +125,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -215,6 +215,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -185,6 +185,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -125,6 +125,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -216,6 +216,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -186,6 +186,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -127,6 +127,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -219,6 +219,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -189,6 +189,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -140,6 +140,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -219,6 +219,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -189,6 +189,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -140,6 +140,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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

View File

@ -221,6 +221,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtkByPAtk", MAtkByPAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -191,6 +191,7 @@ MAtk: M. Atk. stat.
MAtkByPAtk: M. Atk. bonus from P. Atk stat. (l2jmobius)
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -141,6 +141,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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_BY_CRITICAL_RATE("mCritRateByRCrit"),
BLOW_RATE("blowRate"),

View File

@ -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 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

View File

@ -217,6 +217,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("MAtk", MAtk::new);
EffectHandler.getInstance().registerHandler("MaxCp", MaxCp::new);
EffectHandler.getInstance().registerHandler("MaxHp", MaxHp::new);
EffectHandler.getInstance().registerHandler("MaxMagicCriticalRate", MaxMagicCriticalRate::new);
EffectHandler.getInstance().registerHandler("MaxMp", MaxMp::new);
EffectHandler.getInstance().registerHandler("ModifyVital", ModifyVital::new);
EffectHandler.getInstance().registerHandler("Mp", Mp::new);

View File

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

View File

@ -1844,7 +1844,7 @@
<operateType>P</operateType>
<magicLevel>85</magicLevel>
<effects>
<effect name="MagicCriticalRate">
<effect name="MaxMagicCriticalRate">
<amount>550</amount>
<mode>DIFF</mode>
</effect>

View File

@ -187,6 +187,7 @@ ManaHealPercent: Increases current MP by a given percentage.
MAtk: M. Atk. stat.
MaxCp: Max. CP stat.
MaxHp: Max. HP stat.
MaxMagicCriticalRate: Stat that overrides the default config MAX_MCRIT_RATE. (l2jmobius)
MaxMp: Max. MP stat.
ModifyVital: Modifies current HP/MP/CP
MpConsumePerLevel: Consumes mana over time depending on your level.

View File

@ -125,6 +125,7 @@ public enum Stat
SHIELD_DEFENCE_RATE("rShld", new ShieldDefenceRateFinalizer()),
CRITICAL_RATE("rCrit", new PCriticalRateFinalizer(), 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()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),

View File

@ -43,7 +43,7 @@ public class MCritRateFinalizer implements IStatFunction
}
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