aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-19 01:39:40 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-19 01:39:40 +0100
commitae34abeafd2823685b145340d468938cc8938006 (patch)
tree0de22261901852dde786c5555ed59c5ffa5995c7 /src/main/java/at/hannibal2/skyhanni/features
parenta9c2e9d5623359493a174d2d08bf003f9dcf9d67 (diff)
downloadskyhanni-ae34abeafd2823685b145340d468938cc8938006.tar.gz
skyhanni-ae34abeafd2823685b145340d468938cc8938006.tar.bz2
skyhanni-ae34abeafd2823685b145340d468938cc8938006.zip
Added support for Sunder 6 in /ff upgrades.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt23
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)