Skip to content

Commit e385a7f

Browse files
authored
Add/improve support for "ignore (non-negative) elemental resistances" mods [Heavy Frost, Choir of The Storm] (#690)
* add support for additional "ignore elemental resistances" mods (Heavy Frost, Choir of the Storm) * Include "ignore elemental resistance" flags in effective DPS breakdown --------- Co-authored-by: majochem <majochem@users.noreply.github.com>
1 parent 2726305 commit e385a7f

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

src/Data/ModCache.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,12 +2469,11 @@ c["Corpses in your Presence Explode when you Warcry,"]={nil,"Corpses in your Pre
24692469
c["Corpses in your Presence Explode when you Warcry, dealing 10% of their Life as Physical Damage"]={nil,"Corpses in your Presence Explode when you Warcry, dealing 10% of their Life as Physical Damage "}
24702470
c["Corpses in your Presence Explode when you Warcry, dealing 25% of their Life as Physical Damage"]={nil,"Corpses in your Presence Explode when you Warcry, dealing 25% of their Life as Physical Damage "}
24712471
c["Corrupted Blood cannot be inflicted on you"]={{[1]={flags=0,keywordFlags=0,name="CorruptedBloodImmune",type="FLAG",value=true}},nil}
2472-
c["Critical Hits Ignore Enemy Monster Lightning Resistance"]={nil,"Critical Hits Ignore Enemy Monster Lightning Resistance "}
2473-
c["Critical Hits Ignore Enemy Monster Lightning Resistance Trigger Greater Lightning Bolt Skill on Critical Hit"]={nil,"Critical Hits Ignore Enemy Monster Lightning Resistance Trigger Greater Lightning Bolt Skill on Critical Hit "}
2472+
c["Critical Hits Ignore Enemy Monster Lightning Resistance"]={{[1]={[1]={type="Condition",var="CriticalStrike"},flags=0,keywordFlags=0,name="IgnoreLightningResistance",type="FLAG",value=true}},nil}
24742473
c["Critical Hits Poison the enemy"]={nil,"Critical Hits Poison the enemy "}
24752474
c["Critical Hits do not deal extra Damage"]={{[1]={flags=0,keywordFlags=0,name="NoCritMultiplier",type="FLAG",value=true}},nil}
24762475
c["Critical Hits ignore Enemy Monster Elemental Resistances"]={{[1]={[1]={type="Condition",var="CriticalStrike"},flags=0,keywordFlags=0,name="IgnoreElementalResistances",type="FLAG",value=true}},nil}
2477-
c["Critical Hits ignore non-negative Enemy Monster Elemental Resistances"]={{[1]={[1]={type="Condition",var="CriticalStrike"},flags=0,keywordFlags=0,name="CritsIgnoreNonNegativeEleRes",type="FLAG",value=true}},nil}
2476+
c["Critical Hits ignore non-negative Enemy Monster Elemental Resistances"]={{[1]={[1]={type="Condition",var="CriticalStrike"},flags=0,keywordFlags=0,name="IgnoreNonNegativeEleRes",type="FLAG",value=true}},nil}
24782477
c["Critical Hits with Daggers have a 25% chance to Poison the Enemy"]={{[1]={[1]={type="Condition",var="CriticalStrike"},flags=524288,keywordFlags=0,name="PoisonChance",type="BASE",value=25}},nil}
24792478
c["Culling Strike"]={{[1]={[1]={effectType="Global",type="GlobalEffect",unscalable=true},flags=0,keywordFlags=0,name="CullPercent",type="MAX",value=10}},nil}
24802479
c["Culling Strike against Enemies you Mark"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Marked"},flags=0,keywordFlags=0,name="CullPercent",type="MAX",value=10}},nil}
@@ -2806,7 +2805,7 @@ c["Hits Break 50 Armour Apply Fire Exposure when fully breaking enemy Armour"]={
28062805
c["Hits against you have 20% reduced Critical Damage Bonus"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=4,keywordFlags=0,name="CritMultiplier",type="INC",value=-20}}}},nil}
28072806
c["Hits against you have 25% reduced Critical Damage Bonus"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=4,keywordFlags=0,name="CritMultiplier",type="INC",value=-25}}}},nil}
28082807
c["Hits have 25% reduced Critical Hit Chance against you"]={{[1]={flags=0,keywordFlags=0,name="EnemyCritChance",type="INC",value=-25}},nil}
2809-
c["Hits ignore non-negative Elemental Resistances of Frozen Enemies"]={nil,"Hits ignore non-negative Elemental Resistances of Frozen Enemies "}
2808+
c["Hits ignore non-negative Elemental Resistances of Frozen Enemies"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Frozen"},flags=0,keywordFlags=0,name="IgnoreNonNegativeEleRes",type="FLAG",value=true}},nil}
28102809
c["Hits that Heavy Stun Enemies have Culling Strike"]={{[1]={[1]={type="Condition",var="AlwaysHeavyStunning"},flags=0,keywordFlags=0,name="CullPercent",type="MAX",value=10}},nil}
28112810
c["Hits that Heavy Stun inflict Fire Exposure"]={nil,"Hits that Heavy Stun inflict Fire Exposure "}
28122811
c["Hits that deal Cold Damage remove Cold Exposure and inflict Fire Exposure"]={nil,"Hits that deal Cold Damage remove Cold Exposure and inflict Fire Exposure "}

src/Modules/CalcOffence.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3245,7 +3245,7 @@ function calcs.offence(env, actor, activeSkill)
32453245
end
32463246
sourceRes = elementUsed
32473247
elseif isElemental[damageType] then
3248-
if resist > 0 and modDB:Flag(cfg, "CritsIgnoreNonNegativeEleRes") then
3248+
if resist > 0 and modDB:Flag(cfg, "IgnoreNonNegativeEleRes") then
32493249
resist = 0
32503250
end
32513251
pen = skillModList:Sum("BASE", cfg, damageType.."Penetration", "ElementalPenetration")

src/Modules/CalcSections.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,17 @@ return {
130130
},
131131
{ format = "x {3:output:LightningEffMult}",
132132
{ breakdown = "LightningEffMult" },
133-
{ label = "Player modifiers", modName = { "LightningPenetration", "ElementalPenetration", "IgnoreLightningResistance" }, cfg = "skill" },
133+
{ label = "Player modifiers", modName = { "LightningPenetration", "ElementalPenetration", "IgnoreLightningResistance", "IgnoreNonNegativeEleRes", "IgnoreElementalResistances" }, cfg = "skill" },
134134
{ label = "Enemy modifiers", modName = lightningHitTaken, enemy = true, cfg = "skill" },
135135
},
136136
{ format = "x {3:output:ColdEffMult}",
137137
{ breakdown = "ColdEffMult" },
138-
{ label = "Player modifiers", modName = { "ColdPenetration", "ElementalPenetration", "IgnoreColdResistance" }, cfg = "skill" },
138+
{ label = "Player modifiers", modName = { "ColdPenetration", "ElementalPenetration", "IgnoreColdResistance", "IgnoreNonNegativeEleRes", "IgnoreElementalResistances" }, cfg = "skill" },
139139
{ label = "Enemy modifiers", modName = coldHitTaken, enemy = true, cfg = "skill" },
140140
},
141141
{ format = "x {3:output:FireEffMult}",
142142
{ breakdown = "FireEffMult" },
143-
{ label = "Player modifiers", modName = { "FirePenetration", "ElementalPenetration", "IgnoreFireResistance" }, cfg = "skill" },
143+
{ label = "Player modifiers", modName = { "FirePenetration", "ElementalPenetration", "IgnoreFireResistance", "IgnoreNonNegativeEleRes", "IgnoreElementalResistances" }, cfg = "skill" },
144144
{ label = "Enemy modifiers", modName = fireHitTaken, enemy = true, cfg = "skill" },
145145
},
146146
{ format = "x {3:output:ChaosEffMult}",

src/Modules/ModParser.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2863,7 +2863,7 @@ local specialModList = {
28632863
mod("Multiplier:FlameEffect", "BASE", 1),
28642864
} end,
28652865
-- Monk - Invoker
2866-
["critical hits ignore non%-negative enemy monster elemental resistances"] = { flag("CritsIgnoreNonNegativeEleRes", { type = "Condition", var = "CriticalStrike" }) },
2866+
["critical hits ignore non%-negative enemy monster elemental resistances"] = { flag("IgnoreNonNegativeEleRes", { type = "Condition", var = "CriticalStrike" }) },
28672867
-- Chronomancer
28682868
["skills have (%d+)%% chance to not consume a cooldown when used"] = function(num) return {
28692869
mod("CooldownChanceNotConsume", "BASE", num / 100, { type = "SkillType", skillType = SkillType.Cooldown })
@@ -3181,6 +3181,7 @@ local specialModList = {
31813181
["spell skills cannot deal critical hits except on final repeat"] = { flag("SpellSkillsCannotDealCriticalStrikesExceptOnFinalRepeat", nil, ModFlag.Spell), flag("", { type = "Condition", var = "alwaysFinalRepeat" }) },
31823182
["critical hits penetrate (%d+)%% of enemy elemental resistances while affected by zealotry"] = function(num) return { mod("ElementalPenetration", "BASE", num, { type = "Condition", var = "CriticalStrike" }, { type = "Condition", var = "AffectedByZealotry" }) } end,
31833183
["attack critical hits ignore enemy monster elemental resistances"] = { flag("IgnoreElementalResistances", { type = "Condition", var = "CriticalStrike" }, { type = "SkillType", skillType = SkillType.Attack }) },
3184+
["critical hits ignore enemy monster lightning resistance"] = { flag("IgnoreLightningResistance", { type = "Condition", var = "CriticalStrike" })},
31843185
["treats enemy monster elemental resistance values as inverted"] = { mod("HitsInvertEleResChance", "CHANCE", 100, { type = "Condition", var = "{Hand}Attack" }) } ,
31853186
["([%+%-]%d+)%% to critical damage bonus if you've shattered an enemy recently"] = function(num) return { mod("CritMultiplier", "BASE", num, { type = "Condition", var = "ShatteredEnemyRecently" }) } end,
31863187
["(%d+)%% chance to gain a flask charge when you deal a critical hit"] = function(num) return{ mod("FlaskChargeOnCritChance", "BASE", num) } end,
@@ -5156,6 +5157,7 @@ local specialModList = {
51565157
["hits have (%d+)%% chance to ignore enemy monster physical damage reduction"] = function (num) return {
51575158
mod("PartialIgnoreEnemyPhysicalDamageReduction", "BASE", num),
51585159
} end,
5160+
["hits ignore non%-negative elemental resistances of frozen enemies"] = { flag("IgnoreNonNegativeEleRes", { type = "ActorCondition", actor = "enemy", var = "Frozen" }) },
51595161
["viper strike and pestilent strike deal (%d+)%% increased attack damage per frenzy charge"] = function(num) return { mod("Damage", "INC", num, nil, ModFlag.Attack, { type = "Multiplier", var = "FrenzyCharge" }, { type = "SkillName", skillNameList = { "Viper Strike", "Pestilent Strike" }, includeTransfigured = true }) } end,
51605162
["shield charge and chain hook have (%d+)%% increased attack speed per (%d+) rampage kills"] = function(inc, _, num) return { mod("Speed", "INC", inc, nil, ModFlag.Attack, { type = "Multiplier", var = "Rampage", div = num, limit = 1000 / num, limitTotal = true }, { type = "SkillName", skillNameList = { "Shield Charge", "Chain Hook" }, includeTransfigured = true }) } end,
51615163
["tectonic slam and infernal blow deal (%d+)%% increased attack damage per (%d+) armour"] = function(inc, _, num) return { mod("Damage", "INC", inc, nil, ModFlag.Attack, { type = "PerStat", stat = "Armour", div = num }, { type = "SkillName", skillNameList = { "Tectonic Slam", "Infernal Blow" }, includeTransfigured = true }) } end,

0 commit comments

Comments
 (0)