From 2f241cf4d555e4e7200031564e7eedc7c15463c8 Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Wed, 29 Jul 2026 06:35:39 +1000 Subject: [PATCH] Fix Drillneck damage applying to Spells The mod has 3 keyword flags so it was applying the damage if any of them matched instead of making sure that it matched arrow + one of the other 2 --- spec/System/TestOffence_spec.lua | 17 +++++++++++++++++ src/Data/ModCache.lua | 4 ++-- src/Modules/ModParser.lua | 3 +-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/spec/System/TestOffence_spec.lua b/spec/System/TestOffence_spec.lua index 36b67ddc53..bf88cad827 100644 --- a/spec/System/TestOffence_spec.lua +++ b/spec/System/TestOffence_spec.lua @@ -13,6 +13,23 @@ describe("TestOffence", function() string.format("%s: expected ~%.2f (within %.1f%%), got %.2f", msg, expected, tolerance * 100, actual)) end + it("does not apply arrow damage modifiers to Fireball", function() + build.skillsTab:PasteSocketGroup("Fireball 20/0 1") + build.configTab.input.customMods = "Projectiles Pierce an additional Target" + build.configTab:BuildModList() + runCallback("OnFrame") + local damageWithoutArrowMod = build.calcsTab.mainOutput.AverageDamage + + build.configTab.input.customMods = [[ + Projectiles Pierce an additional Target + Arrows deal 50% increased Damage with Hits and Ailments to Targets they Pierce + ]] + build.configTab:BuildModList() + runCallback("OnFrame") + + assert.are.equals(damageWithoutArrowMod, build.calcsTab.mainOutput.AverageDamage) + end) + it("parses more/less/increased/reduced minimum and maximum damage of every type", function() build.itemsTab:CreateDisplayItemFromRaw([[ New Item diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index dfdc865eb2..7d0ee954b5 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -7697,8 +7697,8 @@ c["Arrows Pierce all Targets after Chaining"]={nil,"Arrows Pierce all Targets af c["Arrows Pierce all Targets after Chaining Arrows Pierce all Targets after Forking"]={nil,"Arrows Pierce all Targets after Chaining Arrows Pierce all Targets after Forking "} c["Arrows Pierce all Targets after Forking"]={{[1]={[1]={stat="ForkedCount",threshold=1,type="StatThreshold"},flags=0,keywordFlags=2048,name="PierceAllTargets",type="FLAG",value=true}},nil} c["Arrows Pierce an additional Target"]={{[1]={flags=0,keywordFlags=2048,name="PierceCount",type="BASE",value=1}},nil} -c["Arrows deal 30 to 50 Added Fire Damage for each time they've Pierced"]={{[1]={[1]={stat="PiercedCount",type="PerStat"},flags=0,keywordFlags=2048,name="FireMin",type="BASE",value=30},[2]={[1]={stat="PiercedCount",type="PerStat"},flags=0,keywordFlags=2048,name="FireMax",type="BASE",value=50}},nil} -c["Arrows deal 50% increased Damage with Hits and Ailments to Targets they Pierce"]={{[1]={[1]={stat="PierceCount",threshold=1,type="StatThreshold"},flags=0,keywordFlags=788480,name="Damage",type="INC",value=50}},nil} +c["Arrows deal 30 to 50 Added Fire Damage for each time they've Pierced"]={{[1]={[1]={keywordFlags=2048,type="KeywordFlagAnd"},[2]={stat="PiercedCount",type="PerStat"},flags=0,keywordFlags=0,name="FireMin",type="BASE",value=30},[2]={[1]={keywordFlags=2048,type="KeywordFlagAnd"},[2]={stat="PiercedCount",type="PerStat"},flags=0,keywordFlags=0,name="FireMax",type="BASE",value=50}},nil} +c["Arrows deal 50% increased Damage with Hits and Ailments to Targets they Pierce"]={{[1]={[1]={keywordFlags=2048,type="KeywordFlagAnd"},[2]={stat="PierceCount",threshold=1,type="StatThreshold"},flags=0,keywordFlags=786432,name="Damage",type="INC",value=50}},nil} c["Arrows fired from the first firing points always Pierce"]={nil,"Arrows fired from the first firing points always Pierce "} c["Arrows fired from the first firing points always Pierce Arrows fired from the second firing points Fork"]={nil,"Arrows fired from the first firing points always Pierce Arrows fired from the second firing points Fork "} c["Arrows fired from the fourth firing points Chain +2 times"]={nil,"Arrows fired from the fourth firing points Chain +2 times "} diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 3a69a817b3..9529452731 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -1116,7 +1116,6 @@ local preFlagList = { ["^hits deal "] = { keywordFlags = KeywordFlag.Hit }, ["^melee weapon damage"] = { flags = ModFlag.WeaponMelee }, ["^deal "] = { }, - ["^arrows deal "] = { keywordFlags = KeywordFlag.Arrow }, ["^critical strikes deal "] = { tag = { type = "Condition", var = "CriticalStrike" } }, ["^poisons you inflict with critical strikes have "] = { keywordFlags = bor(KeywordFlag.Poison, KeywordFlag.MatchAll), tag = { type = "Condition", var = "CriticalStrike" } }, -- Add to minion @@ -1185,7 +1184,7 @@ local preFlagList = { ["^spell skills [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Spell }, ["^projectile attack skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.RangedAttack } }, ["^projectiles from attacks [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.RangedAttack } }, - ["^arrows [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Arrow }, + ["^arrows [hd][ae][va][el] "] = { tag = { type = "KeywordFlagAnd", keywordFlags = KeywordFlag.Arrow } }, ["^bow skills [hdf][aei][var][el] "] = { keywordFlags = KeywordFlag.Bow }, ["^projectiles [hdf][aei][var][el] "] = { flags = ModFlag.Projectile }, ["^projectiles "] = { flags = ModFlag.Projectile },