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("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); | ||||
|   | ||||
							
								
								
									
										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> | ||||
| 		<magicLevel>85</magicLevel> | ||||
| 		<effects> | ||||
| 			<effect name="MagicCriticalRate"> | ||||
| 			<effect name="MaxMagicCriticalRate"> | ||||
| 				<amount>550</amount> | ||||
| 				<mode>DIFF</mode> | ||||
| 			</effect> | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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"), | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment