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

@ -505,7 +505,23 @@
<skill id="10312" toLevel="4" name="Crafting Mastery">
<!-- There is a small chance that the item quantity will double upon crafting. Critical level 1. -->
<icon>icon.skill10312</icon>
<magicLevel>
<value level="1">85</value>
<value level="2">90</value>
<value level="3">95</value>
<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">
<!-- Rush toward the frontal enemies to inflict Shock for 9 sec. Requires a sword, blunt, spear, fist weapon, dual blunt, or dual sword. -->

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

@ -666,7 +666,11 @@ public class RecipeManager
itemCount *= 2;
}
_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"),

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

@ -512,7 +512,23 @@
<skill id="10312" toLevel="4" name="Crafting Mastery">
<!-- There is a small chance that the item quantity will double upon crafting. Critical level $s2. -->
<icon>icon.skill10312</icon>
<magicLevel>
<value level="1">85</value>
<value level="2">90</value>
<value level="3">95</value>
<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">
<!-- Rush toward the frontal enemies to inflict Shock for $s1. Requires a sword, blunt, spear, fist weapon, dual blunt, or dual sword. -->

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

@ -666,7 +666,11 @@ public class RecipeManager
itemCount *= 2;
}
_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"),

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

@ -515,7 +515,23 @@
<skill id="10312" toLevel="4" name="Crafting Mastery">
<!-- There is a small chance that the item quantity will double upon crafting. Critical level $s2. -->
<icon>icon.skill10312</icon>
<magicLevel>
<value level="1">85</value>
<value level="2">90</value>
<value level="3">95</value>
<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">
<!-- Rush toward the frontal enemies to inflict Shock for $s1. Requires a sword, blunt, spear, fist weapon, dual blunt, or dual sword. -->

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

@ -666,7 +666,11 @@ public class RecipeManager
itemCount *= 2;
}
_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"),

View File

@ -95,6 +95,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

@ -66,6 +66,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

@ -286,6 +286,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"),

View File

@ -95,6 +95,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

@ -66,6 +66,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

@ -286,6 +286,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"),

View File

@ -95,6 +95,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

@ -66,6 +66,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

@ -286,6 +286,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"),

View File

@ -95,6 +95,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

@ -66,6 +66,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

@ -286,6 +286,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"),

View File

@ -97,6 +97,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

@ -68,6 +68,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

@ -292,6 +292,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"),

View File

@ -98,6 +98,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

@ -69,6 +69,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

@ -308,6 +308,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"),

View File

@ -98,6 +98,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

@ -3,12 +3,40 @@
<skill id="53001" toLevel="3" name="Critical Creation">
<!-- Craft critical success rate +$s1. -->
<icon>icon.skill10701</icon>
<magicLevel>
<value level="1">76</value>
<value level="2">79</value>
<value level="3">84</value>
</magicLevel>
<operateType>P</operateType>
<effects>
<effect name="CraftingCritical">
<amount>
<value level="1">3</value>
<value level="2">5</value>
<value level="3">10</value>
</amount>
</effect>
</effects>
</skill>
<skill id="53002" toLevel="3" name="Creation Master">
<!-- Craft success rate +$s1. -->
<icon>icon.skill10312</icon>
<magicLevel>
<value level="1">78</value>
<value level="2">82</value>
<value level="3">84</value>
</magicLevel>
<operateType>P</operateType>
<effects>
<effect name="CraftRate">
<amount>
<value level="1">5</value>
<value level="2">10</value>
<value level="3">20</value>
</amount>
</effect>
</effects>
</skill>
<skill id="53003" toLevel="3" name="Mass Chain Strike">
<!-- Pulls a selected target and nearby enemies to you and provokes. -->

View File

@ -69,6 +69,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

@ -308,6 +308,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"),

View File

@ -99,6 +99,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

@ -3,12 +3,40 @@
<skill id="53001" toLevel="3" name="Critical Creation">
<!-- Craft critical success rate +$s1. -->
<icon>icon.skill10701</icon>
<magicLevel>
<value level="1">76</value>
<value level="2">79</value>
<value level="3">84</value>
</magicLevel>
<operateType>P</operateType>
<effects>
<effect name="CraftingCritical">
<amount>
<value level="1">3</value>
<value level="2">5</value>
<value level="3">10</value>
</amount>
</effect>
</effects>
</skill>
<skill id="53002" toLevel="3" name="Master of Creation">
<!-- Craft success rate +$s1. -->
<icon>icon.skill10312</icon>
<magicLevel>
<value level="1">78</value>
<value level="2">82</value>
<value level="3">84</value>
</magicLevel>
<operateType>P</operateType>
<effects>
<effect name="CraftRate">
<amount>
<value level="1">5</value>
<value level="2">10</value>
<value level="3">20</value>
</amount>
</effect>
</effects>
</skill>
<skill id="53003" toLevel="3" name="Mass Chain Strike">
<!-- Pulls a selected target and nearby enemies to you and provokes. -->

View File

@ -70,6 +70,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

@ -311,6 +311,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"),

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"),

View File

@ -100,6 +100,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

@ -9,18 +9,15 @@
<value level="3">84</value>
</magicLevel>
<operateType>P</operateType>
<magicCriticalRate>5</magicCriticalRate>
<!--
<effects>
<effect name="CraftRate">
<effect name="CraftingCritical">
<amount>
<value level="1">5</value>
<value level="2">10</value>
<value level="3">20</value>
<value level="1">3</value>
<value level="2">5</value>
<value level="3">10</value>
</amount>
</effect>
</effects>
-->
</skill>
<skill id="53002" toLevel="3" name="Master of Creation">
<!-- Craft success rate +$s1. -->
@ -31,13 +28,12 @@
<value level="3">84</value>
</magicLevel>
<operateType>P</operateType>
<magicCriticalRate>5</magicCriticalRate>
<effects>
<effect name="CraftRate">
<amount>
<value level="1">3</value>
<value level="2">5</value>
<value level="3">10</value>
<value level="1">5</value>
<value level="2">10</value>
<value level="3">20</value>
</amount>
</effect>
</effects>

View File

@ -71,6 +71,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

@ -321,6 +321,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"),

View File

@ -100,6 +100,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

@ -9,9 +9,8 @@
<value level="3">84</value>
</magicLevel>
<operateType>P</operateType>
<magicCriticalRate>5</magicCriticalRate>
<effects>
<effect name="CraftRate">
<effect name="CraftingCritical">
<amount>
<value level="1">3</value>
<value level="2">5</value>
@ -29,13 +28,12 @@
<value level="3">84</value>
</magicLevel>
<operateType>P</operateType>
<magicCriticalRate>5</magicCriticalRate>
<effects>
<effect name="CraftRate">
<amount>
<value level="1">3</value>
<value level="2">5</value>
<value level="3">10</value>
<value level="1">5</value>
<value level="2">10</value>
<value level="3">20</value>
</amount>
</effect>
</effects>

View File

@ -71,6 +71,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

@ -321,6 +321,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"),

View File

@ -100,6 +100,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

@ -9,9 +9,8 @@
<value level="3">84</value>
</magicLevel>
<operateType>P</operateType>
<magicCriticalRate>5</magicCriticalRate>
<effects>
<effect name="CraftRate">
<effect name="CraftingCritical">
<amount>
<value level="1">3</value>
<value level="2">5</value>
@ -29,13 +28,12 @@
<value level="3">84</value>
</magicLevel>
<operateType>P</operateType>
<magicCriticalRate>5</magicCriticalRate>
<effects>
<effect name="CraftRate">
<amount>
<value level="1">3</value>
<value level="2">5</value>
<value level="3">10</value>
<value level="1">5</value>
<value level="2">10</value>
<value level="3">20</value>
</amount>
</effect>
</effects>

View File

@ -71,6 +71,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

@ -324,6 +324,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"),

View File

@ -102,6 +102,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

@ -9,9 +9,8 @@
<value level="3">84</value>
</magicLevel>
<operateType>P</operateType>
<magicCriticalRate>5</magicCriticalRate>
<effects>
<effect name="CraftRate">
<effect name="CraftingCritical">
<amount>
<value level="1">3</value>
<value level="2">5</value>
@ -29,13 +28,12 @@
<value level="3">84</value>
</magicLevel>
<operateType>P</operateType>
<magicCriticalRate>5</magicCriticalRate>
<effects>
<effect name="CraftRate">
<amount>
<value level="1">3</value>
<value level="2">5</value>
<value level="3">10</value>
<value level="1">5</value>
<value level="2">10</value>
<value level="3">20</value>
</amount>
</effect>
</effects>

View File

@ -73,6 +73,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

@ -326,6 +326,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"),