From 0a13a1d71e85a94020a133a0b934650771d9dd39 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Sun, 22 Dec 2019 00:44:57 +0100 Subject: [PATCH] Resistance penetration is capped at 70% --- game/modules/tome/class/interface/Combat.lua | 4 ++-- game/modules/tome/class/interface/TooltipsData.lua | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index af67eab1b4..7efdbee361 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -2248,7 +2248,7 @@ end function _M:combatGetResistPen(type, straight) if not self.resists_pen then return 0 end local pen = (self.resists_pen.all or 0) + (self.resists_pen[type] or 0) - if straight then return pen end + if straight then return math.min(pen, 70) end local add = 0 if self.auto_highest_resists_pen and self.auto_highest_resists_pen[type] then @@ -2267,7 +2267,7 @@ function _M:combatGetResistPen(type, straight) add = add + t.getPenetration(self, t) end - return pen + add + return math.min(pen + add, 70) end --- Returns the damage affinity diff --git a/game/modules/tome/class/interface/TooltipsData.lua b/game/modules/tome/class/interface/TooltipsData.lua index 1acab5eac2..0e64ef5a8d 100644 --- a/game/modules/tome/class/interface/TooltipsData.lua +++ b/game/modules/tome/class/interface/TooltipsData.lua @@ -478,10 +478,12 @@ TOOLTIP_RESISTS_PEN_ALL = [[#GOLD#Damage penetration: all#LAST# Reduces the amount of effective resistance of your foes to any damage you deal by this percent. If you have 50% penetration against a creature with 50% resistance it will have an effective resistance of 25%. This stacks with individual damage type penetrations. +You can never have more than 70% penetration. ]] TOOLTIP_RESISTS_PEN = [[#GOLD#Damage penetration: specific#LAST# Reduces the effective resistance of your foes to all damage of this type you deal by this percent. If you have 50% penetration against a creature with 50% resistance it will have an effective resistance of 25%. +You can never have more than 70% penetration. ]] TOOLTIP_FLAT_RESIST = [[#GOLD#Flat resistances#LAST# Reduces each hit of a certain damage type (or all) by this amount. -- GitLab