Reduced Difficulty for small Ingredient amounts

This commit is contained in:
Sn0wStorm
2013-09-01 18:58:51 +02:00
parent 33285e54de
commit c748e0b7b5
2 changed files with 10 additions and 3 deletions
+8 -1
View File
@@ -47,7 +47,11 @@ public class BRecipe {
for (String effectString : effectStringList) {
String[] effectSplit = effectString.split("/");
String effect = effectSplit[0];
if (effect.equalsIgnoreCase("WEAKNESS") || effect.equalsIgnoreCase("INCREASE_DAMAGE") || effect.equalsIgnoreCase("SLOW") || effect.equalsIgnoreCase("SPEED") || effect.equalsIgnoreCase("REGERATION")) {
if (effect.equalsIgnoreCase("WEAKNESS") ||
effect.equalsIgnoreCase("INCREASE_DAMAGE") ||
effect.equalsIgnoreCase("SLOW") ||
effect.equalsIgnoreCase("SPEED") ||
effect.equalsIgnoreCase("REGENERATION")) {
// hide these effects as they put crap into lore
effect = effect + "X";
}
@@ -62,6 +66,9 @@ public class BRecipe {
// allowed deviation to the recipes count of ingredients at the given difficulty
public int allowedCountDiff(int count) {
if (count < 8) {
count = 8;
}
int allowedCountDiff = Math.round((float) ((11.0 - difficulty) * (count / 10.0)));
if (allowedCountDiff == 0) {