diff options
2 files changed, 23 insertions, 6 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 020feba76..68f9798c3 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 @@ -29,6 +29,8 @@ enum class ItemAbility( ATOMSPLIT_KATANA(4, "VORPAL_KATANA", "VOIDEDGE_KATANA", ignoreMageCooldownReduction = true), RAGNAROCK_AXE(20), WAND_OF_ATONEMENT(7, "WAND_OF_HEALING", "WAND_OF_MENDING", "WAND_OF_RESTORATION"), + SOS_FLARE(10), + ALERT_FLARE(20, "WARNING_FLARE"), GOLEM_SWORD(3), END_STONE_SWORD(5), @@ -75,7 +77,7 @@ enum class ItemAbility( cooldownInSeconds, actionBarDetection = false, alternativePosition = alternativePosition, - ignoreMageCooldownReduction = ignoreMageCooldownReduction + ignoreMageCooldownReduction = ignoreMageCooldownReduction, ) { newVariant = true alternateInternalNames.forEach { 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 5abf8679a..7715f7456 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 @@ -44,11 +44,11 @@ object ItemAbilityCooldown { private val patternGroup = RepoPattern.group("item.abilities.cooldown") private val youAlignedOthersPattern by patternGroup.pattern( "alignedother", - "§eYou aligned §r§a.* §r§eother player(s)?!" + "§eYou aligned §r§a.* §r§eother player(s)?!", ) private val youBuffedYourselfPattern by patternGroup.pattern( "buffedyourself", - "§aYou buffed yourself for §r§c\\+\\d+❁ Strength" + "§aYou buffed yourself for §r§c\\+\\d+❁ Strength", ) private var lastAbility = "" @@ -57,6 +57,10 @@ object ItemAbilityCooldown { 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() + @SubscribeEvent fun onPlaySound(event: PlaySoundEvent) { @@ -87,7 +91,7 @@ object ItemAbilityCooldown { val internalName = InventoryUtils.getItemInHand()?.getInternalName() ?: return if (!internalName.equalsOneOf( "SHADOW_FURY".asInternalName(), - "STARRED_SHADOW_FURY".asInternalName() + "STARRED_SHADOW_FURY".asInternalName(), ) ) return @@ -175,7 +179,7 @@ object ItemAbilityCooldown { event.soundName == "mob.bat.idle" && event.pitch == 0.4920635f && event.volume == 1.0f -> { ItemAbility.ROYAL_PIGEON.sound() } - + // Wand of Strength event.soundName == "random.eat" && event.pitch == 0.4920635f && event.volume == 1.0f -> { ItemAbility.WAND_OF_STRENGTH.sound() } @@ -183,9 +187,20 @@ object ItemAbilityCooldown { event.soundName == "fire.ignite" && event.pitch == 0.74603176f && event.volume == 1.0f -> { ItemAbility.TACTICAL_INSERTION.activate(LorenzColor.DARK_PURPLE, 3_000) } + event.soundName == "mob.zombie.remedy" && event.pitch == 1.8888888f && event.volume == 0.7f -> { ItemAbility.TACTICAL_INSERTION.activate(null, 17_000) } + // 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) { + ItemAbility.ALERT_FLARE.sound() + } + if (SOS_FLARE in recent) { + ItemAbility.SOS_FLARE.sound() + } + } } } @@ -276,7 +291,7 @@ object ItemAbilityCooldown { items = abilityItems.entries.associateByTo( mutableMapOf(), { it.key.getIdentifier() }, - { kp -> kp.value.map { createItemText(it) } } + { kp -> kp.value.map { createItemText(it) } }, ).mapKeysNotNull { it.key } } |