Addition of CraftingCritical effect handler.

This commit is contained in:
MobiusDevelopment
2022-08-09 11:41:34 +00:00
parent 5718b19e16
commit 39984548fe
90 changed files with 757 additions and 45 deletions

View File

@@ -96,6 +96,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::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 Nik
*/
public class CraftingCritical extends AbstractStatAddEffect
{
public CraftingCritical(StatSet params)
{
super(params, Stat.CRAFTING_CRITICAL);
}
}

View File

@@ -519,6 +519,16 @@
<value level="4">99</value>
</magicLevel>
<operateType>P</operateType>
<effects>
<effect name="CraftingCritical">
<amount>
<value level="1">2.4</value>
<value level="2">3.8</value>
<value level="3">4.2</value>
<value level="4">5.4</value>
</amount>
</effect>
</effects>
</skill>
<skill id="10313" toLevel="4" name="Infinite Rush">
<!-- Charges forward to inflict Stun to the enemies in the front for $s1. Requires sword/blunt/spear/fist weapon/dual blunt/dual sword weapon. -->

View File

@@ -67,6 +67,7 @@ CpHealPercent: Increases current CP by a given percentage amount.
Cp: Increases current CP by a static amount.
CpRegen: CP Regeneration stat.
CraftRate: Craft success rate bonus. (l2jmobius)
CraftingCritical: Crafting critical stat.
CriticalDamage: Critical Damage stat.
CriticalDamagePosition: Critical Damage depending on position stat.
CriticalRate: Critical Rate stat.

View File

@@ -661,7 +661,11 @@ public class RecipeManager
}
}
_target.getInventory().addItem("Manufacture", itemId, itemCount, _target, _player);
final Item item = _target.getInventory().addItem("Manufacture", itemId, itemCount, _target, _player);
if (item.isEquipable() && (itemCount == 1) && (Rnd.get(100) < _player.getStat().getValue(Stat.CRAFTING_CRITICAL)))
{
_target.getInventory().addItem("Manufacture Critical", itemId, itemCount, _target, _player);
}
// inform customer of earned item
SystemMessage sm = null;

View File

@@ -289,6 +289,7 @@ public enum Stat
// Which base stat ordinal should alter skill critical formula.
STAT_BONUS_SKILL_CRITICAL("statSkillCritical"),
STAT_BONUS_SPEED("statSpeed"),
CRAFTING_CRITICAL("craftingCritical"),
SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()),
WORLD_CHAT_POINTS("worldChatPoints"),
ATTACK_DAMAGE("attackDamage"),