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/TestOffence_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,23 @@ describe("TestOffence", function()
assert.are.equals(0, build.calcsTab.calcsOutput.PhysicalMin or 0)
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
Expand Down
4 changes: 2 additions & 2 deletions src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 "}
Expand Down
3 changes: 1 addition & 2 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1185,7 +1184,7 @@ local preFlagList = {
["^spell skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.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 },
Expand Down
Loading