From 39984548fec593140176ce5749f21ee3885d4bfe Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Tue, 9 Aug 2022 11:41:34 +0000 Subject: [PATCH] Addition of CraftingCritical effect handler. --- .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/10300-10399.xml | 16 ++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/10300-10399.xml | 16 ++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/10300-10399.xml | 16 ++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/53000-53099.xml | 28 +++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/53000-53099.xml | 28 +++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/10300-10399.xml | 10 ++++++ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/53000-53099.xml | 18 +++++------ .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/53000-53099.xml | 10 +++--- .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/53000-53099.xml | 10 +++--- .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../effecthandlers/CraftingCritical.java | 31 +++++++++++++++++++ .../game/data/stats/skills/53000-53099.xml | 10 +++--- .../game/data/stats/skills/documentation.txt | 1 + .../instancemanager/RecipeManager.java | 6 +++- .../gameserver/model/stats/Stat.java | 1 + 90 files changed, 757 insertions(+), 45 deletions(-) create mode 100644 L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java create mode 100644 L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java index 75bd99940b..e8d7394634 100644 --- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/10300-10399.xml b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/10300-10399.xml index 2fe37c6c6e..d545f4aa7a 100644 --- a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/10300-10399.xml +++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/10300-10399.xml @@ -505,7 +505,23 @@ icon.skill10312 + + 85 + 90 + 95 + 99 + P + + + + 2.4 + 3.8 + 4.2 + 5.4 + + + diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/documentation.txt index ff1e7661d6..c66abf5ae3 100644 --- a/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index f2041958b1..62e409e042 100644 --- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java index 2a8d9160b6..cd7b5ad623 100644 --- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java index 75bd99940b..e8d7394634 100644 --- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/10300-10399.xml b/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/10300-10399.xml index b377bb92fc..51249a213f 100644 --- a/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/10300-10399.xml +++ b/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/10300-10399.xml @@ -512,7 +512,23 @@ icon.skill10312 + + 85 + 90 + 95 + 99 + P + + + + 2.4 + 3.8 + 4.2 + 5.4 + + + diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/documentation.txt index ff1e7661d6..c66abf5ae3 100644 --- a/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_02.5_Underground/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index f2041958b1..62e409e042 100644 --- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java index 2a8d9160b6..cd7b5ad623 100644 --- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java index 75bd99940b..e8d7394634 100644 --- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/10300-10399.xml b/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/10300-10399.xml index 9a996c7a00..1cc049aa1e 100644 --- a/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/10300-10399.xml +++ b/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/10300-10399.xml @@ -515,7 +515,23 @@ icon.skill10312 + + 85 + 90 + 95 + 99 + P + + + + 2.4 + 3.8 + 4.2 + 5.4 + + + diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/documentation.txt index ff1e7661d6..c66abf5ae3 100644 --- a/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_03.0_Helios/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index f2041958b1..62e409e042 100644 --- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java index 2a8d9160b6..cd7b5ad623 100644 --- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/EffectMasterHandler.java index c747161950..3a05ccde62 100644 --- a/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Classic_1.0/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_1.0/dist/game/data/stats/skills/documentation.txt index e0fe56fa22..1bcd1dce4d 100644 --- a/L2J_Mobius_Classic_1.0/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_1.0/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index 6cf3223cff..e09d3b28b9 100644 --- a/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/stats/Stat.java index 674693fbcd..0cf64ff108 100644 --- a/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/EffectMasterHandler.java index ec9b84779d..662c316d75 100644 --- a/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/stats/skills/documentation.txt index e0fe56fa22..1bcd1dce4d 100644 --- a/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index 6cf3223cff..e09d3b28b9 100644 --- a/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/stats/Stat.java index 674693fbcd..0cf64ff108 100644 --- a/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java index ec9b84779d..662c316d75 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt index e0fe56fa22..1bcd1dce4d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index 6cf3223cff..e09d3b28b9 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Stat.java index 674693fbcd..0cf64ff108 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/EffectMasterHandler.java index ec9b84779d..662c316d75 100644 --- a/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/stats/skills/documentation.txt index e0fe56fa22..1bcd1dce4d 100644 --- a/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index 6cf3223cff..e09d3b28b9 100644 --- a/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/stats/Stat.java index 674693fbcd..0cf64ff108 100644 --- a/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/EffectMasterHandler.java index d5039cd7c2..817839221c 100644 --- a/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/stats/skills/documentation.txt index d7b712ec4f..9175a06f17 100644 --- a/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index 9db9cbeb2b..3167e536ee 100644 --- a/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/stats/Stat.java index 28e719cd52..b527203467 100644 --- a/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java index 0af7e97d24..49ce63f0d5 100644 --- a/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/stats/skills/documentation.txt index 19c6391a18..168a005626 100644 --- a/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index 9db9cbeb2b..3167e536ee 100644 --- a/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Stat.java index b6b85dd8fb..894ed77e01 100644 --- a/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java index 0af7e97d24..49ce63f0d5 100644 --- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/stats/skills/53000-53099.xml b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/stats/skills/53000-53099.xml index bcbf371518..95e4bf10f9 100644 --- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/stats/skills/53000-53099.xml +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/stats/skills/53000-53099.xml @@ -3,12 +3,40 @@ icon.skill10701 + + 76 + 79 + 84 + P + + + + 3 + 5 + 10 + + + icon.skill10312 + + 78 + 82 + 84 + P + + + + 5 + 10 + 20 + + + diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt index 19c6391a18..168a005626 100644 --- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index 9db9cbeb2b..3167e536ee 100644 --- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Stat.java index b6b85dd8fb..894ed77e01 100644 --- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java index 8a2eef2308..616fb02639 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/53000-53099.xml b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/53000-53099.xml index 3d2a65a027..0fb853471c 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/53000-53099.xml +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/53000-53099.xml @@ -3,12 +3,40 @@ icon.skill10701 + + 76 + 79 + 84 + P + + + + 3 + 5 + 10 + + + icon.skill10312 + + 78 + 82 + 84 + P + + + + 5 + 10 + 20 + + + diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt index 07c1db2163..f55aaa429a 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index 9db9cbeb2b..3167e536ee 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java index d866517270..46f3563f06 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java index 75bd99940b..e8d7394634 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/10300-10399.xml b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/10300-10399.xml index 3260d8d1c1..f51b6a434a 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/10300-10399.xml +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/10300-10399.xml @@ -519,6 +519,16 @@ 99 P + + + + 2.4 + 3.8 + 4.2 + 5.4 + + + diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt index 5abbb27cc2..f6be15b767 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index 6cf3223cff..e09d3b28b9 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java index 2a8d9160b6..cd7b5ad623 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java index 3363b0c9a8..4163372202 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/53000-53099.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/53000-53099.xml index 822683b62a..14c65988b9 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/53000-53099.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/53000-53099.xml @@ -9,18 +9,15 @@ 84 P - 5 - @@ -31,13 +28,12 @@ 84 P - 5 - 3 - 5 - 10 + 5 + 10 + 20 diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt index adeb204664..3300510675 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index edd24869ec..6ae335ff47 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/Stat.java index 4734035f42..abe6c88194 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/EffectMasterHandler.java index a407733c19..c8cf2c31de 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/53000-53099.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/53000-53099.xml index 41a5eca07a..06fd07c509 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/53000-53099.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/53000-53099.xml @@ -9,9 +9,8 @@ 84 P - 5 - + 3 5 @@ -29,13 +28,12 @@ 84 P - 5 - 3 - 5 - 10 + 5 + 10 + 20 diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/documentation.txt index 721399b9e2..ae256a5dc1 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index 8f4f3539d2..fd1c5399b2 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/Stat.java index 4734035f42..abe6c88194 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/scripts/handlers/EffectMasterHandler.java index 7416978e9c..8a83453721 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/stats/skills/53000-53099.xml b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/stats/skills/53000-53099.xml index f629fa59ee..135a99b277 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/stats/skills/53000-53099.xml +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/stats/skills/53000-53099.xml @@ -9,9 +9,8 @@ 84 P - 5 - + 3 5 @@ -29,13 +28,12 @@ 84 P - 5 - 3 - 5 - 10 + 5 + 10 + 20 diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/stats/skills/documentation.txt index a9a7492711..012fe00716 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index 9240f2082a..917af88cfa 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/stats/Stat.java index dea892ea7c..9e4a23f8d3 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"), diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/EffectMasterHandler.java index 1209076062..f6db3d0a6f 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -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); diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java new file mode 100644 index 0000000000..cb3f2aace2 --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/CraftingCritical.java @@ -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 . + */ +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); + } +} diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/53000-53099.xml b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/53000-53099.xml index c76d6736ae..bb4d881bd6 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/53000-53099.xml +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/53000-53099.xml @@ -9,9 +9,8 @@ 84 P - 5 - + 3 5 @@ -29,13 +28,12 @@ 84 P - 5 - 3 - 5 - 10 + 5 + 10 + 20 diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/documentation.txt index 2f2598dfce..512551b88f 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/documentation.txt @@ -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. diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java index 9240f2082a..917af88cfa 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/instancemanager/RecipeManager.java @@ -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; diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/stats/Stat.java index 9d804ef672..0c86ffb218 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -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"),