Addition of CraftRate effect.
Contributed by quangnguyen.
This commit is contained in:
@ -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;
|
||||
|
||||
|
@ -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.
|
||||
{
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user