Skip to content
Closed
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
34 changes: 33 additions & 1 deletion spec/System/TestSkills_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,38 @@ describe("TestSkills", function()
assert.True(math.abs(finalCost - 8.67) < 0.1) -- floor(9 * 1.5) / 1.5
end)

it("Bow Attacks fire additional arrows increases bow projectile count", function()
build.itemsTab:CreateDisplayItemFromRaw([[
New Item
Warmonger Bow
]])
build.itemsTab:AddDisplayItem()
build.skillsTab:PasteSocketGroup("Lightning Arrow 20/0 1")
runCallback("OnFrame")

local baseProjectileCount = build.calcsTab.mainOutput.ProjectileCount
assert.truthy(baseProjectileCount)

build.configTab.input.customMods = "Bow Attacks fire 2 additional Arrows"
build.configTab:BuildModList()
runCallback("OnFrame")

assert.are.equals(baseProjectileCount + 2, build.calcsTab.mainOutput.ProjectileCount)

newBuild()

build.skillsTab:PasteSocketGroup("Ball Lightning 20/0 1")
runCallback("OnFrame")

local spellProjectileCount = build.calcsTab.mainOutput.ProjectileCount

build.configTab.input.customMods = "Bow Attacks fire 2 additional Arrows"
build.configTab:BuildModList()
runCallback("OnFrame")

assert.are.equals(spellProjectileCount, build.calcsTab.mainOutput.ProjectileCount)
end)

it("Test mana cost efficiency with support gems", function()
-- Test interaction between cost efficiency and cost multipliers
build.skillsTab:PasteSocketGroup("Contagion 6/0 1\nMagnified Area I 1/0 1")
Expand Down Expand Up @@ -245,4 +277,4 @@ describe("TestSkills", function()

assert.True(build.calcsTab.calcsOutput.Cooldown == 10)
end)
end)
end)
6 changes: 3 additions & 3 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4705,11 +4705,11 @@ local specialModList = {
["projectiles split towards %+(%d) targets"] = function(num) return { mod("SplitCount", "BASE", num) } end,
["adds an additional arrow"] = { mod("ProjectileCount", "BASE", 1, nil, ModFlag.Attack) },
["(%d+) additional arrows"] = function(num) return { mod("ProjectileCount", "BASE", num, nil, 0, KeywordFlag.Arrow) } end,
["bow attacks fire an additional arrow"] = { mod("ProjectileCount", "BASE", 1, nil, 0, KeywordFlag.Arrow) },
["bow attacks fire an additional arrow"] = { mod("ProjectileCount", "BASE", 1, nil, ModFlag.Bow) },
["%+(%d+)%% surpassing chance to fire an additional arrow"] = function(num) return { mod("SurpassingProjectileChance", "BASE", num, nil, 0, KeywordFlag.Arrow) } end,
["%+(%d+)%% surpassing chance to fire an additional projectile"] = function(num) return { mod("SurpassingProjectileChance", "BASE", num) } end,
["bow attacks fire (%d+) additional arrows"] = function(num) return { mod("ProjectileCount", "BASE", num, nil, 0, KeywordFlag.Arrow) } end,
["bow attacks fire (%d+) additional arrows if you haven't cast dash recently"] = function(num) return { mod("ProjectileCount", "BASE", num, nil, 0, KeywordFlag.Arrow, { type = "Condition", var = "CastDashRecently", neg = true }) } end,
["bow attacks fire (%d+) additional arrows"] = function(num) return { mod("ProjectileCount", "BASE", num, nil, ModFlag.Bow) } end,
["bow attacks fire (%d+) additional arrows if you haven't cast dash recently"] = function(num) return { mod("ProjectileCount", "BASE", num, nil, ModFlag.Bow, { type = "Condition", var = "CastDashRecently", neg = true }) } end,
["wand attacks fire an additional projectile"] = { mod("ProjectileCount", "BASE", 1, nil, ModFlag.Wand) },
["loads? an additional bolt"] = { mod("CrossbowBoltCount", "BASE", 1, nil, ModFlag.Crossbow, { type = "SkillType", skillType = SkillType.CrossbowSkill }) },
["loads? (%d+) additional bolts?"] = function(num) return { mod("CrossbowBoltCount", "BASE", num, nil, ModFlag.Crossbow, { type = "SkillType", skillType = SkillType.CrossbowSkill }) } end,
Expand Down