aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-06-15 14:43:10 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-06-15 14:43:10 +0200
commita303f356007d7833a41c73c71524044393e3620c (patch)
tree0949944d3a0202342b8a8aaa4ffef8451df729d3 /src/main/java/at
parent57246cc1053215bd4a4e66857eeefc9c83b399f4 (diff)
downloadskyhanni-a303f356007d7833a41c73c71524044393e3620c.tar.gz
skyhanni-a303f356007d7833a41c73c71524044393e3620c.tar.bz2
skyhanni-a303f356007d7833a41c73c71524044393e3620c.zip
Added cells alignment ability cooldown
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt40
1 files changed, 34 insertions, 6 deletions
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 8ba7eca09..13af7e369 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
@@ -48,11 +48,11 @@ class ItemAbilityCooldown {
ItemAbility.ATOMSPLIT_KATANA.sound()
}
}
- if (event.soundName == "random.click") {
- if (event.pitch == 2.0f && event.volume == 0.55f) {
- ItemAbility.RAGNAROCK_AXE.sound()
- }
- }
+// if (event.soundName == "random.click") {
+// if (event.pitch == 2.0f && event.volume == 0.55f) {
+// ItemAbility.RAGNAROCK_AXE.sound()
+// }
+// }
if (event.soundName == "liquid.lavapop") {
if (event.pitch == 0.7619048f && event.volume == 0.15f) {
ItemAbility.WAND_OF_ATONEMENT.sound()
@@ -137,6 +137,22 @@ class ItemAbilityCooldown {
if (!isEnabled()) return
val message: String = event.message
+ handleOldAbilities(message)
+
+ if (message.contains("§lCASTING IN ")) {
+ if (ItemAbility.RAGNAROCK_AXE.specialColor != LorenzColor.WHITE) {
+ ItemAbility.RAGNAROCK_AXE.activate(LorenzColor.WHITE, -17_000)
+ }
+ } else if (message.contains("§lCASTING")) {
+ if (ItemAbility.RAGNAROCK_AXE.specialColor == LorenzColor.WHITE) {
+ ItemAbility.RAGNAROCK_AXE.activate(LorenzColor.DARK_PURPLE, -17_000)
+ }
+ } else if (message.contains("§c§lCANCELLED")) {
+ ItemAbility.RAGNAROCK_AXE.activate(null, -3_000)
+ }
+ }
+
+ private fun handleOldAbilities(message: String) {
if (message.contains(" (§6")) {
if (message.contains("§b) ")) {
val name: String = message.between(" (§6", "§b) ")
@@ -208,6 +224,11 @@ class ItemAbilityCooldown {
ability.activate(null, -4_000)
}
}
+ if (ability == ItemAbility.RAGNAROCK_AXE) {
+ if (specialColor == LorenzColor.DARK_PURPLE) {
+ ability.activate(null, -6_000)
+ }
+ }
}
@SubscribeEvent
@@ -243,6 +264,8 @@ class ItemAbilityCooldown {
@SubscribeEvent
fun onChatMessage(event: LorenzChatEvent) {
+ if (!isEnabled()) return
+
val message = event.message
if (message == "§dCreeper Veil §r§aActivated!") {
ItemAbility.WITHER_CLOAK.activate(LorenzColor.LIGHT_PURPLE)
@@ -292,5 +315,10 @@ class ItemAbilityCooldown {
}
}
- class ItemText(val color: LorenzColor, val text: String, val onCooldown: Boolean, val alternativePosition: Boolean)
+ class ItemText(
+ val color: LorenzColor,
+ val text: String,
+ val onCooldown: Boolean,
+ val alternativePosition: Boolean,
+ )
}