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
45 changes: 45 additions & 0 deletions spec/System/TestSkills_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,51 @@ describe("TestSkills", function()
assert.are.near(singleBrandDPS * 2, build.calcsTab.mainOutput.TotalDot, 10 ^ -9)
end)

it("caps total Brand Recall Cooldown Recovery from multiple Chip Away notables at 40%", function()
build.skillsTab:PasteSocketGroup("Storm Brand 20/0 1\n")
build.configTab.input.ActiveBrands = 10
build.configTab.input.customMods = [[
You can cast 7 additional brands
Brand Recall has 4% increased Cooldown Recovery Rate per Brand, up to a maximum of 40%
Brand Recall has 4% increased Cooldown Recovery Rate per Brand, up to a maximum of 40%
]]
build.configTab:BuildModList()
runCallback("OnFrame")

assert.are.equals(40, build.calcsTab.mainEnv.modDB:Sum("INC", { skillName = "Brand Recall" }, "CooldownRecovery"))
end)

it("applies a single Chip Away notable per active Brand", function()
build.skillsTab:PasteSocketGroup("Storm Brand 20/0 1\n")
build.configTab.input.ActiveBrands = 3
build.configTab.input.customMods = "Brand Recall has 4% increased Cooldown Recovery Rate per Brand, up to a maximum of 40%"
build.configTab:BuildModList()
runCallback("OnFrame")

assert.are.equals(12, build.calcsTab.mainEnv.modDB:Sum("INC", { skillName = "Brand Recall" }, "CooldownRecovery"))
end)

it("counts support gem brand limit increases in the active Brand count", function()
build.skillsTab:PasteSocketGroup("Storm Brand 20/0 1\nFoul Grasp 1/0 1\n")
build.configTab.input.ActiveBrands = 5
build.configTab.input.customMods = "Brand Recall has 4% increased Cooldown Recovery Rate per Brand, up to a maximum of 40%"
build.configTab:BuildModList()
runCallback("OnFrame")

assert.are.equals(20, build.calcsTab.mainEnv.modDB:Sum("INC", { skillName = "Brand Recall" }, "CooldownRecovery"))
end)

it("uses the highest brand limit across multiple brand skills for the active Brand count", function()
build.skillsTab:PasteSocketGroup("Storm Brand 20/0 1\nFoul Grasp 1/0 1\n")
build.skillsTab:PasteSocketGroup("Armageddon Brand 20/0 1\n")
build.configTab.input.ActiveBrands = 5
build.configTab.input.customMods = "Brand Recall has 4% increased Cooldown Recovery Rate per Brand, up to a maximum of 40%"
build.configTab:BuildModList()
runCallback("OnFrame")

assert.are.equals(20, build.calcsTab.mainEnv.modDB:Sum("INC", { skillName = "Brand Recall" }, "CooldownRecovery"))
end)

it("averages inverted elemental resistance after penetration", function()
build.skillsTab:PasteSocketGroup("Fireball 20/0 1")
build.configTab.input.enemyIsBoss = "None"
Expand Down
4 changes: 2 additions & 2 deletions src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7908,12 +7908,12 @@ c["Bow Skills have +6% to Damage over Time Multiplier"]={{[1]={flags=0,keywordFl
c["Bow Skills have 10% increased Skill Effect Duration"]={{[1]={flags=0,keywordFlags=1024,name="Duration",type="INC",value=10}},nil}
c["Bow Skills have 25% increased Area of Effect"]={{[1]={flags=0,keywordFlags=1024,name="AreaOfEffect",type="INC",value=25}},nil}
c["Brand Recall grants 20% increased Brand Attachment range to recalled Brands"]={{[1]={[1]={includeTransfigured=true,skillName="Brand Recall",type="SkillName"},[2]={type="Condition",var="{Hand}Attack"},flags=0,keywordFlags=1048576,name="BrandAttachmentRange",type="BASE",value=20}},"% increased to recalled s "}
c["Brand Recall grants 20% increased Brand Attachment range to recalled Brands Brand Recall has 4% increased Cooldown Recovery Rate per Brand, up to a maximum of 40%"]={{[1]={[1]={limit=40,limitTotal=true,type="Multiplier",var="ActiveBrand"},[2]={includeTransfigured=true,skillName="Brand Recall",type="SkillName"},[3]={type="Condition",var="{Hand}Attack"},flags=0,keywordFlags=1048576,name="BrandAttachmentRange",type="BASE",value=20}},"% increased to recalled s Brand Recall has 4% increased Cooldown Recovery Rate "}
c["Brand Recall grants 20% increased Brand Attachment range to recalled Brands Brand Recall has 4% increased Cooldown Recovery Rate per Brand, up to a maximum of 40%"]={{[1]={[1]={globalLimit=40,globalLimitKey="ChipAway",type="Multiplier",var="ActiveBrand"},[2]={includeTransfigured=true,skillName="Brand Recall",type="SkillName"},[3]={type="Condition",var="{Hand}Attack"},flags=0,keywordFlags=1048576,name="BrandAttachmentRange",type="BASE",value=20}},"% increased to recalled s Brand Recall has 4% increased Cooldown Recovery Rate "}
c["Brand Recall has 10% increased Cooldown Recovery Rate"]={{[1]={[1]={includeTransfigured=true,skillName="Brand Recall",type="SkillName"},flags=0,keywordFlags=0,name="CooldownRecovery",type="INC",value=10}},nil}
c["Brand Recall has 100% increased Cooldown Recovery Rate"]={{[1]={[1]={includeTransfigured=true,skillName="Brand Recall",type="SkillName"},flags=0,keywordFlags=0,name="CooldownRecovery",type="INC",value=100}},nil}
c["Brand Recall has 15% increased Cooldown Recovery Rate"]={{[1]={[1]={includeTransfigured=true,skillName="Brand Recall",type="SkillName"},flags=0,keywordFlags=0,name="CooldownRecovery",type="INC",value=15}},nil}
c["Brand Recall has 20% increased Cooldown Recovery Rate"]={{[1]={[1]={includeTransfigured=true,skillName="Brand Recall",type="SkillName"},flags=0,keywordFlags=0,name="CooldownRecovery",type="INC",value=20}},nil}
c["Brand Recall has 4% increased Cooldown Recovery Rate per Brand, up to a maximum of 40%"]={{[1]={[1]={limit=40,limitTotal=true,type="Multiplier",var="ActiveBrand"},[2]={includeTransfigured=true,skillName="Brand Recall",type="SkillName"},flags=0,keywordFlags=0,name="CooldownRecovery",type="INC",value=4}},nil}
c["Brand Recall has 4% increased Cooldown Recovery Rate per Brand, up to a maximum of 40%"]={{[1]={[1]={globalLimit=40,globalLimitKey="ChipAway",type="Multiplier",var="ActiveBrand"},[2]={includeTransfigured=true,skillName="Brand Recall",type="SkillName"},flags=0,keywordFlags=0,name="CooldownRecovery",type="INC",value=4}},nil}
c["Brand Recall has 50% increased Cooldown Recovery Rate"]={{[1]={[1]={includeTransfigured=true,skillName="Brand Recall",type="SkillName"},flags=0,keywordFlags=0,name="CooldownRecovery",type="INC",value=50}},nil}
c["Brand Skills have 10% increased Duration"]={{[1]={[1]={skillType=65,type="SkillType"},flags=0,keywordFlags=0,name="Duration",type="INC",value=10}},nil}
c["Brand Skills have 100% increased Duration"]={{[1]={[1]={skillType=65,type="SkillType"},flags=0,keywordFlags=0,name="Duration",type="INC",value=100}},nil}
Expand Down
3 changes: 2 additions & 1 deletion src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,8 @@ function calcs.perform(env, skipEHP)
activeSkill.skillData.attachedBrandCount = attached
local activeBrands = modDB:Sum("BASE", nil, "Multiplier:ConfigActiveBrands")
-- Cap the number of active brands by the limit, which is 3 by default
modDB.multipliers["ActiveBrand"] = m_min(activeBrands, modDB:Sum("BASE", nil, "ActiveBrandLimit"))
-- Also consider increase to number of active brands from other sources (e.g. Foulgrasp Support)
modDB.multipliers["ActiveBrand"] = m_max(m_min(activeBrands, activeSkill.skillModList:Sum("BASE", activeSkill.skillCfg, "ActiveBrandLimit")), modDB.multipliers["ActiveBrand"] or 0)
modDB.multipliers["BrandsAttachedToEnemy"] = m_max(attached, modDB.multipliers["BrandsAttachedToEnemy"] or 0)
enemyDB.multipliers["BrandsAttached"] = m_max(attached, enemyDB.multipliers["BrandsAttached"] or 0)
end
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ local modTagList = {
["per gale force"] = { tag = { type = "Multiplier", var = "GaleForce" } },
["per intensity"] = { tag = { type = "Multiplier", var = "Intensity" } },
["per brand"] = { tag = { type = "Multiplier", var = "ActiveBrand" } },
["per brand, up to a maximum of (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "ActiveBrand", limit = tonumber(num), limitTotal = true } } end,
["per brand, up to a maximum of (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "ActiveBrand", globalLimit = tonumber(num), globalLimitKey = "ChipAway" } } end,
["per blitz charge"] = { tag = { type = "Multiplier", var = "BlitzCharge" } },
["per ghost shroud"] = { tag = { type = "Multiplier", var = "GhostShroud" } },
["per crab barrier"] = { tag = { type = "Multiplier", var = "CrabBarrier" } },
Expand Down
Loading