Skip to content

Commit

Permalink
Merge branch 'Skytils:1.x' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
zealerker22 committed Jun 25, 2023
2 parents e082225 + 6467ced commit 339af2a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/main/kotlin/gg/skytils/skytilsmod/core/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2492,6 +2492,20 @@ object Config : Vigilant(
)
var attunementDisplay = false

@Property(
type = PropertyType.SWITCH, name = "Vampire Slayer One Shot Alert",
description = "Shows a title when you can one-shot the Vampire Slayer with Steak Stake",
category = "Slayer"
)
var oneShotAlert = false

@Property(
type = PropertyType.SWITCH, name = "Twinclaw Alert",
description = "Shows a title when the Vampire Slayer is about to do a Twinclaw attack",
category = "Slayer"
)
var twinclawAlert = false

@Property(
type = PropertyType.SWITCH, name = "Disable Cooldown Sounds",
description = "Blocks the sound effect played while an item is on cooldown.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import gg.essential.universal.UResolution
import gg.skytils.skytilsmod.Skytils
import gg.skytils.skytilsmod.Skytils.Companion.mc
import gg.skytils.skytilsmod.Skytils.Companion.prefix
import gg.skytils.skytilsmod.core.Config
import gg.skytils.skytilsmod.core.GuiManager
import gg.skytils.skytilsmod.core.GuiManager.createTitle
import gg.skytils.skytilsmod.core.SoundQueue
Expand Down Expand Up @@ -136,7 +137,7 @@ object SlayerFeatures : CoroutineScope {
is EntityBlaze -> DemonlordSlayer(entity)
is EntityOtherPlayerMP -> {
if (entity.name == "Bloodfiend ") {
Slayer(entity, "Riftstalker Bloodfiend", "§c☠ §4Bloodfiend")
BloodfiendSlayer(entity)
} else null
}

Expand Down Expand Up @@ -1387,4 +1388,18 @@ object SlayerFeatures : CoroutineScope {
}
}
}

class BloodfiendSlayer(entity: EntityOtherPlayerMP) :
Slayer<EntityOtherPlayerMP>(entity, "Riftstalker Bloodfiend", "§c☠ §4Bloodfiend") {
override fun tick(event: ClientTickEvent) {
if (Config.oneShotAlert && this.nameEntity?.displayName?.unformattedText?.contains(
"҉"
) == true
) createTitle("§cSteak Stake!", 2)
else if (Config.twinclawAlert && this.timerEntity?.displayName?.unformattedText?.contains(
"TWINCLAWS"
) == true
) createTitle("§6§lTWINCLAWS!", 2)
}
}
}

0 comments on commit 339af2a

Please sign in to comment.