You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for Break Enemy Armour Below 0 - "Imploding Impacts" Warbringer (#759)
* Add support for Break Enemy Armour below 0 (Imploding Impacts)
* Remove obsolete code and comment
* Update Config Tooltip
* Adjust maximum damage bonus from negative Armour according to GGG info
* Add negative Armour damage bonus cap to Data.lua and use that instead
---------
Co-authored-by: majochem <[email protected]>
Copy file name to clipboardexpand all lines: src/Data/ModCache.lua
+1-1
Original file line number
Diff line number
Diff line change
@@ -3225,7 +3225,7 @@ c["While not on Low Infernal Flame, all Damage from you and Allies in your Prese
3225
3225
c["While on High Infernal Flame, you and Allies in your"]={nil,"While on High Infernal Flame, you and Allies in your "}
3226
3226
c["While on High Infernal Flame, you and Allies in your Presence Gain 20% of Damage as Fire Damage"]={nil,"While on High Infernal Flame, you and 20% of Damage as Fire Damage "}
3227
3227
c["You are Blind"]={{[1]={[1]={neg=true,type="Condition",var="CannotBeBlinded"},flags=0,keywordFlags=0,name="Condition:Blinded",type="FLAG",value=true}},nil}
3228
-
c["You can Break Enemy Armour to below 0"]={nil,"You can Break Enemy Armour to below 0 "}
3228
+
c["You can Break Enemy Armour to below 0"]={{[1]={[1]={effectName="ImplodingImpacts",effectType="Buff",type="GlobalEffect"},flags=0,keywordFlags=0,name="Condition:CanArmourBreakBelowZero",type="FLAG",value=true}},nil}
3229
3229
c["You can apply an additional Curse"]={{[1]={flags=0,keywordFlags=0,name="EnemyCurseLimit",type="BASE",value=1}},nil}
3230
3230
c["You can apply an additional Mark"]={{[1]={flags=0,keywordFlags=0,name="EnemyMarkLimit",type="BASE",value=1}},nil}
3231
3231
c["You can only Socket Emerald Jewels in this item"]={nil,"You can only Socket Emerald Jewels in this item "}
ifmodDB:GetCondition("CanArmourBreakBelowZero", cfg, nil) then-- check for possibility to break Armour below zero
3199
+
enemyArmourMin=-enemyDB:Sum("BASE", { source="Config"}, "Armour") or0-- adjust minimum armour value
3200
+
enemyDB:ReplaceMod("Armour", "OVERRIDE", -enemyDB:Sum("BASE", { source="Config" }, "Armour"), "ArmourBreak", { type="Condition", var="ArmourBrokenBelowZeroMax" }, { type="GlobalEffect", effectType="Debuff", effectName="ArmourBreak" }) -- if Config is set to Max, add mod with max value (use replace to avoid doubling)
localignoreEnemyArmour=calcLib.val(enemyDB, "IgnoreArmour") -- check for mods that ignore Armour
3199
3204
ifignoreEnemyArmourand (enemyArmour>0) thenenemyArmour=m_max(enemyArmour-ignoreEnemyArmour, 0) end-- subtract ignored value up to zero, if Armour is still positive (to allow future support of negative Armour)
{ var="conditionEnemyArmourBroken", type="check", label="Is enemy Armour Broken?", ifFlag="Condition:CanArmourBreak", tooltip="Some Skills, Items, Support Gems and other effects can Break Armour, which lowers a target's Armour by a specified amount.\nIf this brings the target's Armour value to 0, their Armour is Fully Broken for 12 seconds.", apply=function(val, modList, enemyModList)
{ var="multiplierArmourBreak", type="count", label="# of Broken Armour (if not maximum):", ifOption="conditionEnemyArmourBroken", tooltip="Use this field to set a custom Armour Break value.\nIf left empty or set to 0, Fully Broken Armour will be assumed.\nArmour cannot be broken below zero by default.", apply=function(val, modList, enemyModList)
1472
-
enemyModList:NewMod("Condition:ArmourBroken", "FLAG", val>0, "Config", { type="Condition", var="Effective" }) -- only activate if value > 0 is entered
1473
-
enemyModList:ReplaceMod("Condition:ArmourFullyBroken", "FLAG", val<1, "Config", { type="Condition", var="Effective" }) -- disable FullyBrokenArmour if value >= 1 is entered
{ var="multiplierArmourBreak", type="count", label="# of Broken Armour (if not maximum):", ifOption="conditionEnemyArmourBroken", tooltip="Use this field to set a custom Armour Break value.\nIf left empty or set to 0, Fully Broken Armour will be assumed.\nArmour cannot be broken below 0 unless stated otherwise.\nIf so, Armour can be broken up to the inverse of its original value.", apply=function(val, modList, enemyModList)
1473
+
enemyModList:NewMod("Condition:ArmourBroken", "FLAG", val>0, "ArmourBreak", { type="Condition", var="Effective" }) -- only activate if value > 0 is entered
1474
+
enemyModList:ReplaceMod("Condition:ArmourFullyBroken", "FLAG", val<1, "ArmourBreak", { type="Condition", var="Effective" }, { type="ActorCondition", actor="enemy", var="CanArmourBreakBelowZero", neg=true }) -- disable FullyBrokenArmour if value >= 1 is entered
{ var="conditionEnemyCursed", type="check", label="Is the enemy Cursed?", ifEnemyCond="Cursed", tooltip="The enemy will automatically be considered to be Cursed if you have at least one curse enabled,\nbut you can use this option to force it if necessary.", apply=function(val, modList, enemyModList)
["break armour equal to (%d+)%% of hit damage dealt"] = { flag("Condition:CanArmourBreak", { type = "GlobalEffect", effectType = "Buff", effectName = "ArmourBreak" })}, -- 'Anvil's Weight'
2834
+
["you can break enemy armour to below 0"] = { flag("Condition:CanArmourBreakBelowZero", { type = "GlobalEffect", effectType = "Buff", effectName = "ImplodingImpacts" })}, -- 'Imploding Impacts'
2834
2835
-- Trickster
2835
2836
["(%d+)%% chance to gain (%d+)%% of non%-chaos damage with hits as extra chaos damage"] = function(num, _, perc) return { mod("NonChaosDamageGainAsChaos", "BASE", num / 100 * tonumber(perc)) } end,
0 commit comments