From 5b5d8860c5d622738c4720079cff5a8bd6b5ce46 Mon Sep 17 00:00:00 2001 From: Jrc13245 Date: Thu, 27 Nov 2025 18:18:54 -0500 Subject: [PATCH] new conditional channeltime and bump version --- Conditionals.lua | 16 ++++++++++++++++ README.md | 9 +++++++++ SuperCleveRoidMacros.toc | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Conditionals.lua b/Conditionals.lua index af71131..aae5dd1 100644 --- a/Conditionals.lua +++ b/Conditionals.lua @@ -1977,6 +1977,22 @@ CleveRoids.Keywords = { return CleveRoids.CurrentSpell.type ~= "channeled" end, + channeltime = function(conditionals) + local playerCast = CleveRoids.spell_tracking[CleveRoids.playerGuid] + if not playerCast or playerCast.type ~= "CHANNEL" then + return false + end + + local timeLeft = playerCast.expires - GetTime() + local check = conditionals.channeltime + + if type(check) == "table" and check.operator and check.amount then + return CleveRoids.comparators[check.operator](timeLeft, check.amount) + end + + return false + end, + targeting = function(conditionals) return Or(conditionals.targeting, function (unit) return (UnitIsUnit("targettarget", unit) == 1) diff --git a/README.md b/README.md index b0bafa5..e372c7e 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,14 @@ Icons and tooltips automatically update to the first action with passing conditi /use 2288 ``` +### Channel Time Conditional +Recast channeled spells when time remaining is below threshold: +```lua +#showtooltip Arcane Missiles +/cast [channeltime:<0.5] Arcane Missiles +``` +This will recast Arcane Missiles only when less than 0.5 seconds remain on the current channel, preventing early cancellation and maximizing damage. + ### Macro References Macro 1 shows Macro 2's icon when out of combat: ```lua @@ -487,6 +495,7 @@ Default `[noimmune]` checks the debuff school (bleed). |-------------|--------|:-----:|:------:|-----------| | cdgcd | [cdgcd:"Name">X] | * | * | Cooldown **INCLUDING** GCD | | channeled | [channeled] | | * | Player channeling | +| channeltime | [channeltime:<0.5] | * | | Remaining channel time | | checkchanneled | [checkchanneled] | | | Prevent recasting channel | | combo | [combo:>#3] | * | * | Combo points | | cooldown | [cooldown:"Name"