Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions spec/System/TestTriggers_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,23 @@ describe("TestTriggers", function()
assert.is_falsy(build.calcsTab.mainEnv.player.mainSkill.skillFlags.weapon2Attack)
end)

it("Use the equipped bow for Void Shot granted by Voidfletcher", function()
build.itemsTab:CreateDisplayItemFromRaw("Test Bow\nShort Bow")
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")

build.itemsTab:CreateDisplayItemFromRaw([[Voidfletcher
Ornate Quiver
Consumes a Void Charge to Trigger Level 20 Void Shot when you fire Arrows with a Non-Triggered Skill]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")

local mainSkill = build.calcsTab.mainEnv.player.mainSkill
assert.are.equals("Void Shot", mainSkill.activeEffect.grantedEffect.name)
assert.is_true(mainSkill.skillFlags.weapon1Attack)
assert.is_falsy(mainSkill.skillFlags.weapon2Attack)
end)

it("Trigger Ghostly Artillery with a projectile attack", function()
equipDreadCaptainsCutlass()
build.skillsTab:PasteSocketGroup("Lancing Steel 20/0 1\n")
Expand Down
2 changes: 2 additions & 0 deletions src/Data/Skills/other.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1925,6 +1925,7 @@ skills["FieryImpactHeistMaceImplicit"] = {
attack = true,
area = true,
melee = true,
forceSourceWeapon = true,
},
constantStats = {
{ "skill_physical_damage_%_to_convert_to_fire", 60 },
Expand Down Expand Up @@ -5953,6 +5954,7 @@ skills["GhostCannons"] = {
attack = true,
projectile = true,
area = true,
forceSourceWeapon = true,
},
constantStats = {
{ "skill_physical_damage_%_to_convert_to_fire", 50 },
Expand Down
4 changes: 2 additions & 2 deletions src/Export/Skills/other.txt
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ local skills, mod, flag, skill = ...
#mods

#skill FieryImpactHeistMaceImplicit
#flags attack area melee
#flags attack area melee forceSourceWeapon
fromItem = true,
#mods

Expand Down Expand Up @@ -1564,7 +1564,7 @@ local skills, mod, flag, skill = ...
#mods

#skill GhostCannons Ghostly Artillery
#flags attack projectile area
#flags attack projectile area forceSourceWeapon
fromItem = true,
#mods

Expand Down
4 changes: 2 additions & 2 deletions src/Modules/CalcActiveSkill.lua
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ function calcs.buildActiveSkillModList(env, activeSkill)
activeSkill.weapon2Flags = 0
else
-- Set weapon flags
if skillFlags.attack and activeSkill.socketGroup and activeSkill.socketGroup.sourceItem then
-- Item-granted attacks use the weapon that grants the skill
if skillFlags.forceSourceWeapon and activeSkill.socketGroup and activeSkill.socketGroup.sourceItem then
-- Some item-granted attacks must use the weapon that grants the skill
local sourceSlot = activeSkill.socketGroup.slot or ""
skillFlags.forceMainHand = sourceSlot:match("^Weapon 1") ~= nil
skillFlags.forceOffHand = sourceSlot:match("^Weapon 2") ~= nil
Expand Down
Loading