Skip to content

Commit 705ac04

Browse files
Add support for enemy regen and sanctum x can y. (#5565)
* x can y mods not currently supported * start implementation of enemy regen * Add full enemy regen support * Fix Breaking Minions again :)
1 parent e5c6a8e commit 705ac04

File tree

5 files changed

+46
-11
lines changed

5 files changed

+46
-11
lines changed

src/Data/Skills/act_int.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4599,11 +4599,17 @@ skills["FrostBomb"] = {
45994599
end,
46004600
statMap = {
46014601
["base_cold_damage_resistance_%"] = {
4602-
mod("ColdExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
4602+
mod("ColdExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Frost Bomb" }),
46034603
},
46044604
["frost_bomb_damage_+%_final_per_100ms_duration"] = {
46054605
skill("frostBombDamagePer100ms", nil),
46064606
},
4607+
["life_regeneration_rate_+%"] = {
4608+
mod("LifeRegen", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Frost Bomb" }),
4609+
},
4610+
["energy_shield_regeneration_rate_+%"] = {
4611+
mod("EnergyShieldRegen", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Frost Bomb" }),
4612+
},
46074613
},
46084614
baseFlags = {
46094615
spell = true,

src/Export/Skills/act_int.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,11 +1042,17 @@ local skills, mod, flag, skill = ...
10421042
end,
10431043
statMap = {
10441044
["base_cold_damage_resistance_%"] = {
1045-
mod("ColdExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
1045+
mod("ColdExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Frost Bomb" }),
10461046
},
10471047
["frost_bomb_damage_+%_final_per_100ms_duration"] = {
10481048
skill("frostBombDamagePer100ms", nil),
10491049
},
1050+
["life_regeneration_rate_+%"] = {
1051+
mod("LifeRegen", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Frost Bomb" }),
1052+
},
1053+
["energy_shield_regeneration_rate_+%"] = {
1054+
mod("EnergyShieldRegen", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Frost Bomb" }),
1055+
},
10501056
},
10511057
#baseMod skill("debuffSecondary", true)
10521058
#baseMod skill("radius", 24)

src/Modules/CalcOffence.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2739,6 +2739,11 @@ function calcs.offence(env, actor, activeSkill)
27392739
output.ManaOnKill = not skillModList:Flag(cfg, "CannotGainMana") and (m_floor(skillModList:Sum("BASE", cfg, "ManaOnKill"))) or 0
27402740
end
27412741

2742+
-- Enemy Regeneration Rate
2743+
output.EnemyLifeRegen = enemyDB:Sum("INC", cfg, "LifeRegen")
2744+
output.EnemyManaRegen = enemyDB:Sum("INC", cfg, "ManaRegen")
2745+
output.EnemyEnergyShieldRegen = enemyDB:Sum("INC", cfg, "EnergyShieldRegen")
2746+
27422747
-- Calculate average damage and final DPS
27432748
output.AverageHit = totalHitAvg * (1 - output.CritChance / 100) + totalCritAvg * output.CritChance / 100
27442749
output.AverageDamage = output.AverageHit * output.HitChance / 100

src/Modules/CalcSections.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,13 +1269,12 @@ return {
12691269
{ modName = "EnemyKnockbackDistance", cfg = "weapon2" },
12701270
}, },
12711271
{ label = "Maximum Rage", haveOutput = "MaximumRage", { format = "{0:output:MaximumRage}", { modName = "MaximumRage" }, }, },
1272-
{ label = "Rage Regen", haveOutput = "RageRegen", { format = "{2:output:RageRegen}",
1273-
{ breakdown = "RageRegen" },
1274-
{ modName = "RageRegen" },
1275-
}, },
12761272
{ label = "Inc. Item Quantity", { format = "{0:mod:1}%", { modName = "LootQuantity", modType = "INC", cfg = "skill" }, }, },
12771273
{ label = "Inc. Item Rarity", { format = "{0:mod:1}%", { modName = "LootRarity", modType = "INC", cfg = "skill" }, }, },
12781274
{ label = "Culling Strike", haveOutput = "CullPercent", { format = "{0:output:CullPercent}%", { modName = { "CullPercent", "CriticalCullPercent" }, cfg = "skill" } } },
1275+
{ label = "Enemy Life Regen", haveOutput = "EnemyLifeRegen", { format = "{0:output:EnemyLifeRegen}%", { modName = "LifeRegen", modType = "INC", enemy = true }, }, },
1276+
{ label = "Enemy Mana Regen", haveOutput = "EnemyManaRegen", { format = "{0:output:EnemyManaRegen}%", { modName = "ManaRegen", modType = "INC", enemy = true }, }, },
1277+
{ label = "Enemy ES Regen", haveOutput = "EnemyEnergyShieldRegen", { format = "{0:output:EnemyEnergyShieldRegen}%", { modName = "EnergyShieldRegen", modType = "INC", enemy = true }, }, },
12791278
} }
12801279
} },
12811280
--misc

src/Modules/ModParser.lua

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,15 @@ local preFlagList = {
10201020
["^enemies (%a+) by you have "] = function(cond)
10211021
return { tag = { type = "Condition", var = cond:gsub("^%a", string.upper) }, applyToEnemy = true }
10221022
end,
1023+
["^while a pinnacle atlas boss is in your presence, enemies you've hit recently have "] = function(cond)
1024+
return { playerTagList = { { type = "Condition", var = "HitRecently" }, { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" } }, applyToEnemy = true }
1025+
end,
1026+
["^while a unique enemy is in your presence, enemies you've hit recently have "] = function(cond)
1027+
return { playerTagList = { { type = "Condition", var = "HitRecently" }, { type = "ActorCondition", actor = "enemy", var = "PinnacleBoss" } }, applyToEnemy = true }
1028+
end,
1029+
["^enemies you've hit recently have "] = function(cond)
1030+
return { playerTag = { type = "Condition", var = "HitRecently" }, applyToEnemy = true }
1031+
end,
10231032
["^hits against enemies (%a+) by you have "] = function(cond)
10241033
return { tag = { type = "ActorCondition", actor = "enemy", var = cond:gsub("^%a", string.upper) } }
10251034
end,
@@ -2518,6 +2527,7 @@ local specialModList = {
25182527
["your shocks can increase damage taken by up to a maximum of (%d+)%%"] = function(num) return { mod("ShockMax", "OVERRIDE", num) } end,
25192528
["%+(%d+)%% to maximum effect of shock"] = function(num) return { mod("ShockMax", "BASE", num) } end,
25202529
["your elemental damage can shock"] = { flag("ColdCanShock"), flag("FireCanShock") },
2530+
["your fire damage can shock"] = { flag("FireCanShock") },
25212531
["all y?o?u?r? ?damage can freeze"] = { flag("PhysicalCanFreeze"), flag("LightningCanFreeze"), flag("FireCanFreeze"), flag("ChaosCanFreeze") },
25222532
["all damage with maces and sceptres inflicts chill"] = { mod("EnemyModifier", "LIST", { mod = flag("Condition:Chilled") }, { type = "Condition", var = "UsingMace" }) },
25232533
["your cold damage can ignite"] = { flag("ColdCanIgnite") },
@@ -2533,6 +2543,7 @@ local specialModList = {
25332543
["your physical damage can chill"] = { flag("PhysicalCanChill") },
25342544
["your physical damage can shock"] = { flag("PhysicalCanShock") },
25352545
["your physical damage can freeze"] = { flag("PhysicalCanFreeze") },
2546+
["your lightning damage can freeze"] = { flag("LightningCanFreeze") },
25362547
["you always ignite while burning"] = { mod("EnemyIgniteChance", "BASE", 100, { type = "Condition", var = "Burning" }) },
25372548
["critical strikes do not a?l?w?a?y?s?i?n?h?e?r?e?n?t?l?y? freeze"] = { flag("CritsDontAlwaysFreeze") },
25382549
["cannot inflict elemental ailments"] = {
@@ -4733,13 +4744,14 @@ local function parseMod(line, order)
47334744
elseif misc.addToMinion then
47344745
-- Minion modifiers
47354746
for i, effectMod in ipairs(modList) do
4736-
local tagList = { misc.playerTag }
4747+
local tagList = { }
4748+
if misc.playerTag then t_insert(tagList, misc.playerTag) end
4749+
if misc.addToMinionTag then t_insert(tagList, misc.addToMinionTag) end
47374750
if misc.playerTagList then
4738-
for i, tag in ipairs(misc.playerTagList) do
4739-
tagList[i] = tag
4751+
for _, tag in ipairs(misc.playerTagList) do
4752+
t_insert(tagList, tag)
47404753
end
47414754
end
4742-
t_insert(tagList, misc.addToMinionTag)
47434755
modList[i] = mod("MinionModifier", "LIST", { mod = effectMod }, unpack(tagList))
47444756
end
47454757
elseif misc.addToSkill then
@@ -4749,12 +4761,19 @@ local function parseMod(line, order)
47494761
end
47504762
elseif misc.applyToEnemy then
47514763
for i, effectMod in ipairs(modList) do
4764+
local tagList = { }
4765+
if misc.playerTag then t_insert(tagList, misc.playerTag) end
4766+
if misc.playerTagList then
4767+
for _, tag in ipairs(misc.playerTagList) do
4768+
t_insert(tagList, tag)
4769+
end
4770+
end
47524771
local newMod = effectMod
47534772
if effectMod[1] and type(effectMod) == "table" and misc.actorEnemy then
47544773
newMod = copyTable(effectMod)
47554774
newMod[1]["actor"] = "enemy"
47564775
end
4757-
modList[i] = mod("EnemyModifier", "LIST", { mod = newMod })
4776+
modList[i] = mod("EnemyModifier", "LIST", { mod = newMod }, unpack(tagList))
47584777
end
47594778
end
47604779
end

0 commit comments

Comments
 (0)