From 35a171fcc4833867f9abeec9c86572cd0b50b7ed Mon Sep 17 00:00:00 2001 From: cupkax Date: Tue, 25 Aug 2026 07:45:58 +1000 Subject: [PATCH 1/2] Allow nightblade for support-granted attacks --- src/Modules/CalcTools.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Modules/CalcTools.lua b/src/Modules/CalcTools.lua index 3c17791bc5..758af3e94e 100644 --- a/src/Modules/CalcTools.lua +++ b/src/Modules/CalcTools.lua @@ -117,7 +117,8 @@ function calcLib.canGrantedEffectSupportActiveSkill(grantedEffect, activeSkill, -- Special case for Sacred Wisps, i.e. Wisps Support has a weaponType of Wand so it should only match with Active Skills that at least have Wand as a weaponType. -- Super special case for Varunastra, e.g. allow Nightblade to support Smite. local actorHasAllOneHand = (activeSkill.actor.weaponData1 and activeSkill.actor.weaponData1.countsAsAll1H) or (activeSkill.actor.weaponData2 and activeSkill.actor.weaponData2.countsAsAll1H) - if grantedEffect.weaponTypes then + -- Skills granted by a support gem (e.g. Windburst) have no weapon types of their own; the weapon restriction applies to the skill that triggers them. + if grantedEffect.weaponTypes and not effectiveSkillTypes[SkillType.SkillGrantedBySupport] then -- Build a lookup of the active skill's weapon types local activeTypeLookup = { } if activeSkill.activeEffect.grantedEffect.weaponTypes then From 1cf0abb21634ed90daa7bcff57b6e2a5a9900a98 Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Wed, 26 Aug 2026 22:20:02 +1000 Subject: [PATCH 2/2] Fix implementation Was causing issues with sacred wisps where it didn't care about equipped weapons anymore --- spec/System/TestSkills_spec.lua | 23 +++++++++++++++++++++++ src/Modules/CalcTools.lua | 11 +++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/spec/System/TestSkills_spec.lua b/spec/System/TestSkills_spec.lua index 92e2a3a868..12f9edbc57 100644 --- a/spec/System/TestSkills_spec.lua +++ b/spec/System/TestSkills_spec.lua @@ -89,6 +89,29 @@ describe("TestSkills", function() assert.True(build.calcsTab.mainOutput.MirageDPS ~= nil) end) + + it("checks equipped weapon types for support-granted attacks", function() + build.itemsTab:CreateDisplayItemFromRaw("Test Claw\nImperial Claw") + build.itemsTab:AddDisplayItem() + build.skillsTab:PasteSocketGroup("Cobra Lash 20/0 1\nWindburst 20/0 1\nNightblade 20/0 1\nSacred Wisps 20/0 1\n") + runCallback("OnFrame") + + local windburst + for _, activeSkill in ipairs(build.calcsTab.mainEnv.player.activeSkillList) do + if activeSkill.activeEffect.grantedEffect.id == "TriggeredSupportWindburst" then + windburst = activeSkill + break + end + end + assert.is_not_nil(windburst) + + local supports = { } + for _, effect in ipairs(windburst.effectList) do + supports[effect.grantedEffect.id] = true + end + assert.is_true(supports.SupportNightblade) + assert.is_nil(supports.SupportSacredWisps) + end) it("Test Scorching ray applying exposure at max stages", function() build.skillsTab:PasteSocketGroup("Scorching Ray 20/0 1\n") diff --git a/src/Modules/CalcTools.lua b/src/Modules/CalcTools.lua index 758af3e94e..aafc74e523 100644 --- a/src/Modules/CalcTools.lua +++ b/src/Modules/CalcTools.lua @@ -117,14 +117,21 @@ function calcLib.canGrantedEffectSupportActiveSkill(grantedEffect, activeSkill, -- Special case for Sacred Wisps, i.e. Wisps Support has a weaponType of Wand so it should only match with Active Skills that at least have Wand as a weaponType. -- Super special case for Varunastra, e.g. allow Nightblade to support Smite. local actorHasAllOneHand = (activeSkill.actor.weaponData1 and activeSkill.actor.weaponData1.countsAsAll1H) or (activeSkill.actor.weaponData2 and activeSkill.actor.weaponData2.countsAsAll1H) - -- Skills granted by a support gem (e.g. Windburst) have no weapon types of their own; the weapon restriction applies to the skill that triggers them. - if grantedEffect.weaponTypes and not effectiveSkillTypes[SkillType.SkillGrantedBySupport] then + if grantedEffect.weaponTypes then -- Build a lookup of the active skill's weapon types local activeTypeLookup = { } if activeSkill.activeEffect.grantedEffect.weaponTypes then for activeType in pairs(activeSkill.activeEffect.grantedEffect.weaponTypes) do activeTypeLookup[activeType] = true end + elseif effectiveSkillTypes[SkillType.SkillGrantedBySupport] then + -- Skills granted by supports do not have their own weaponTypes, so check the equipped weapons instead. + if activeSkill.actor.weaponData1.type then + activeTypeLookup[activeSkill.actor.weaponData1.type] = true + end + if activeSkill.actor.weaponData2.type then + activeTypeLookup[activeSkill.actor.weaponData2.type] = true + end end -- If the support expects a weapon type but the active skill doesn't have any (e.g. shield skills), it's not a match. if not next(activeTypeLookup) then