Skip to content

Commit 518b4b3

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 fe8429a commit 518b4b3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Modules/CalcActiveSkill.lua

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

211211
-- Get weapon flags and info for given weapon
212-
local function getWeaponFlags(env, weaponData, weaponTypes)
212+
local function getWeaponFlags(env, weaponData, weaponTypes, skillTypeDualWieldOnly)
213213
local info = env.data.weaponTypeInfo[weaponData.type]
214214
if not info then
215215
return
216216
end
217217
if weaponTypes then
218218
for _, types in ipairs(weaponTypes) do
219-
if not types[weaponData.type] and
220-
(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
219+
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
220+
(weaponData.countsAsDualWielding and (not (types["One Handed Axe"] or types["One Handed Sword"]) and not skillTypeDualWieldOnly)) then -- Wings of Entropy special case
221221
return nil, info
222222
end
223223
end
@@ -304,7 +304,7 @@ function calcs.buildActiveSkillModList(env, activeSkill)
304304
t_insert(weaponTypes, skillEffect.grantedEffect.weaponTypes)
305305
end
306306
end
307-
local weapon1Flags, weapon1Info = getWeaponFlags(env, activeSkill.actor.weaponData1, weaponTypes)
307+
local weapon1Flags, weapon1Info = getWeaponFlags(env, activeSkill.actor.weaponData1, weaponTypes, skillTypes[SkillType.DualWieldOnly])
308308
if not weapon1Flags and activeSkill.summonSkill then
309309
-- Minion skills seem to ignore weapon types
310310
weapon1Flags, weapon1Info = ModFlag[env.data.weaponTypeInfo["None"].flag], env.data.weaponTypeInfo["None"]
@@ -325,7 +325,7 @@ function calcs.buildActiveSkillModList(env, activeSkill)
325325
activeSkill.disableReason = "Main Hand weapon is not usable with this skill"
326326
end
327327
if not skillTypes[SkillType.MainHandOnly] and not skillFlags.forceMainHand then
328-
local weapon2Flags, weapon2Info = getWeaponFlags(env, activeSkill.actor.weaponData2, weaponTypes)
328+
local weapon2Flags, weapon2Info = getWeaponFlags(env, activeSkill.actor.weaponData2, weaponTypes, skillTypes[SkillType.DualWieldOnly])
329329
if weapon2Flags then
330330
if skillTypes[SkillType.DualWieldRequiresDifferentTypes] and (activeSkill.actor.weaponData1.type == activeSkill.actor.weaponData2.type) then
331331
-- Skill requires a different compatible off hand weapon to main hand weapon

0 commit comments

Comments
 (0)