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
318 changes: 318 additions & 0 deletions spec/System/TestDefence_spec.lua

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/Data/SkillStatMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2081,6 +2081,9 @@ return {
value = 100,
},
--Golem
["stone_golem_grants_melee_damage_removed_from_stone_golem_before_life_or_es_%"] = {
mod("takenFromStoneGolemBeforeYou", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff" }),
},
["golem_buff_effect_+%"] = {
mod("BuffEffect", "INC", nil, 0, 0)
},
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Skills/sup_dex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ skills["SupportCompanionship"] = {
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 }),
mod("takenFromMinionBeforeYou", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Condition", var = "OnlyMinion" }),
},
},
qualityStats = {
Expand Down
2 changes: 1 addition & 1 deletion src/Export/Skills/sup_dex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ local skills, mod, flag, skill = ...
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 }),
mod("takenFromMinionBeforeYou", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }, { type = "Condition", var = "OnlyMinion" }),
},
},
#mods
Expand Down
286 changes: 111 additions & 175 deletions src/Modules/CalcDefence.lua

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,13 @@ function calcSkillDuration(skillModList, skillCfg, skillData, env, enemyDB)
return duration
end

-- Keep defensive Totem pools in step with the Totem Life shown in the skill calculations.
function calcs.calcTotemLife(env, activeSkill)
local lifeMod = calcLib.mod(activeSkill.skillModList, activeSkill.skillCfg, "TotemLife")
local life = round(m_floor(env.data.monsterAllyLifeTable[activeSkill.skillData.totemLevel] * env.data.totemLifeMult[activeSkill.skillTotemId]) * lifeMod)
return life, lifeMod
end

-- Performs all offensive calculations
function calcs.offence(env, actor, activeSkill)
local modDB = actor.modDB
Expand Down Expand Up @@ -1387,8 +1394,7 @@ function calcs.offence(env, actor, activeSkill)
"Totems Summoned: "..output.TotemsSummoned..(env.configInput.TotemsSummoned and " ^8(overridden from the Configuration tab)" or " ^8(can be overridden in the Configuration tab)"),
}
end
output.TotemLifeMod = calcLib.mod(skillModList, skillCfg, "TotemLife")
output.TotemLife = round(m_floor(env.data.monsterAllyLifeTable[skillData.totemLevel] * env.data.totemLifeMult[activeSkill.skillTotemId]) * output.TotemLifeMod)
output.TotemLife, output.TotemLifeMod = calcs.calcTotemLife(env, activeSkill)
output.TotemEnergyShield = skillModList:Sum("BASE", skillCfg, "TotemEnergyShield")
output.TotemBlockChance = skillModList:Sum("BASE", skillCfg, "TotemBlockChance")
output.TotemArmour = skillModList:Sum("BASE", skillCfg, "TotemArmour")
Expand Down
394 changes: 282 additions & 112 deletions src/Modules/CalcPerform.lua

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions src/Modules/CalcSections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2179,6 +2179,12 @@ return {
{ modName = { "FrostGlobeHealth", "FrostGlobeDamageMitigation" } },
},
},
{ label = "Minion Ally", haveOutput = "TotalMinionLife",
{ format = "{0:output:TotalMinionLife}",
{ breakdown = "TotalMinionLife" },
{ modName = { "TotalMinionLife", "takenFromMinionBeforeYou" } },
},
},
{ label = "Spectre Ally", haveOutput = "TotalSpectreLife",
{ format = "{0:output:TotalSpectreLife}",
{ breakdown = "TotalSpectreLife" },
Expand All @@ -2197,6 +2203,24 @@ return {
{ modName = { "TotalVaalRejuvenationTotemLife", "takenFromVaalRejuvenationTotemsBeforeYou", "takenFromTotemsBeforeYou" } },
},
},
{ label = "Sentinel of Radiance", haveOutput = "TotalRadianceSentinelLife",
{ format = "{0:output:TotalRadianceSentinelLife}",
{ breakdown = "TotalRadianceSentinelLife" },
{ modName = { "TotalRadianceSentinelLife", "takenFromRadianceSentinelBeforeYou" } },
},
},
{ label = "Void Spawn Ally", haveOutput = "TotalVoidSpawnLife",
{ format = "{0:output:TotalVoidSpawnLife}",
{ breakdown = "TotalVoidSpawnLife" },
{ modName = { "TotalVoidSpawnLife", "takenFromVoidSpawnBeforeYou" } },
},
},
{ label = "Stone Golem Ally", haveOutput = "TotalStoneGolemLife",
{ format = "{0:output:TotalStoneGolemLife}",
{ breakdown = "TotalStoneGolemLife" },
{ modName = { "TotalStoneGolemLife", "takenFromStoneGolemBeforeYou" } },
},
},
{ label = "Soul Link", haveOutput = "AlliedEnergyShield",
{ format = "{0:output:AlliedEnergyShield}",
{ breakdown = "AlliedEnergyShield" },
Expand Down
26 changes: 16 additions & 10 deletions src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -786,20 +786,26 @@ Huge sets the radius to 11.
{ var = "enemyRadius", type = "integer", label = "Enemy radius:", ifSkill = { "Seismic Trap", "Lightning Spire Trap", "Explosive Trap", "Molten Strike" }, includeTransfigured = true, tooltip = "Configure the radius of an enemy hitbox to calculate some area overlapping (shotgunning) effects.", apply = function(val, modList, enemyModList)
modList:NewMod("EnemyRadius", "OVERRIDE", m_max(val, 1), "Config")
end },
{ var = "TotalSpectreLife", type = "integer", label = "Total Spectre Life:", ifMod = "takenFromSpectresBeforeYou", ifSkill = "Raise Spectre", includeTransfigured = true, tooltip = "The total life of your Spectres that can be taken before yours (used by jinxed juju)", apply = function(val, modList, enemyModList)
modList:NewMod("TotalSpectreLife", "BASE", val, "Config")
{ var = "TotalMinionLife", type = "integer", label = "Minion Life override:", ifMod = "takenFromMinionBeforeYou", tooltip = "Overrides the automatically calculated Life of the minion supported by Companionship.", apply = function(val, modList, enemyModList)
modList:NewMod("TotalMinionLife", "OVERRIDE", val, "Config")
end },
{ var = "TotalTotemLife", type = "integer", label = "Total Totem Life:", ifOption = "conditionHaveTotem", ifMod = "takenFromTotemsBeforeYou", tooltip = "The total life of your Totems (excluding Vaal Rejuvenation Totem) that can be taken before yours (used by totem mastery)", apply = function(val, modList, enemyModList)
modList:NewMod("TotalTotemLife", "BASE", val, "Config")
{ var = "TotalSpectreLife", type = "integer", label = "Total Spectre Life override:", ifMod = "takenFromSpectresBeforeYou", ifSkill = "Raise Spectre", includeTransfigured = true, tooltip = "Overrides the automatically calculated total Life of your Spectres that can be taken before yours (used by Jinxed Juju).", apply = function(val, modList, enemyModList)
modList:NewMod("TotalSpectreLife", "OVERRIDE", val, "Config")
end },
{ var = "TotalRadianceSentinelLife", type = "integer", label = "Total life pool of Sentinel of Radiance", ifMod = "takenFromRadianceSentinelBeforeYou", apply = function(val, modList, enemyModList)
modList:NewMod("TotalRadianceSentinelLife", "BASE", val, "Config")
{ var = "TotalTotemLife", type = "integer", label = "Nearest Totem Life override:", ifOption = "conditionHaveTotem", ifMod = "takenFromTotemsBeforeYou", tooltip = "Overrides the automatically calculated Life of your nearest Totem (excluding Vaal Rejuvenation Totem) that can be taken before yours (used by Totem Mastery).", apply = function(val, modList, enemyModList)
modList:NewMod("TotalTotemLife", "OVERRIDE", val, "Config")
end },
{ var = "TotalVoidSpawnLife", type = "integer", label = "Total life pool of Void Spawn", ifMod = "takenFromVoidSpawnBeforeYou", apply = function(val, modList, enemyModList)
modList:NewMod("TotalVoidSpawnLife", "BASE", val, "Config")
{ var = "TotalRadianceSentinelLife", type = "integer", label = "Sentinel of Radiance Life override:", ifMod = "takenFromRadianceSentinelBeforeYou", tooltip = "Overrides the automatically calculated Life of your Sentinel of Radiance that can be taken before yours.", apply = function(val, modList, enemyModList)
modList:NewMod("TotalRadianceSentinelLife", "OVERRIDE", val, "Config")
end },
{ var = "TotalVaalRejuvenationTotemLife", type = "integer", label = "Total Vaal Rejuvenation Totem Life:", ifSkill = { "Vaal Rejuvenation Totem" }, ifMod = "takenFromVaalRejuvenationTotemsBeforeYou", tooltip = "The total life of your Vaal Rejuvenation Totems that can be taken before yours", apply = function(val, modList, enemyModList)
modList:NewMod("TotalVaalRejuvenationTotemLife", "BASE", val, "Config")
{ var = "TotalVoidSpawnLife", type = "integer", label = "Total Void Spawn Life override:", ifMod = "takenFromVoidSpawnBeforeYou", tooltip = "Overrides the automatically calculated total Life of your Void Spawns that can be taken before yours.", apply = function(val, modList, enemyModList)
modList:NewMod("TotalVoidSpawnLife", "OVERRIDE", val, "Config")
end },
{ var = "TotalStoneGolemLife", type = "integer", label = "Stone Golem Life override:", ifSkill = "Summon Stone Golem of Safeguarding", ifMod = "takenFromStoneGolemBeforeYou", tooltip = "Overrides the automatically calculated Life of your Stone Golem of Safeguarding that can be taken before yours.", apply = function(val, modList, enemyModList)
modList:NewMod("TotalStoneGolemLife", "OVERRIDE", val, "Config")
end },
{ var = "TotalVaalRejuvenationTotemLife", type = "integer", label = "Vaal Rejuvenation Totem Life override:", ifSkill = "Vaal Rejuvenation Totem", ifMod = "takenFromVaalRejuvenationTotemsBeforeYou", tooltip = "Overrides the automatically calculated Life of your Vaal Rejuvenation Totem that can be taken before yours.", apply = function(val, modList, enemyModList)
modList:NewMod("TotalVaalRejuvenationTotemLife", "OVERRIDE", val, "Config")
end },
{ label = "^xAF6025Balance of Terror ^7Curse Disable:", ifCond = { "SelfCastConductivity", "SelfCastDespair", "SelfCastElementalWeakness", "SelfCastEnfeeble", "SelfCastFlammability", "SelfCastFrostbite", "SelfCastPunishment", "SelfCastTemporalChains", "SelfCastVulnerability" } },
{ var = "balanceOfTerrorSelfCastConductivity", type = "check", label = "Conductivity self-only", ifSkill = "Conductivity", ifCond = "SelfCastConductivity", tooltip = "Counts Conductivity as self-cast for Balance of Terror without applying it to enemies." },
Expand Down
Loading