Skip to content

Commit 20efcb4

Browse files
majochemLocalIdentity
andauthored
Add support for Vulnerability" ignore x Armour" mod (#733)
* Add Vulnerability curse ignore armour stat * Account for "IgnoreArmour" in CalcOffence * Add "IgnoreArmour" (and "Armour") to effective DPS breakdown for physical damage * Update parsing --------- Co-authored-by: majochem <majochem@users.noreply.github.com> Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 721a803 commit 20efcb4

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

src/Data/Skills/act_int.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17149,6 +17149,11 @@ skills["VulnerabilityPlayer"] = {
1714917149
area = true,
1715017150
duration = true,
1715117151
},
17152+
statMap = {
17153+
["vulnerability_total_armour_-"] = {
17154+
mod("IgnoreArmour", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
17155+
},
17156+
},
1715217157
constantStats = {
1715317158
{ "curse_delay_duration_ms", 1000 },
1715417159
{ "movement_speed_+%_final_while_performing_action", -70 },

src/Export/Skills/act_int.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,11 @@ statMap = {
10241024
#skill VulnerabilityPlayer
10251025
#set VulnerabilityPlayer
10261026
#flags area duration
1027+
statMap = {
1028+
["vulnerability_total_armour_-"] = {
1029+
mod("IgnoreArmour", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Curse" }),
1030+
},
1031+
},
10271032
#mods
10281033
#skillEnd
10291034

src/Modules/CalcOffence.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3195,6 +3195,8 @@ function calcs.offence(env, actor, activeSkill)
31953195

31963196
if damageType == "Physical" then
31973197
local enemyArmour = m_max(calcLib.val(enemyDB, "Armour"), 0)
3198+
local ignoreEnemyArmour = calcLib.val(enemyDB, "IgnoreArmour") -- check for mods that ignore Armour
3199+
if ignoreEnemyArmour and (enemyArmour > 0) then enemyArmour = m_max(enemyArmour - ignoreEnemyArmour, 0) end -- subtract ignored value up to zero, if Armour is still positive (to allow future support of negative Armour)
31983200
local armourReduction = calcs.armourReductionF(enemyArmour, damageTypeHitAvg * skillModList:More(cfg, "CalcArmourAsThoughDealing"))
31993201
local ChanceToIgnoreEnemyPhysicalDamageReduction = m_min(skillModList:Sum("BASE", cfg, "ChanceToIgnoreEnemyPhysicalDamageReduction"), 100)
32003202
if ChanceToIgnoreEnemyPhysicalDamageReduction > 0 and ChanceToIgnoreEnemyPhysicalDamageReduction < 100 then

src/Modules/CalcSections.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
-- Commonly used modifier lists
88
local physicalHitTaken = {
9-
"DamageTaken", "PhysicalDamageTaken", "CurseEffectOnSelf"
9+
"DamageTaken", "PhysicalDamageTaken", "CurseEffectOnSelf", "Armour", "IgnoreArmour"
1010
}
1111
local lightningHitTaken = {
1212
"DamageTaken", "LightningDamageTaken", "ElementalDamageTaken", "LightningResist", "ElementalResist", "CurseEffectOnSelf"

0 commit comments

Comments
 (0)