diff --git a/src/main/java/tconstruct/modifiers/tools/ModAttack.java b/src/main/java/tconstruct/modifiers/tools/ModAttack.java index 5e102ea3..9038d9dd 100644 --- a/src/main/java/tconstruct/modifiers/tools/ModAttack.java +++ b/src/main/java/tconstruct/modifiers/tools/ModAttack.java @@ -91,12 +91,11 @@ public class ModAttack extends ItemModTypeFilter { if (tags.hasKey(key)) { int[] keyPair = tags.getIntArray(key); - int overThreshold = increase / threshold; int leftToBoost = threshold - (keyPair[0] % threshold); if (increase >= leftToBoost) { int attack = tags.getInteger("Attack"); - attack += (overThreshold > 1) ? overThreshold : 1; + attack += 1 + (increase - leftToBoost) / threshold; tags.setInteger("Attack", attack); } @@ -118,14 +117,13 @@ public class ModAttack extends ItemModTypeFilter { int modifiers = tags.getInteger("Modifiers"); modifiers -= 1; tags.setInteger("Modifiers", modifiers); - int overThreshold = increase / threshold; String modName = "\u00a7f" + guiType + " (" + increase + "/" + max + ")"; int tooltipIndex = addToolTip(tool, tooltipName, modName); int[] keyPair = new int[] { increase, max, tooltipIndex }; tags.setIntArray(key, keyPair); int attack = tags.getInteger("Attack"); - attack += (overThreshold >= 1) ? overThreshold : 0; + attack += 1 + increase / threshold; tags.setInteger("Attack", attack); } }