From 73697d4f6618c1bdf61da3001f0020e461e318db Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Mon, 10 Mar 2025 21:02:02 +0100 Subject: [PATCH] (fix/Prototypes) simplify resilience by alot --- WeakAuras/GenericTrigger.lua | 14 -------------- WeakAuras/Prototypes.lua | 4 ++-- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index 7a7e8f2..af0d338 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -4405,20 +4405,6 @@ WeakAuras.GetHitChance = function() return max(melee, ranged, spell) end -WeakAuras.GetResilienceDamageReduction = function() - local ratings = { - {value = GetCombatRating(CR_CRIT_TAKEN_MELEE), type = CR_CRIT_TAKEN_MELEE}, - {value = GetCombatRating(CR_CRIT_TAKEN_RANGED), type = CR_CRIT_TAKEN_RANGED}, - {value = GetCombatRating(CR_CRIT_TAKEN_SPELL), type = CR_CRIT_TAKEN_SPELL}, - } - local lowest = ratings[1] - for _, rating in ipairs(ratings) do - if rating.value < lowest.value then lowest = rating end - end - return GetCombatRatingBonus(lowest.type) * 2 -end - - local types = {} tinsert(types, "custom") for type in pairs(Private.category_event_prototype) do diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 0eb3fc0..1c3fc68 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -7143,7 +7143,7 @@ Private.event_prototypes = { name = "resiliencerating", display = L["Resilience Rating"], type = "number", - init = "min(GetCombatRating(CR_CRIT_TAKEN_MELEE), GetCombatRating(CR_CRIT_TAKEN_RANGED), GetCombatRating(CR_CRIT_TAKEN_SPELL))", + init = "GetCombatRating(CR_CRIT_TAKEN_MELEE)", store = true, conditionType = "number", multiEntry = { @@ -7155,7 +7155,7 @@ Private.event_prototypes = { name = "resiliencepercent", display = L["Resilience (%)"], type = "number", - init = "WeakAuras.GetResilienceDamageReduction()", + init = "GetCombatRatingBonus(CR_CRIT_TAKEN_MELEE)", store = true, conditionType = "number", multiEntry = {