Skip to content
Open
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
20 changes: 20 additions & 0 deletions spec/System/TestOffence_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ describe("TestOffence", function()
string.format("%s: expected ~%.2f (within %.1f%%), got %.2f", msg, expected, tolerance * 100, actual))
end

it("counts only permanent minions for Communion", function()
build.skillsTab:PasteSocketGroup("Fireball 20/0 1\nCommunion 3/0 1")
build.skillsTab:PasteSocketGroup("Summon Reaper 20/0 1")
build.skillsTab:PasteSocketGroup("Summon Raging Spirit 20/0 1")
runCallback("OnFrame")

local modDB = build.calcsTab.calcsEnv.player.modDB
assert.is_true(modDB:Sum("BASE", nil, "Multiplier:SummonedMinion") > 1)
assert.are.equals(1, modDB:Sum("BASE", nil, "Multiplier:PermanentMinion"))
assert.is_true(build.calcsTab.calcsOutput.PhysicalMin > 0)

newBuild()
build.skillsTab:PasteSocketGroup("Fireball 20/0 1\nCommunion 3/0 1")
build.skillsTab:PasteSocketGroup("Summon Raging Spirit 20/0 1")
runCallback("OnFrame")

assert.are.equals(0, build.calcsTab.calcsEnv.player.modDB:Sum("BASE", nil, "Multiplier:PermanentMinion"))
assert.are.equals(0, build.calcsTab.calcsOutput.PhysicalMin or 0)
end)

it("parses more/less/increased/reduced minimum and maximum damage of every type", function()
build.itemsTab:CreateDisplayItemFromRaw([[
New Item
Expand Down
3 changes: 3 additions & 0 deletions src/Data/SkillStatMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ return {
skill("durationTertiary", nil),
div = 1000,
},
["infinite_minion_duration"] = {
skillFlag = "permanentMinion",
},
["spell_minimum_base_physical_damage"] = {
skill("PhysicalMin", nil),
},
Expand Down
4 changes: 2 additions & 2 deletions src/Data/Skills/sup_int.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4995,10 +4995,10 @@ skills["SupportMinionPact"] = {
statDescriptionScope = "gem_stat_descriptions",
statMap = {
["spell_minimum_added_physical_damage_per_active_permanent_minion"] = {
mod("PhysicalMin", "BASE", nil, 0, 0, { type = "Multiplier", var = "SummonedMinion" }),
mod("PhysicalMin", "BASE", nil, 0, 0, { type = "Multiplier", var = "PermanentMinion" }),
},
["spell_maximum_added_physical_damage_per_active_permanent_minion"] = {
mod("PhysicalMax", "BASE", nil, 0, 0, { type = "Multiplier", var = "SummonedMinion" }),
mod("PhysicalMax", "BASE", nil, 0, 0, { type = "Multiplier", var = "PermanentMinion" }),
},
},
qualityStats = {
Expand Down
4 changes: 2 additions & 2 deletions src/Export/Skills/sup_int.txt
Original file line number Diff line number Diff line change
Expand Up @@ -668,10 +668,10 @@ local skills, mod, flag, skill = ...
#skill SupportMinionPact
statMap = {
["spell_minimum_added_physical_damage_per_active_permanent_minion"] = {
mod("PhysicalMin", "BASE", nil, 0, 0, { type = "Multiplier", var = "SummonedMinion" }),
mod("PhysicalMin", "BASE", nil, 0, 0, { type = "Multiplier", var = "PermanentMinion" }),
},
["spell_maximum_added_physical_damage_per_active_permanent_minion"] = {
mod("PhysicalMax", "BASE", nil, 0, 0, { type = "Multiplier", var = "SummonedMinion" }),
mod("PhysicalMax", "BASE", nil, 0, 0, { type = "Multiplier", var = "PermanentMinion" }),
},
},
#mods
Expand Down
6 changes: 6 additions & 0 deletions src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,9 @@ function calcs.perform(env, skipEHP)
if not activeSkill.skillTypes[SkillType.Vaal] then
counts.nonVaal = m_max(count, counts.nonVaal or 0)
end
if activeSkill.skillFlags.permanentMinion then
counts.permanent = m_max(count, counts.permanent or 0)
end
minionCounts[key] = counts
end
end
Expand Down Expand Up @@ -1455,6 +1458,9 @@ function calcs.perform(env, skipEHP)
if counts.nonVaal then
modDB:NewMod("Multiplier:NonVaalSummonedMinion", "BASE", counts.nonVaal, "Config", { type = "Condition", var = "Combat" })
end
if counts.permanent then
modDB:NewMod("Multiplier:PermanentMinion", "BASE", counts.permanent, "Config", { type = "Condition", var = "Combat" })
end
end

-- Companionship only works while exactly one Minion is summoned.
Expand Down
3 changes: 3 additions & 0 deletions src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,9 @@ Huge sets the radius to 11.
{ var = "multiplierNonVaalSummonedMinion", type = "count", label = "# of non-vaal skill Summoned Minions:", ifMult = "NonVaalSummonedMinion", tooltip = "Use this to override the count if you do not have all your minions summoned", apply = function(val, modList, enemyModList)
modList:NewMod("Multiplier:NonVaalSummonedMinion", "OVERRIDE", val, "Config", { type = "Condition", var = "Combat" })
end },
{ var = "multiplierPermanentMinion", type = "count", label = "# of Permanent Minions (if not maximum):", ifMult = "PermanentMinion", tooltip = "Use this to override the count if you do not have all your permanent minions summoned", apply = function(val, modList, enemyModList)
modList:NewMod("Multiplier:PermanentMinion", "OVERRIDE", val, "Config", { type = "Condition", var = "Combat" })
end },
{ var = "conditionOnConsecratedGround", type = "check", label = "Are you on Consecrated Ground?", tooltip = "In addition to allowing any 'while on Consecrated Ground' modifiers to apply,\nConsecrated Ground grants 5% ^xE05030Life ^7Regeneration to players and allies.", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:OnConsecratedGround", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
modList:NewMod("MinionModifier", "LIST", { mod = modLib.createMod("Condition:OnConsecratedGround", "FLAG", true, "Config", { type = "Condition", var = "Combat" }) })
Expand Down
Loading