Skip to content

Commit b0711e4

Browse files
authored
Added support for break armour on hit (#756)
* added support for armour break per hit * changed text color in calcs tab * fixed misspell * armor -> armour * added support for inc armour break when applied an ailment * added condition AppliedAilmentsRecently * changed displayed text in calcs tab * added condition AppliedAilmentsRecently for electrocute * fixed support for increased armour break when enemy has ailments * using calcLib.val for calculation
1 parent bcb7ce5 commit b0711e4

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

src/Data/ModCache.lua

+7-14
Original file line numberDiff line numberDiff line change
@@ -2387,21 +2387,14 @@ c["Blocking Damage Poisons the Enemy as though dealing 100 Base Chaos Damage Blo
23872387
c["Blocking Damage Poisons the Enemy as though dealing 200 Base Chaos Damage"]={nil,"Blocking Damage Poisons the Enemy as though dealing 200 Base Chaos Damage "}
23882388
c["Bow Attacks fire 3 additional Arrows"]={{[1]={flags=131072,keywordFlags=0,name="ProjectileCount",type="BASE",value=3}},nil}
23892389
c["Bow Attacks fire an additional Arrow"]={{[1]={flags=131072,keywordFlags=0,name="ProjectileCount",type="BASE",value=1}},nil}
2390-
c["Break 10% increased Armour"]={nil,"Break 10% increased Armour "}
2391-
c["Break 10% increased Armour 6% increased Physical Damage"]={nil,"Break 10% increased Armour 6% increased Physical Damage "}
2392-
c["Break 10% increased Armour 8% increased Attack Area Damage"]={nil,"Break 10% increased Armour 8% increased Attack Area Damage "}
2393-
c["Break 15% increased Armour"]={nil,"Break 15% increased Armour "}
2394-
c["Break 20% increased Armour"]={nil,"Break 20% increased Armour "}
2395-
c["Break 25% increased Armour"]={nil,"Break 25% increased Armour "}
2396-
c["Break 25% increased Armour 16% increased Area of Effect for Attacks"]={nil,"Break 25% increased Armour 16% increased Area of Effect for Attacks "}
2397-
c["Break 30% increased Armour on enemies affected by Ailments"]={nil,"Break 30% increased Armour on enemies affected by Ailments "}
2398-
c["Break 30% increased Armour on enemies affected by Ailments +10 to Strength"]={nil,"Break 30% increased Armour on enemies affected by Ailments +10 to Strength "}
2399-
c["Break 30% increased Armour on enemies affected by Ailments +10 to Strength 25% increased Physical Damage"]={nil,"Break 30% increased Armour on enemies affected by Ailments +10 to Strength 25% increased Physical Damage "}
2400-
c["Break 40% increased Armour"]={nil,"Break 40% increased Armour "}
2401-
c["Break 40% increased Armour 25% increased Physical Damage"]={nil,"Break 40% increased Armour 25% increased Physical Damage "}
2390+
c["Break 10% increased Armour"]={{[1]={flags=0,keywordFlags=0,name="ArmourBreakPerHit",type="INC",value=10}},nil}
2391+
c["Break 15% increased Armour"]={{[1]={flags=0,keywordFlags=0,name="ArmourBreakPerHit",type="INC",value=15}},nil}
2392+
c["Break 20% increased Armour"]={{[1]={flags=0,keywordFlags=0,name="ArmourBreakPerHit",type="INC",value=20}},nil}
2393+
c["Break 25% increased Armour"]={{[1]={flags=0,keywordFlags=0,name="ArmourBreakPerHit",type="INC",value=25}},nil}
2394+
c["Break 30% increased Armour on enemies affected by Ailments"]={{[1]={[1]={actor="enemy",type="ActorCondition",varList={[1]="Frozen",[2]="Chilled",[3]="Shocked",[4]="Electrocuted",[5]="Ignited",[6]="Poisoned",[7]="Bleeding"}},flags=0,keywordFlags=0,name="ArmourBreakPerHit",type="INC",value=30}},nil}
2395+
c["Break 40% increased Armour"]={{[1]={flags=0,keywordFlags=0,name="ArmourBreakPerHit",type="INC",value=40}},nil}
24022396
c["Break 50% of Armour on Heavy Stunning an Enemy"]={{[1]={[1]={effectName="ArmourBreak",effectType="Buff",type="GlobalEffect"},flags=0,keywordFlags=0,name="Condition:CanArmourBreak",type="FLAG",value=true}},nil}
2403-
c["Break 60% increased Armour"]={nil,"Break 60% increased Armour "}
2404-
c["Break 60% increased Armour 10% chance to Defend with 200% of Armour"]={nil,"Break 60% increased Armour 10% chance to Defend with 200% of Armour "}
2397+
c["Break 60% increased Armour"]={{[1]={flags=0,keywordFlags=0,name="ArmourBreakPerHit",type="INC",value=60}},nil}
24052398
c["Break Armour equal to 10% of Hit Damage dealt"]={{[1]={[1]={effectName="ArmourBreak",effectType="Buff",type="GlobalEffect"},flags=0,keywordFlags=0,name="Condition:CanArmourBreak",type="FLAG",value=true}},nil}
24062399
c["Break Armour on Critical Hit with Spells equal to 10% of Physical Damage dealt"]={{[1]={[1]={effectName="ArmourBreak",effectType="Buff",type="GlobalEffect"},[2]={neg=true,type="Condition",var="NeverCrit"},flags=0,keywordFlags=0,name="Condition:CanArmourBreak",type="FLAG",value=true}},nil}
24072400
c["Break Armour on Critical Hit with Spells equal to 5% of Physical Damage dealt"]={{[1]={[1]={effectName="ArmourBreak",effectType="Buff",type="GlobalEffect"},[2]={neg=true,type="Condition",var="NeverCrit"},flags=0,keywordFlags=0,name="Condition:CanArmourBreak",type="FLAG",value=true}},nil}

src/Data/SkillStatMap.lua

+1
Original file line numberDiff line numberDiff line change
@@ -2347,6 +2347,7 @@ return {
23472347
},
23482348
["apply_X_armour_break_on_hit"] = {
23492349
flag("Condition:CanArmourBreak", { type = "GlobalEffect", effectType = "Buff", effectName = "ArmourBreak" }),
2350+
mod("ArmourBreakPerHit", "BASE", nil),
23502351
},
23512352
["armour_break_physical_damage_%_dealt_as_armour_break"] = {
23522353
flag("Condition:CanArmourBreak", { type = "GlobalEffect", effectType = "Buff", effectName = "ArmourBreak" }),

src/Modules/CalcOffence.lua

+3
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ function calcs.offence(env, actor, activeSkill)
345345
return
346346
end
347347

348+
-- Calculate armour break
349+
output.ArmourBreakPerHit = calcLib.val(skillModList, "ArmourBreakPerHit", skillCfg)
350+
348351
local function calcAreaOfEffect(skillModList, skillCfg, skillData, skillFlags, output, breakdown)
349352
local incArea, moreArea = calcLib.mods(skillModList, skillCfg, "AreaOfEffect", "AreaOfEffectPrimary")
350353
output.AreaOfEffectMod = round(round(incArea * moreArea, 10), 2)

src/Modules/CalcSections.lua

+1
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ return {
624624
{ label = "ES % per second", color = colorCodes.ES, haveOutput = "ESPercentPerSecondHasCost", { format = "{2:output:ESPercentPerSecondCost}", { breakdown = "ESPercentPerSecondCost" }, { modName = { "ESCost", "Cost", "ESCostNoMult" }, cfg = "skill" }, }, },
625625
{ label = "Rage Cost", color = colorCodes.RAGE, haveOutput = "RageHasCost", { format = "{0:output:RageCost}", { breakdown = "RageCost" }, { modName = { "RageCost", "Cost", "RageNoMult" }, cfg = "skill" }, }, },
626626
{ label = "Rage per second", color = colorCodes.RAGE, haveOutput = "RagePerSecondHasCost", { format = "{2:output:RagePerSecondCost}", { breakdown = "RagePerSecondCost" }, { modName = { "RageCost", "Cost", "RageNoMult" }, cfg = "skill" }, }, },
627+
{ label = "Armour Break / hit", haveOutput = "ArmourBreakPerHit", { format = "{0:output:ArmourBreakPerHit}", { modName = "ArmourBreakPerHit", modType = "BASE"} }, },
627628
{ label = "Soul Cost", color = colorCodes.RAGE, haveOutput = "SoulHasCost", { format = "{0:output:SoulCost}", { breakdown = "SoulCost" }, { modName = { "SoulCost" }, cfg = "skill" }, }, },
628629
{ label = "Active Minion Limit", haveOutput = "ActiveMinionLimit", { format = "{0:output:ActiveMinionLimit}" } },
629630
{ label = "Quantity Multiplier", haveOutput = "QuantityMultiplier", { format = "{0:output:QuantityMultiplier}",

src/Modules/ModParser.lua

+3
Original file line numberDiff line numberDiff line change
@@ -3631,6 +3631,9 @@ local specialModList = {
36313631
["chaos damage with hits is lucky"] = { flag("ChaosLuckyHits") },
36323632
["elemental damage with hits is lucky while you are shocked"] = { flag("ElementalLuckHits", { type = "Condition", var = "Shocked" }) },
36333633
["break (%d+)%% of armour on heavy stunning an enemy"] = { flag("Condition:CanArmourBreak", { type = "GlobalEffect", effectType = "Buff", effectName = "ArmourBreak" }) },
3634+
["break (%d+)%% increased armour"] = function(num) return { mod("ArmourBreakPerHit", "INC", num)} end,
3635+
["break (%d+)%% increased armour on enemies affected by ailments"] = function(num) return {
3636+
mod("ArmourBreakPerHit", "INC", num, { type = "ActorCondition", actor = "enemy", varList = { "Frozen","Chilled","Shocked","Electrocuted","Ignited","Poisoned","Bleeding" } } )} end,
36343637
["allies' aura buffs do not affect you"] = { flag("AlliesAurasCannotAffectSelf") },
36353638
["(%d+)%% increased effect of non%-curse auras from your skills on enemies"] = function(num) return {
36363639
mod("DebuffEffect", "INC", num, { type = "SkillType", skillType = SkillType.Aura }, { type = "SkillType", skillType = SkillType.AppliesCurse, neg = true }),

0 commit comments

Comments
 (0)