diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt index 1f6f80f5a..9b2f6441e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt @@ -168,13 +168,20 @@ object FortuneUpgrades { val farmingForDummiesCount = tool.getFarmingForDummiesCount() ?: 0 if (crop in axeCrops) { val sunderLvl = enchantments["sunder"] ?: 0 - if (sunderLvl != 5) { + if (sunderLvl < 5) { cropSpecificUpgrades.add( FortuneUpgrade( "§7Enchant your ${tool.displayName} §7with Sunder ${sunderLvl + 1}", 10, "SUNDER;1", getNeededBooks(sunderLvl), 12.5 ) ) + } else if (sunderLvl == 5) { + cropSpecificUpgrades.add( + FortuneUpgrade( + "§7Enchant your ${tool.displayName} §7with Sunder 6", + 10, "SUNDER;6", 1, 12.5 + ) + ) } } else { val harvestingLvl = enchantments["harvesting"] ?: 0 @@ -276,14 +283,12 @@ object FortuneUpgrades { ) } - private fun getNeededBooks(currentLvl: Int): Int { - return when (currentLvl) { - 0 -> 1 - 1 -> 1 - 2 -> 2 - 3 -> 4 - else -> 8 - } + private fun getNeededBooks(currentLvl: Int) = when (currentLvl) { + 0 -> 1 + 1 -> 1 + 2 -> 2 + 3 -> 4 + else -> 8 } private val cropUpgrades = listOf(5, 10, 20, 50, 100, 500, 1000, 5000, 10000) |