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

@ -301,7 +301,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;

View File

@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
}
final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100));
final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100));
final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
if (success) // Successful craft.
{

View File

@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
}
final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100));
final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100));
final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
if (success)