aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorMax <max_bodifee@sfu.ca>2024-07-28 02:31:54 -0700
committerGitHub <noreply@github.com>2024-07-28 11:31:54 +0200
commit238159856f6eafe44208a346c3ab67e344591d3e (patch)
treebd6576356a4a56a0bdd410c2551ae8e2b4943ec3 /src/main
parent5c7fd8edf57f02576245288c93910e95952e9835 (diff)
downloadskyhanni-238159856f6eafe44208a346c3ab67e344591d3e.tar.gz
skyhanni-238159856f6eafe44208a346c3ab67e344591d3e.tar.bz2
skyhanni-238159856f6eafe44208a346c3ab67e344591d3e.zip
Improvement: Add Slug pet to FF Guide (#2249)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFInfos.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFTypes.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt6
6 files changed, 21 insertions, 15 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
index 79d44d92d..a3cea69a6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
@@ -277,6 +277,7 @@ object CaptureFarmingGear {
var highestMooshroomRarity = (FarmingItems.MOOSHROOM_COW.getItemOrNull()?.getItemRarityOrNull()?.id ?: -1) - 1
var highestRabbitRarity = (FarmingItems.RABBIT.getItemOrNull()?.getItemRarityOrNull()?.id ?: -1) - 1
var highestBeeRarity = (FarmingItems.BEE.getItemOrNull()?.getItemRarityOrNull()?.id ?: -1) - 1
+ var highestSlugRarity = (FarmingItems.SLUG.getItemOrNull()?.getItemRarityOrNull()?.id ?: -1) - 1
for ((_, item) in items) {
if (item.getItemCategoryOrNull() != ItemCategory.PET) continue
@@ -301,6 +302,11 @@ object CaptureFarmingGear {
outdatedItems[FarmingItems.BEE] = false
highestBeeRarity = rarity.toInt()
}
+ if (name == "SLUG" && rarity.toInt() > highestSlugRarity) {
+ FarmingItems.SLUG.setItem(item)
+ outdatedItems[FarmingItems.SLUG] = false
+ highestSlugRarity = rarity.toInt()
+ }
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFInfos.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFInfos.kt
index 1d7bfd4fe..31c02b26f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFInfos.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFInfos.kt
@@ -49,7 +49,7 @@ internal enum class FFInfos(
ENCHANT_ARMOR(
sumTo = TOTAL_ARMOR,
from = { FarmingItems.currentArmor?.getFFData() ?: FFStats.armorTotalFF },
- what = FFTypes.PESTERMINATOR,
+ what = FFTypes.ENCHANT,
x4 = { FarmingItems.currentArmor == null },
max = 5
),
@@ -66,6 +66,7 @@ internal enum class FFInfos(
FarmingItems.ELEPHANT -> 150
FarmingItems.MOOSHROOM_COW -> 158
FarmingItems.BEE -> 30
+ FarmingItems.SLUG -> 100
else -> 0
}
}),
@@ -99,7 +100,7 @@ internal enum class FFInfos(
ENCHANT_EQUIP(
sumTo = TOTAL_EQUIP,
from = { FarmingItems.currentEquip?.getFFData() ?: FFStats.equipmentTotalFF },
- what = FFTypes.GREEN_THUMB,
+ what = FFTypes.ENCHANT,
x4 = { FarmingItems.currentEquip == null },
max = { at.hannibal2.skyhanni.features.garden.GardenAPI.totalAmountVisitorsExisting.toDouble() / 4.0 }
),
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt
index ed450b391..53aca9e99 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt
@@ -41,12 +41,10 @@ object FFStats {
var totalBaseFF = mapOf<FFTypes, Double>()
fun loadFFData() {
-
equipmentTotalFF = FarmingItems.equip.getFFData()
armorTotalFF = FarmingItems.armor.getFFData()
-
- usingSpeedBoots = FarmingItems.BOOTS.getItem()?.getInternalName()?.asString() in farmingBoots
+ usingSpeedBoots = FarmingItems.BOOTS.getItem().getInternalName().asString() in farmingBoots
baseFF = getGenericFF()
@@ -116,7 +114,7 @@ object FFStats {
FarmingFortuneDisplay.loadFortuneLineData(item, 0.0)
this[FFTypes.BASE] = FarmingFortuneDisplay.itemBaseFortune
this[FFTypes.REFORGE] = FarmingFortuneDisplay.reforgeFortune
- this[FFTypes.GREEN_THUMB] = FarmingFortuneDisplay.greenThumbFortune
+ this[FFTypes.ENCHANT] = FarmingFortuneDisplay.greenThumbFortune
this[FFTypes.ABILITY] = FarmingFortuneDisplay.getAbilityFortune(item)
this[FFTypes.TOTAL] = this.values.sum()
}
@@ -126,7 +124,7 @@ object FFStats {
this[FFTypes.BASE] = FarmingFortuneDisplay.itemBaseFortune
this[FFTypes.REFORGE] = FarmingFortuneDisplay.reforgeFortune
this[FFTypes.GEMSTONE] = FarmingFortuneDisplay.gemstoneFortune
- this[FFTypes.PESTERMINATOR] = FarmingFortuneDisplay.pesterminatorFortune
+ this[FFTypes.ENCHANT] = FarmingFortuneDisplay.pesterminatorFortune
this[FFTypes.ABILITY] = FarmingFortuneDisplay.getAbilityFortune(item)
this[FFTypes.TOTAL] = this.values.sum()
}
@@ -159,12 +157,12 @@ object FFStats {
}
fun getTotalFF() {
-
- currentPetItem = FarmingItems.currentPet.getItem()?.getPetItem().toString()
+ currentPetItem = FarmingItems.currentPet.getItem().getPetItem().toString()
totalBaseFF = combineFFData(
baseFF, armorTotalFF, equipmentTotalFF, FarmingItems.currentPet.getFFData()
)
+
FFGuideGUI.updateDisplay()
}
@@ -190,6 +188,7 @@ object FFStats {
rawInternalName.contains("MOOSHROOM") -> (10 + petLevel).toDouble()
rawInternalName.contains("BEE;2") -> 0.2 * petLevel
rawInternalName.contains("BEE;3") || rawInternalName.contains("BEE;4") -> 0.3 * petLevel
+ rawInternalName.contains("SLUG;4") -> 1.0 * petLevel
else -> 0.0
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFTypes.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFTypes.kt
index 35692743b..2414dc5d8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFTypes.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFTypes.kt
@@ -6,8 +6,7 @@ enum class FFTypes {
REFORGE,
GEMSTONE,
ABILITY,
- GREEN_THUMB,
- PESTERMINATOR,
+ ENCHANT,
FARMING_LVL,
BESTIARY,
PLOTS,
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt
index 46b5d1e07..9517f366f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt
@@ -35,6 +35,7 @@ enum class FarmingItems(
MOOSHROOM_COW(ItemCategory.PET, FFStats::getPetFFData),
RABBIT(ItemCategory.PET, FFStats::getPetFFData),
BEE(ItemCategory.PET, FFStats::getPetFFData),
+ SLUG(ItemCategory.PET, FFStats::getPetFFData),
;
var selectedState = false
@@ -136,7 +137,7 @@ enum class FarmingItems(
val armor = listOf(HELMET, CHESTPLATE, LEGGINGS, BOOTS)
val equip = listOf(NECKLACE, CLOAK, BELT, BRACELET)
- val pets = listOf(ELEPHANT, MOOSHROOM_COW, RABBIT, BEE)
+ val pets = listOf(ELEPHANT, MOOSHROOM_COW, RABBIT, BEE, SLUG)
fun getArmorDisplay(clickEnabled: Boolean = false): List<Renderable> = armor.map { it.getDisplay(clickEnabled) }
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt
index 2bbb10b95..960f5c915 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt
@@ -217,7 +217,7 @@ class OverviewPage(sizeX: Int, sizeY: Int, paddingX: Int = 15, paddingY: Int = 7
FFInfos.TOTAL_PET.bar(
"§2Total Pet Fortune",
"§7§2The total fortune from your pet and its item",
- 71
+ 72
)
)
@@ -225,7 +225,7 @@ class OverviewPage(sizeX: Int, sizeY: Int, paddingX: Int = 15, paddingY: Int = 7
FFInfos.PET_BASE.bar(
"§2Base Pet Fortune",
"§7§2The base fortune from your pet",
- 71
+ 72
)
)
@@ -238,7 +238,7 @@ class OverviewPage(sizeX: Int, sizeY: Int, paddingX: Int = 15, paddingY: Int = 7
"MINOS_RELIC" -> "§cGreen Bandana is better for fortune than minos relic!"
else -> "No fortune boosting pet item"
},
- 71
+ 72
)
)