Skip to content

Commit 5f8b1c3

Browse files
committed
Fix Wings of Entropy not working with Chain Hook, Lacerate and of Haemo, Swordstorm
Fix Wings working with Laacerate of Butchery when it shouldn't, keep Ice Crash of Cadence working even with its weird 2H weaponTypes
1 parent 4320038 commit 5f8b1c3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/Modules/CalcActiveSkill.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,15 @@ function calcs.copyActiveSkill(env, mode, skill)
184184
end
185185

186186
-- Get weapon flags and info for given weapon
187-
local function getWeaponFlags(env, weaponData, weaponTypes)
187+
local function getWeaponFlags(env, weaponData, weaponTypes, skillTypeDualWieldOnly)
188188
local info = env.data.weaponTypeInfo[weaponData.type]
189189
if not info then
190190
return
191191
end
192192
if weaponTypes then
193193
for _, types in ipairs(weaponTypes) do
194-
if not types[weaponData.type] and
195-
(not weaponData.countsAsAll1H or not (types["Claw"] or types["Dagger"] or types["One Handed Axe"] or types["One Handed Mace"] or types["One Handed Sword"])) then
194+
if (not types[weaponData.type] and (not weaponData.countsAsAll1H or not (types["Claw"] or types["Dagger"] or types["One Handed Axe"] or types["One Handed Mace"] or types["One Handed Sword"])) and not weaponData.countsAsDualWielding) or
195+
(weaponData.countsAsDualWielding and (not (types["One Handed Axe"] or types["One Handed Sword"]) and not skillTypeDualWieldOnly)) then -- Wings of Entropy special case
196196
return nil, info
197197
end
198198
end
@@ -279,7 +279,7 @@ function calcs.buildActiveSkillModList(env, activeSkill)
279279
t_insert(weaponTypes, skillEffect.grantedEffect.weaponTypes)
280280
end
281281
end
282-
local weapon1Flags, weapon1Info = getWeaponFlags(env, activeSkill.actor.weaponData1, weaponTypes)
282+
local weapon1Flags, weapon1Info = getWeaponFlags(env, activeSkill.actor.weaponData1, weaponTypes, skillTypes[SkillType.DualWieldOnly])
283283
if not weapon1Flags and activeSkill.summonSkill then
284284
-- Minion skills seem to ignore weapon types
285285
weapon1Flags, weapon1Info = ModFlag[env.data.weaponTypeInfo["None"].flag], env.data.weaponTypeInfo["None"]
@@ -300,7 +300,7 @@ function calcs.buildActiveSkillModList(env, activeSkill)
300300
activeSkill.disableReason = "Main Hand weapon is not usable with this skill"
301301
end
302302
if not skillTypes[SkillType.MainHandOnly] and not skillFlags.forceMainHand then
303-
local weapon2Flags, weapon2Info = getWeaponFlags(env, activeSkill.actor.weaponData2, weaponTypes)
303+
local weapon2Flags, weapon2Info = getWeaponFlags(env, activeSkill.actor.weaponData2, weaponTypes, skillTypes[SkillType.DualWieldOnly])
304304
if weapon2Flags then
305305
if skillTypes[SkillType.DualWieldRequiresDifferentTypes] and (activeSkill.actor.weaponData1.type == activeSkill.actor.weaponData2.type) then
306306
-- Skill requires a different compatible off hand weapon to main hand weapon

0 commit comments

Comments
 (0)