From 5b5cc01d5c3721b9e423c67641e3f801a02cee9c Mon Sep 17 00:00:00 2001 From: Lucas Karsten Date: Thu, 19 Nov 2026 08:36:24 -0300 Subject: [PATCH 1/2] Fix Pact of Lycia uptime consuming an Empowerment per channel stage Channelled spells stay Empowered until the channel ends, so each channel uses one Empowerment. Add a config option for the channel duration; without it the channel is assumed to cover the whole uptime. --- spec/System/TestSkills_spec.lua | 17 +++++++++++++++++ src/Modules/CalcOffence.lua | 7 ++++++- src/Modules/ConfigOptions.lua | 3 +++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/spec/System/TestSkills_spec.lua b/spec/System/TestSkills_spec.lua index cde56864a9..d2a30a9cd8 100644 --- a/spec/System/TestSkills_spec.lua +++ b/spec/System/TestSkills_spec.lua @@ -965,4 +965,21 @@ describe("TestSkills", function() assert.is_nil(build.calcsTab.mainEnv.player.modDB.multipliers["Cruelty"]) end end) + + it("Pact of Lycia uses one Empowerment per channel, not per channel stage (issue #10447)", function() + build.skillsTab:PasteSocketGroup("Slot: Weapon 1\nLightning Tendrils 20/0 1\n") + build.skillsTab:PasteSocketGroup("Pact of Lycia 20/0 1\n") + build.mainSocketGroup = 1 + runCallback("OnFrame") + local output = build.calcsTab.mainOutput + assert.are.equals(100, output.LyciaUpTimeRatio) + + build.configTab.input.pactLyciaChannelDuration = 0.5 + build.configTab:BuildModList() + runCallback("OnFrame") + output = build.calcsTab.mainOutput + local expected = output.LyciaEmpoweredCount * 0.5 / (output.PactOfLyciaCooldown + output.PactOfLyciaCastTime) * 100 + assert.is_true(expected < 100) + assert.are.near(expected, output.LyciaUpTimeRatio, 0.0001) + end) end) diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index bea7d97e17..38c4e8e783 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -2941,6 +2941,11 @@ function calcs.offence(env, actor, activeSkill) local storedUses = value.skillData.storedUses + value.skillModList:Sum("BASE", value.skillCfg, "AdditionalCooldownUses") -- Repeated spells retain the empowerment from the initial cast without consuming another use. local empoweredUseRate = globalOutput.Speed / globalOutput.Repeats + if pactKey == "Lycia" then + -- A channelled spell stays Empowered until the channel ends, so each channel uses one Empowerment. + local channelDuration = skillModList:Sum("BASE", nil, "LyciaChannelDuration") + empoweredUseRate = channelDuration > 0 and 1 / channelDuration or 0 + end local uptime = empoweredUseRate == 0 and 100 or m_min((count / empoweredUseRate) / (cooldown + castTime), 1) * 100 uptime = m_min(100, uptime * storedUses) local effect = skillModList:Flag(nil, "Condition:PactMaxHit") and 100 or uptime @@ -2954,7 +2959,7 @@ function calcs.offence(env, actor, activeSkill) if globalBreakdown then globalBreakdown[pactKey.."UpTimeRatio"] = { s_format("(%.2f ^8(number of Empowered)", count), - s_format("/ %.2f) ^8(non-repeated casts per second)", empoweredUseRate), + s_format("/ %.2f) ^8(%s per second)", empoweredUseRate, pactKey == "Lycia" and "channels" or "non-repeated casts"), s_format("/ (%.2f ^8(pact cooldown)", cooldown), s_format("+ %.2f) ^8(pact cast time)", castTime), s_format("* %.2f ^8(stored uses)", storedUses), diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index c258394668..a7681aab89 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -247,6 +247,9 @@ return { modList:NewMod("Condition:PactMaxHit", "FLAG", true, "Config") end end }, + { var = "pactLyciaChannelDuration", type = "float", label = "Pact of Lycia channel duration:", ifSkill = "Pact of Lycia", tooltip = "Seconds you channel each Empowered spell before releasing it.\nEach channel uses one Empowerment for its whole duration.\nLeave blank to assume you channel without releasing.", apply = function(val, modList, enemyModList) + modList:NewMod("LyciaChannelDuration", "BASE", val, "Config") + end }, { var = "EVBypass", type = "check", label = "Disable Emperor's Vigilance Bypass", ifCond = "EVBypass", apply = function(val, modList, enemyModList) modList:NewMod("Condition:EVBypass", "FLAG", true, "Config") end }, From 76915657cda1c2f8e01789c5796af405bce8e1e1 Mon Sep 17 00:00:00 2001 From: Lucas Karsten Date: Thu, 19 Nov 2026 08:46:15 -0300 Subject: [PATCH 2/2] Clamp Pact of Lycia channel duration and clarify its breakdown A channel cannot be shorter than one stage. Show a short breakdown when no channel duration is set, and name the unit in the config label. --- spec/System/TestSkills_spec.lua | 19 ++++++++++++++++--- src/Modules/CalcOffence.lua | 10 ++++++++-- src/Modules/ConfigOptions.lua | 2 +- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/spec/System/TestSkills_spec.lua b/spec/System/TestSkills_spec.lua index d2a30a9cd8..fc893adda8 100644 --- a/spec/System/TestSkills_spec.lua +++ b/spec/System/TestSkills_spec.lua @@ -967,12 +967,15 @@ describe("TestSkills", function() end) it("Pact of Lycia uses one Empowerment per channel, not per channel stage (issue #10447)", function() - build.skillsTab:PasteSocketGroup("Slot: Weapon 1\nLightning Tendrils 20/0 1\n") - build.skillsTab:PasteSocketGroup("Pact of Lycia 20/0 1\n") - build.mainSocketGroup = 1 + build.skillsTab:PasteSocketGroup("Lightning Tendrils 20/0 1") + runCallback("OnFrame") + local baseDPS = build.calcsTab.mainOutput.TotalDPS + build.skillsTab:PasteSocketGroup("Pact of Lycia 20/0 1") runCallback("OnFrame") local output = build.calcsTab.mainOutput assert.are.equals(100, output.LyciaUpTimeRatio) + assert.are.near(baseDPS * 1.4, output.TotalDPS, baseDPS * 0.001) + assert.is_truthy(build.calcsTab.mainEnv.player.breakdown.LyciaUpTimeRatio[1]:match("without releasing")) build.configTab.input.pactLyciaChannelDuration = 0.5 build.configTab:BuildModList() @@ -982,4 +985,14 @@ describe("TestSkills", function() assert.is_true(expected < 100) assert.are.near(expected, output.LyciaUpTimeRatio, 0.0001) end) + + it("Pact of Lycia channel duration cannot be shorter than one channel stage (issue #10447)", function() + build.skillsTab:PasteSocketGroup("Lightning Tendrils 20/0 1\nPact of Lycia 20/0 1") + build.configTab.input.pactLyciaChannelDuration = 0.01 + build.configTab:BuildModList() + runCallback("OnFrame") + local output = build.calcsTab.mainOutput + local expected = output.LyciaEmpoweredCount / output.Speed / (output.PactOfLyciaCooldown + output.PactOfLyciaCastTime) * 100 + assert.are.near(expected, output.LyciaUpTimeRatio, 0.0001) + end) end) diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index 38c4e8e783..c176ea3392 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -2944,7 +2944,8 @@ function calcs.offence(env, actor, activeSkill) if pactKey == "Lycia" then -- A channelled spell stays Empowered until the channel ends, so each channel uses one Empowerment. local channelDuration = skillModList:Sum("BASE", nil, "LyciaChannelDuration") - empoweredUseRate = channelDuration > 0 and 1 / channelDuration or 0 + -- A channel cannot be shorter than one stage. + empoweredUseRate = channelDuration > 0 and m_min(1 / channelDuration, globalOutput.Speed) or 0 end local uptime = empoweredUseRate == 0 and 100 or m_min((count / empoweredUseRate) / (cooldown + castTime), 1) * 100 uptime = m_min(100, uptime * storedUses) @@ -2956,7 +2957,12 @@ function calcs.offence(env, actor, activeSkill) globalOutput["PactOf"..pactKey.."CastTime"] = castTime globalOutput[pactKey.."EmpoweredCount"] = count globalOutput[pactKey.."UpTimeRatio"] = uptime - if globalBreakdown then + if globalBreakdown and pactKey == "Lycia" and empoweredUseRate == 0 then + globalBreakdown[pactKey.."UpTimeRatio"] = { + "Channelled without releasing ^8(no channel duration set)", + s_format("= %.2f%%", uptime), + } + elseif globalBreakdown then globalBreakdown[pactKey.."UpTimeRatio"] = { s_format("(%.2f ^8(number of Empowered)", count), s_format("/ %.2f) ^8(%s per second)", empoweredUseRate, pactKey == "Lycia" and "channels" or "non-repeated casts"), diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index a7681aab89..41055f468c 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -247,7 +247,7 @@ return { modList:NewMod("Condition:PactMaxHit", "FLAG", true, "Config") end end }, - { var = "pactLyciaChannelDuration", type = "float", label = "Pact of Lycia channel duration:", ifSkill = "Pact of Lycia", tooltip = "Seconds you channel each Empowered spell before releasing it.\nEach channel uses one Empowerment for its whole duration.\nLeave blank to assume you channel without releasing.", apply = function(val, modList, enemyModList) + { var = "pactLyciaChannelDuration", type = "float", label = "Pact of Lycia channel duration (seconds):", ifSkill = "Pact of Lycia", tooltip = "Seconds you channel each Empowered spell before releasing it.\nEach channel uses one Empowerment for its whole duration.\nFor skills released at the end of a channel, such as Flameblast or Divine Ire, enter their channel time.\nLeave blank to assume you channel without releasing.", apply = function(val, modList, enemyModList) modList:NewMod("LyciaChannelDuration", "BASE", val, "Config") end }, { var = "EVBypass", type = "check", label = "Disable Emperor's Vigilance Bypass", ifCond = "EVBypass", apply = function(val, modList, enemyModList)