Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Twinclaw and Steak Stake alert #395

Merged
merged 16 commits into from
Jun 25, 2023
Merged
15 changes: 15 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", subcategory = "Vampire Slayer"
)
var oneShotAllert = false;
CarsCupcake marked this conversation as resolved.
Show resolved Hide resolved

@Property(
type = PropertyType.SWITCH, name = "Twinclaw Alert",
description = "Shows a title when the Vampire Slayer is about to do a Twinclaw attack",
category = "Slayer", subcategory = "Vampire Slayer"
)
var twinclawAllert = false;
CarsCupcake marked this conversation as resolved.
Show resolved Hide resolved

@Property(
type = PropertyType.SWITCH, name = "Disable Cooldown Sounds",
description = "Blocks the sound effect played while an item is on cooldown.",
Expand Down Expand Up @@ -2886,6 +2900,7 @@ object Config : Vigilant(
)
var windHider = 0


CarsCupcake marked this conversation as resolved.
Show resolved Hide resolved
init {
addDependency("showEtherwarpTeleportPosColor", "showEtherwarpTeleportPos")

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")
VampireSlayer(entity)
} else null
}

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

class VampireSlayer(entity: EntityOtherPlayerMP) :
CarsCupcake marked this conversation as resolved.
Show resolved Hide resolved
Slayer<EntityOtherPlayerMP>(entity, "Riftstalker Bloodfiend", "§c☠ §4Bloodfiend") {
override fun tick(event: ClientTickEvent) {
if (Config.oneShotAllert && this.nameEntity != null && this.nameEntity?.displayName?.unformattedText?.contains(
CarsCupcake marked this conversation as resolved.
Show resolved Hide resolved
"҉"
) == true
) createTitle("§cSteak Stake!", 2)
else if (Config.twinclawAllert && this.timerEntity != null && this.timerEntity?.displayName?.unformattedText?.contains(
CarsCupcake marked this conversation as resolved.
Show resolved Hide resolved
"TWINCLAWS"
) == true
) createTitle("§6§lTWINCLAWS!", 2)
}
}
}