From 1081f517249e6122ce13d4f2316b83626bbe7107 Mon Sep 17 00:00:00 2001 From: unrealdreamz <132005717+unrealdreamz@users.noreply.github.com> Date: Mon, 18 May 2026 19:11:00 -0400 Subject: [PATCH] Apply bow additional arrows to bow attacks --- spec/System/TestSkills_spec.lua | 34 ++++++++++++++++++++++++++++++++- src/Modules/ModParser.lua | 6 +++--- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/spec/System/TestSkills_spec.lua b/spec/System/TestSkills_spec.lua index 3afa41ce0..f02253c0e 100644 --- a/spec/System/TestSkills_spec.lua +++ b/spec/System/TestSkills_spec.lua @@ -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") @@ -245,4 +277,4 @@ describe("TestSkills", function() assert.True(build.calcsTab.calcsOutput.Cooldown == 10) end) -end) \ No newline at end of file +end) diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index cc20d66c3..491765713 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -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,