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
+2 -2
View File
@@ -226,7 +226,7 @@ public class BIngredients {
badStuff++;
if (badStuff < ingredients.size()) {
// when there are other ingredients
quality -= count * 2;
quality -= count * (recipe.getDifficulty() / 2);
continue;
} else {
// ingredients dont fit at all
@@ -234,7 +234,7 @@ public class BIngredients {
}
}
// calculate the quality
quality -= (((float) Math.abs(count - recipe.amountOf(ingredient)) / recipe.allowedCountDiff(recipe.amountOf(ingredient))) * 10.0);
quality -= ((float) Math.abs(count - recipe.amountOf(ingredient)) / recipe.allowedCountDiff(recipe.amountOf(ingredient))) * 10.0;
}
if (quality >= 0) {
return Math.round(quality);