diff options
author | DungeonHub <177025031+DungeonHub@users.noreply.github.com> | 2024-10-11 19:54:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-11 19:54:54 +0200 |
commit | 9c1a84491382ce9ffc4bf94cc5ee24f35b58a2cf (patch) | |
tree | aea82f6dce70d616ffc97afbfdd23e78400421d6 /src/main/java/at/hannibal2/skyhanni/features/itemabilities | |
parent | 60f92d58aec0ec976cf1b4933174c1143a20551c (diff) | |
download | skyhanni-9c1a84491382ce9ffc4bf94cc5ee24f35b58a2cf.tar.gz skyhanni-9c1a84491382ce9ffc4bf94cc5ee24f35b58a2cf.tar.bz2 skyhanni-9c1a84491382ce9ffc4bf94cc5ee24f35b58a2cf.zip |
Improvement: Added Item Cooldown to Totem of Corruption and Enrager (#2706)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/itemabilities')
2 files changed, 17 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt index 68f9798c3..6bc24f055 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt @@ -52,6 +52,8 @@ enum class ItemAbility( ROYAL_PIGEON(5), WAND_OF_STRENGTH(10), TACTICAL_INSERTION(20), + TOTEM_OF_CORRUPTION(20), + ENRAGER(20), // doesn't have a sound ENDER_BOW("Ender Warp", 5, "Ender Bow"), diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt index 830d823f6..fb15bd703 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt @@ -55,12 +55,14 @@ object ItemAbilityCooldown { private var lastAbility = "" private var items = mapOf<String, List<ItemText>>() private var abilityItems = mapOf<ItemStack, MutableList<ItemAbility>>() + private val recentItemsInHand = InventoryUtils.recentItemsInHand.values private val WEIRD_TUBA = "WEIRD_TUBA".asInternalName() private val WEIRDER_TUBA = "WEIRDER_TUBA".asInternalName() private val VOODOO_DOLL_WILTED = "VOODOO_DOLL_WILTED".asInternalName() private val WARNING_FLARE = "WARNING_FLARE".asInternalName() private val ALERT_FLARE = "ALERT_FLARE".asInternalName() private val SOS_FLARE = "SOS_FLARE".asInternalName() + private val TOTEM_OF_CORRUPTION = "TOTEM_OF_CORRUPTION".asInternalName() @SubscribeEvent @@ -192,13 +194,23 @@ object ItemAbilityCooldown { event.soundName == "mob.zombie.remedy" && event.pitch == 1.8888888f && event.volume == 0.7f -> { ItemAbility.TACTICAL_INSERTION.activate(null, 17_000) } + // Totem of Corruption + event.soundName == "random.wood_click" && event.pitch == 0.84126985f && event.volume == 0.5f -> { + if (TOTEM_OF_CORRUPTION in recentItemsInHand) { + ItemAbility.TOTEM_OF_CORRUPTION.sound() + } + } + // Enrager + event.soundName == "mob.enderdragon.growl" && event.pitch == 0.4920635f && event.volume == 2.0f -> { + ItemAbility.ENRAGER.sound() + } + // Blaze Slayer Flares event.soundName == "fireworks.launch" && event.pitch == 1.0f && event.volume == 3.0f -> { - val recent = InventoryUtils.recentItemsInHand.values - if (WARNING_FLARE in recent || ALERT_FLARE in recent) { + if (WARNING_FLARE in recentItemsInHand || ALERT_FLARE in recentItemsInHand) { ItemAbility.ALERT_FLARE.sound() } - if (SOS_FLARE in recent) { + if (SOS_FLARE in recentItemsInHand) { ItemAbility.SOS_FLARE.sound() } } |