(fix/Prototypes) simplify resilience by alot

This commit is contained in:
NoM0Re
2025-03-10 21:02:02 +01:00
parent b610365ea3
commit 73697d4f66
2 changed files with 2 additions and 16 deletions
-14
View File
@@ -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
+2 -2
View File
@@ -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 = {