Addition of CraftRate effect.

Contributed by quangnguyen.
This commit is contained in:
MobiusDevelopment
2021-02-18 21:26:25 +00:00
parent 241956cb64
commit df35e2cd87
91 changed files with 635 additions and 40 deletions

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("CraftRate", CraftRate::new);
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::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 quangnguyen
*/
public class CraftRate extends AbstractStatAddEffect
{
public CraftRate(StatSet params)
{
super(params, Stat.CRAFT_RATE);
}
}

View File

@@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
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)
CriticalDamage: Critical Damage stat.
CriticalDamagePosition: Critical Damage depending on position stat.
CriticalRate: Critical Rate stat.

View File

@@ -403,7 +403,7 @@ public class RecipeController
// handle possible cheaters here
// (they click craft then try to get rid of items in order to get free craft)
}
else if ((Rnd.get(100) < _recipeList.getSuccessRate()) || _target.tryLuck())
else if ((Rnd.get(100) < (_recipeList.getSuccessRate() + _player.getStat().getValue(Stat.CRAFT_RATE, 0))) || _target.tryLuck())
{
rewardPlayer(_target); // and immediately puts created item in its place
updateMakeInfo(true);

View File

@@ -292,7 +292,9 @@ public enum Stat
ATTACK_DAMAGE("attackDamage"),
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
IMMOBILE_DAMAGE_RESIST("immobileResist");
IMMOBILE_DAMAGE_RESIST("immobileResist"),
CRAFT_RATE("CraftRate");
public static final int NUM_STATS = values().length;