Skip to content

Commit 97c68fa

Browse files
LocalIdentityLocalIdentity
andauthored
Fix Drillneck damage applying to Spells (#10051)
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 Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent cdce855 commit 97c68fa

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

‎spec/System/TestOffence_spec.lua‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,23 @@ describe("TestOffence", function()
3333
assert.are.equals(0, build.calcsTab.calcsOutput.PhysicalMin or 0)
3434
end)
3535

36+
it("does not apply arrow damage modifiers to Fireball", function()
37+
build.skillsTab:PasteSocketGroup("Fireball 20/0 1")
38+
build.configTab.input.customMods = "Projectiles Pierce an additional Target"
39+
build.configTab:BuildModList()
40+
runCallback("OnFrame")
41+
local damageWithoutArrowMod = build.calcsTab.mainOutput.AverageDamage
42+
43+
build.configTab.input.customMods = [[
44+
Projectiles Pierce an additional Target
45+
Arrows deal 50% increased Damage with Hits and Ailments to Targets they Pierce
46+
]]
47+
build.configTab:BuildModList()
48+
runCallback("OnFrame")
49+
50+
assert.are.equals(damageWithoutArrowMod, build.calcsTab.mainOutput.AverageDamage)
51+
end)
52+
3653
it("parses more/less/increased/reduced minimum and maximum damage of every type", function()
3754
build.itemsTab:CreateDisplayItemFromRaw([[
3855
New Item

‎src/Data/ModCache.lua‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7697,8 +7697,8 @@ c["Arrows Pierce all Targets after Chaining"]={nil,"Arrows Pierce all Targets af
76977697
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 "}
76987698
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}
76997699
c["Arrows Pierce an additional Target"]={{[1]={flags=0,keywordFlags=2048,name="PierceCount",type="BASE",value=1}},nil}
7700-
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}
7701-
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}
7700+
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}
7701+
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}
77027702
c["Arrows fired from the first firing points always Pierce"]={nil,"Arrows fired from the first firing points always Pierce "}
77037703
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 "}
77047704
c["Arrows fired from the fourth firing points Chain +2 times"]={nil,"Arrows fired from the fourth firing points Chain +2 times "}

‎src/Modules/ModParser.lua‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,6 @@ local preFlagList = {
11161116
["^hits deal "] = { keywordFlags = KeywordFlag.Hit },
11171117
["^melee weapon damage"] = { flags = ModFlag.WeaponMelee },
11181118
["^deal "] = { },
1119-
["^arrows deal "] = { keywordFlags = KeywordFlag.Arrow },
11201119
["^critical strikes deal "] = { tag = { type = "Condition", var = "CriticalStrike" } },
11211120
["^poisons you inflict with critical strikes have "] = { keywordFlags = bor(KeywordFlag.Poison, KeywordFlag.MatchAll), tag = { type = "Condition", var = "CriticalStrike" } },
11221121
-- Add to minion
@@ -1185,7 +1184,7 @@ local preFlagList = {
11851184
["^spell skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Spell } },
11861185
["^projectile attack skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.RangedAttack } },
11871186
["^projectiles from attacks [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.RangedAttack } },
1188-
["^arrows [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Arrow },
1187+
["^arrows [hd][ae][va][el] "] = { tag = { type = "KeywordFlagAnd", keywordFlags = KeywordFlag.Arrow } },
11891188
["^bow skills [hdf][aei][var][el] "] = { keywordFlags = KeywordFlag.Bow },
11901189
["^projectiles [hdf][aei][var][el] "] = { flags = ModFlag.Projectile },
11911190
["^projectiles "] = { flags = ModFlag.Projectile },

0 commit comments

Comments
 (0)