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
8 changes: 8 additions & 0 deletions src/Data/Skills/sup_dex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,14 @@ skills["SupportCompanionship"] = {
addSkillTypes = { },
excludeSkillTypes = { SkillType.MinionsAreUndamagable, SkillType.Triggered, },
statDescriptionScope = "gem_stat_descriptions",
statMap = {
["support_companionship_minion_maximum_life_+%_final_if_at_most_one_minion"] = {
mod("MinionModifier", "LIST", { mod = mod("Life", "MORE", nil) }, 0, 0, { type = "Condition", var = "OnlyMinion" }),
},
["damage_removed_from_minions_before_life_or_es_%_if_only_one_minion"] = {
mod("takenFromMinionBeforeYou", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }),
},
},
qualityStats = {
{ "minion_maximum_life_+%", 1 },
},
Expand Down
8 changes: 8 additions & 0 deletions src/Export/Skills/sup_dex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,14 @@ local skills, mod, flag, skill = ...
#mods

#skill SupportCompanionship
statMap = {
["support_companionship_minion_maximum_life_+%_final_if_at_most_one_minion"] = {
mod("MinionModifier", "LIST", { mod = mod("Life", "MORE", nil) }, 0, 0, { type = "Condition", var = "OnlyMinion" }),
},
["damage_removed_from_minions_before_life_or_es_%_if_only_one_minion"] = {
mod("takenFromMinionBeforeYou", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }),
},
},
#mods

#skill SupportCriticalStrikeAffliction
Expand Down
24 changes: 24 additions & 0 deletions src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ function calcs.reducePoolsByDamage(poolTable, damageTable, actor)
if output.FrostShieldLife then
alliesTakenBeforeYou["frostShield"] = { remaining = output.FrostShieldLife, percent = output.FrostShieldDamageMitigation / 100 }
end
if output.TotalMinionLife then
alliesTakenBeforeYou["minion"] = { remaining = output.TotalMinionLife, percent = output.MinionAllyDamageMitigation / 100 }
end
if output.TotalSpectreLife then
alliesTakenBeforeYou["spectres"] = { remaining = output.TotalSpectreLife, percent = output.SpectreAllyDamageMitigation / 100 }
end
Expand Down Expand Up @@ -418,6 +421,9 @@ local function incomingDamageBreakdown(breakdownTable, poolsRemaining, output)
if output.FrostShieldLife and output.FrostShieldLife > 0 then
t_insert(breakdownTable, s_format("\t%d "..colorCodes.GEM.."Frost Shield Life ^7(%d remaining)", output.FrostShieldLife - poolsRemaining.AlliesTakenBeforeYou["frostShield"].remaining, poolsRemaining.AlliesTakenBeforeYou["frostShield"].remaining))
end
if output.TotalMinionLife and output.TotalMinionLife > 0 then
t_insert(breakdownTable, s_format("\t%d "..colorCodes.GEM.."Total Minion Life ^7(%d remaining)", output.TotalMinionLife - poolsRemaining.AlliesTakenBeforeYou["minion"].remaining, poolsRemaining.AlliesTakenBeforeYou["minion"].remaining))
end
if output.TotalSpectreLife and output.TotalSpectreLife > 0 then
t_insert(breakdownTable, s_format("\t%d "..colorCodes.GEM.."Total Spectre Life ^7(%d remaining)", output.TotalSpectreLife - poolsRemaining.AlliesTakenBeforeYou["spectres"].remaining, poolsRemaining.AlliesTakenBeforeYou["spectres"].remaining))
end
Expand Down Expand Up @@ -2445,6 +2451,12 @@ function calcs.buildDefenceEstimations(env, actor)
}
end

-- from Minion
output["MinionAllyDamageMitigation"] = modDB:Sum("BASE", nil, "takenFromMinionBeforeYou")
if output["MinionAllyDamageMitigation"] ~= 0 then
output["TotalMinionLife"] = modDB:Sum("BASE", nil, "Multiplier:MinionLife")
end

-- from spectres
output["SpectreAllyDamageMitigation"] = modDB:Sum("BASE", nil, "takenFromSpectresBeforeYou")
if output["SpectreAllyDamageMitigation"] ~= 0 then
Expand Down Expand Up @@ -2562,6 +2574,9 @@ function calcs.buildDefenceEstimations(env, actor)
if output.FrostShieldLife then
alliesTakenBeforeYou["frostShield"] = { remaining = output.FrostShieldLife, percent = output.FrostShieldDamageMitigation / 100 }
end
if output.TotalMinionLife then
alliesTakenBeforeYou["minion"] = { remaining = output.TotalMinionLife, percent = output.MinionAllyDamageMitigation / 100 }
end
if output.TotalSpectreLife then
alliesTakenBeforeYou["spectres"] = { remaining = output.TotalSpectreLife, percent = output.SpectreAllyDamageMitigation / 100 }
end
Expand Down Expand Up @@ -3123,6 +3138,11 @@ function calcs.buildDefenceEstimations(env, actor)
local poolProtected = output["FrostShieldLife"] / (output["FrostShieldDamageMitigation"] / 100) * (1 - output["FrostShieldDamageMitigation"] / 100)
output[damageType.."TotalHitPool"] = m_max(output[damageType.."TotalHitPool"] - poolProtected, 0) + m_min(output[damageType.."TotalHitPool"], poolProtected) / (1 - output["FrostShieldDamageMitigation"] / 100)
end
-- minions
if output["TotalMinionLife"] and output["TotalMinionLife"] > 0 then
local poolProtected = output["TotalMinionLife"] / (output["MinionAllyDamageMitigation"] / 100) * (1 - output["MinionAllyDamageMitigation"] / 100)
output[damageType.."TotalHitPool"] = m_max(output[damageType.."TotalHitPool"] - poolProtected, 0) + m_min(output[damageType.."TotalHitPool"], poolProtected) / (1 - output["MinionAllyDamageMitigation"] / 100)
end
-- spectres
if output["TotalSpectreLife"] and output["TotalSpectreLife"] > 0 then
local poolProtected = output["TotalSpectreLife"] / (output["SpectreAllyDamageMitigation"] / 100) * (1 - output["SpectreAllyDamageMitigation"] / 100)
Expand Down Expand Up @@ -3764,6 +3784,10 @@ function calcs.buildDefenceEstimations(env, actor)
resourcesLostSum = resourcesLostSum + resourcesLost.frostShield
t_insert(breakdownTable, s_format("\t%d "..colorCodes.GEM.."Frost Shield Life", resourcesLost.frostShield))
end
if resourcesLost.minion then
resourcesLostSum = resourcesLostSum + resourcesLost.minion
t_insert(breakdownTable, s_format("\t%d "..colorCodes.GEM.."Total Minion Life", resourcesLost.minion))
end
if resourcesLost.spectres then
resourcesLostSum = resourcesLostSum + resourcesLost.spectres
t_insert(breakdownTable, s_format("\t%d "..colorCodes.GEM.."Total Spectre Life", resourcesLost.spectres))
Expand Down
5 changes: 5 additions & 0 deletions src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,7 @@ function calcs.perform(env, skipEHP)
env.player.modDB:NewMod("Multiplier:NonVaalSummonedMinion", "BASE", output[activeSkill.minion.minionData.limit], "Config", { type = "Condition", var = "Combat" })
end
minionCount[activeSkill.minion.minionData.limit] = true
t_insert(minionCount, activeSkill.minion.minionData.limit)
end
end
if activeSkill.skillTypes[SkillType.CreatesMinion] and not activeSkill.skillTypes[SkillType.MinionsAreUndamagable] then
Expand Down Expand Up @@ -1370,6 +1371,10 @@ function calcs.perform(env, skipEHP)
end
end

if #minionCount == 1 then
modDB.conditions["OnlyMinion"] = true
end

-- Special Rarity / Quantity Calc for Bisco's
local lootQuantityNormalEnemies = modDB:Sum("INC", nil, "LootQuantityNormalEnemies")
output.LootQuantityNormalEnemies = (lootQuantityNormalEnemies > 0) and lootQuantityNormalEnemies + modDB:Sum("INC", nil, "LootQuantity") or 0
Expand Down
Loading