From 4cacbfbdba33a8093871b8a35e50ce44334de162 Mon Sep 17 00:00:00 2001 From: Casey Raethke Date: Wed, 30 Oct 2024 19:29:39 -0500 Subject: [PATCH] Add options to show modified base stat amounts in breakdowns --- RatingBuster.lua | 184 +++++++++++++++++++++++------------ libs/StatLogic/StatLogic.lua | 70 +++++++------ locales/deDE.lua | 1 + locales/enUS.lua | 1 + locales/esES.lua | 1 + locales/esMX.lua | 1 + locales/frFR.lua | 1 + locales/itIT.lua | 1 + locales/koKR.lua | 1 + locales/ptBR.lua | 1 + locales/ruRU.lua | 1 + locales/zhCN.lua | 1 + locales/zhTW.lua | 1 + 13 files changed, 171 insertions(+), 94 deletions(-) diff --git a/RatingBuster.lua b/RatingBuster.lua index bd832f7..b77fa6e 100644 --- a/RatingBuster.lua +++ b/RatingBuster.lua @@ -1221,6 +1221,8 @@ local defaults = { showMP5NCFromSpi = false, showHP5NCFromSpi = false, + showModifiedRangedAttackPower = false, + showHP5NCFromHealth = false, showDefenseFromDefenseRating = false, @@ -1347,6 +1349,7 @@ if class == "DEATHKNIGHT" then defaults.profile.sumCrit = true defaults.profile.sumHaste = true defaults.profile.sumExpertise = true + defaults.profile.showAPFromStr = true defaults.profile.showSpellCritFromInt = false defaults.profile.ratingPhysical = true defaults.profile.sumArmorPenetration = true @@ -1363,6 +1366,7 @@ elseif class == "DRUID" then defaults.profile.sumSpellCrit = true defaults.profile.sumSpellHaste = true defaults.profile.sumHealing = true + defaults.profile.showAPFromStr = true defaults.profile.ratingPhysical = true defaults.profile.ratingSpell = true defaults.profile.sumArmorPenetration = true @@ -1373,6 +1377,7 @@ elseif class == "HUNTER" then defaults.profile.sumRangedHit = true defaults.profile.sumRangedCrit = true defaults.profile.sumRangedHaste = true + defaults.profile.showModifiedRangedAttackPower = true defaults.profile.showDodgeFromAgi = false defaults.profile.showSpellCritFromInt = false defaults.profile.ratingPhysical = true @@ -1399,6 +1404,7 @@ elseif class == "PALADIN" then defaults.profile.sumSpellCrit = true defaults.profile.sumSpellHaste = true defaults.profile.sumHealing = true + defaults.profile.showAPFromStr = true defaults.profile.ratingPhysical = true defaults.profile.ratingSpell = true elseif class == "PRIEST" then @@ -1420,6 +1426,7 @@ elseif class == "ROGUE" then defaults.profile.sumCrit = true defaults.profile.sumHaste = true defaults.profile.sumExpertise = true + defaults.profile.showAPFromStr = true defaults.profile.showSpellCritFromInt = false defaults.profile.ratingPhysical = true defaults.profile.sumArmorPenetration = true @@ -1435,6 +1442,7 @@ elseif class == "SHAMAN" then defaults.profile.sumSpellCrit = true defaults.profile.sumSpellHaste = true defaults.profile.sumHealing = true + defaults.profile.showAPFromStr = true defaults.profile.showDodgeFromAgi = false defaults.profile.ratingPhysical = true defaults.profile.ratingSpell = true @@ -1458,6 +1466,7 @@ elseif class == "WARRIOR" then defaults.profile.sumCrit = true defaults.profile.sumHaste = true defaults.profile.sumExpertise = true + defaults.profile.showAPFromStr = true defaults.profile.showSpellCritFromInt = false defaults.profile.ratingPhysical = true defaults.profile.sumArmorPenetration = true @@ -1489,15 +1498,20 @@ do -- Backwards compatibility local statStringToStat = setmetatable({ + ["AGI"] = StatLogic.Stats.Agility, ["AP"] = StatLogic.Stats.AttackPower, - ["RANGED_AP"] = StatLogic.Stats.RangedAttackPower, - ["MANA_REG"] = StatLogic.Stats.ManaRegen, - ["NORMAL_MANA_REG"] = StatLogic.Stats.ManaRegenNotCasting, + ["HEALING"] = StatLogic.Stats.HealingPower, ["HEALTH_REG"] = StatLogic.Stats.HealthRegen, + ["INT"] = StatLogic.Stats.Intellect, + ["MANA_REG"] = StatLogic.Stats.ManaRegen, ["NORMAL_HEALTH_REG"] = StatLogic.Stats.HealthRegenOutOfCombat, - ["SPELL_DMG"] = StatLogic.Stats.SpellDamage, - ["HEALING"] = StatLogic.Stats.HealingPower, + ["NORMAL_MANA_REG"] = StatLogic.Stats.ManaRegenNotCasting, ["PVP_DAMAGE_REDUCTION"] = StatLogic.Stats.PvPDamageReduction, + ["RANGED_AP"] = StatLogic.Stats.RangedAttackPower, + ["SPELL_DMG"] = StatLogic.Stats.SpellDamage, + ["SPI"] = StatLogic.Stats.Spirit, + ["STA"] = StatLogic.Stats.Stamina, + ["STR"] = StatLogic.Stats.Strength, }, { __index = function(_, stat) @@ -1515,6 +1529,9 @@ do local addStatModOption = function(add, mod, sources) -- Override groups that are hidden by default local groupID, rating = tostring(mod):lower():gsub("_rating$", "") + if mod == "RANGED_AP" then + groupID = "ap" + end local group = options.args.stat.args[groupID] if not group then return end group.hidden = false @@ -1525,8 +1542,16 @@ do group.desc = L["Changes the display of %s"]:format(L[mod_stat]) end - -- ADD_HEALING_MOD_INT -> showHealingFromInt - local key = "show" .. statToOptionKey[add] .. "From" .. statToOptionKey[mod] + local key, name + if add then + -- ADD_HEALING_MOD_INT -> showHealingFromInt + key = "show" .. statToOptionKey[add] .. "From" .. statToOptionKey[mod] + name = L["Show %s"]:format(L[statStringToStat[add]]) + else + key = "showModified" .. tostring(statStringToStat[mod]) + name = L["Show Modified %s"]:format(L[statStringToStat[mod]]) + end + if defaults.profile[key] == nil then defaults.profile[key] = true end @@ -1536,13 +1561,15 @@ do option = { type = "toggle", width = "full", - order = rating == 1 and 1 or nil, + -- Prioritize direct results of rating conversion, + -- as well as "modified" options + order = (rating == 1 or not add) and 1 or nil, } else sources = option.desc .. ", " .. sources end - option.name = L["Show %s"]:format(L[statStringToStat[add]]) + option.name = name option.desc = sources group.args[key] = option @@ -1558,7 +1585,7 @@ do local add = StatLogic.StatModInfo[statMod].add local mod = StatLogic.StatModInfo[statMod].mod - if add and mod then + if mod then local sources = "" local firstSource = true local show = false @@ -1586,36 +1613,38 @@ do end if show then - -- Molten Armor and Forceful Deflection give rating, - -- but we show it to the user as the converted stat - add = add:gsub("_RATING", "") - - -- We want to show the user Armor, regardless of where it comes from - if add == "BONUS_ARMOR" then - add = StatLogic.Stats.Armor - end - - if mod == "NORMAL_MANA_REG" then - mod = "SPI" - if statModContext("ADD_NORMAL_MANA_REG_MOD_INT") > 0 then - -- "Normal mana regen" is added from both int and spirit - addStatModOption(add, "INT", sources) + if add then + -- Molten Armor and Forceful Deflection give rating, + -- but we show it to the user as the converted stat + add = add:gsub("_RATING", "") + + -- We want to show the user Armor, regardless of where it comes from + if add == "BONUS_ARMOR" then + add = StatLogic.Stats.Armor end - elseif mod == "NORMAL_HEALTH_REG" then - if statModContext("ADD_NORMAL_HEALTH_REG_MOD_SPI") > 0 then - -- Vanilla through Wrath + + if mod == "NORMAL_MANA_REG" then mod = "SPI" - elseif statModContext("ADD_NORMAL_HEALTH_REG_MOD_HEALTH") > 0 then - -- Cata onwards - mod = "HEALTH" + if statModContext("ADD_NORMAL_MANA_REG_MOD_INT") > 0 then + -- "Normal mana regen" is added from both int and spirit + addStatModOption(add, "INT", sources) + end + elseif mod == "NORMAL_HEALTH_REG" then + if statModContext("ADD_NORMAL_HEALTH_REG_MOD_SPI") > 0 then + -- Vanilla through Wrath + mod = "SPI" + elseif statModContext("ADD_NORMAL_HEALTH_REG_MOD_HEALTH") > 0 then + -- Cata onwards + mod = "HEALTH" + end + elseif mod == "MANA" then + mod = "INT" end - elseif mod == "MANA" then - mod = "INT" - end - -- Demonic Knowledge technically scales with pet stats, - -- but we compute the scaling from player's stats - mod = mod:gsub("^PET_", "") + -- Demonic Knowledge technically scales with pet stats, + -- but we compute the scaling from player's stats + mod = mod:gsub("^PET_", "") + end addStatModOption(add, mod, sources) end @@ -2148,7 +2177,7 @@ function RatingBuster:ProcessText(text, link, color, statModContext) value = tonumber(value) if not value then return text end local infoTable = StatLogic.StatTable.new() - RatingBuster:ProcessStat(stat, value, infoTable, link, color, statModContext) + RatingBuster:ProcessStat(stat, value, infoTable, link, color, statModContext, true) local effects = {} -- Group effects with identical values for statID, effect in pairs(infoTable) do @@ -2255,12 +2284,13 @@ do ---@param link string ---@param color any ---@param statModContext StatModContext - function RatingBuster:ProcessStat(statID, value, infoTable, link, color, statModContext) + ---@param isBaseStat boolean + function RatingBuster:ProcessStat(statID, value, infoTable, link, color, statModContext, isBaseStat) if StatLogic.GenericStatMap[statID] then local statList = StatLogic.GenericStatMap[statID] for _, convertedStatID in ipairs(statList) do if not RatingType.Ranged[convertedStatID] then - RatingBuster:ProcessStat(convertedStatID, value, infoTable, link, color, statModContext) + RatingBuster:ProcessStat(convertedStatID, value, infoTable, link, color, statModContext, true) end end elseif StatLogic.RatingBase[statID] and db.profile.showRatings then @@ -2273,7 +2303,7 @@ do if db.profile.showDefenseFromDefenseRating then infoTable["Decimal"] = effect end - self:ProcessStat(StatLogic.Stats.Defense, effect, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.Defense, effect, infoTable, link, color, statModContext, false) elseif statID == StatLogic.Stats.DodgeRating and db.profile.enableAvoidanceDiminishingReturns then infoTable["Percent"] = StatLogic:GetAvoidanceGainAfterDR(StatLogic.Stats.Dodge, processedDodge + effect) - StatLogic:GetAvoidanceGainAfterDR(StatLogic.Stats.Dodge, processedDodge) processedDodge = processedDodge + effect @@ -2356,9 +2386,13 @@ do -------------- -- Strength -- -------------- - value = value * statModContext("MOD_STR") + local mod = statModContext("MOD_STR") + value = value * mod + if isBaseStat and mod ~= 1 and db.profile.showModifiedStrength then + infoTable["Decimal"] = value + end local attackPower = value * statModContext("ADD_AP_MOD_STR") - self:ProcessStat(StatLogic.Stats.AttackPower, attackPower, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.AttackPower, attackPower, infoTable, link, color, statModContext, false) if db.profile.showAPFromStr then local effect = attackPower * statModContext("MOD_AP") infoTable[StatLogic.Stats.AttackPower] = infoTable[StatLogic.Stats.AttackPower] + effect @@ -2368,7 +2402,7 @@ do infoTable[StatLogic.Stats.BlockValue] = infoTable[StatLogic.Stats.BlockValue] + effect end local spellDamage = value * statModContext("ADD_SPELL_DMG_MOD_STR") - self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext, false) if db.profile.showSpellDmgFromStr then local effect = spellDamage * statModContext("MOD_SPELL_DMG") infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + effect @@ -2396,9 +2430,13 @@ do ------------- -- Agility -- ------------- - value = value * statModContext("MOD_AGI") + local mod = statModContext("MOD_AGI") + value = value * mod + if isBaseStat and mod ~= 1 and db.profile.showModifiedAgility then + infoTable["Decimal"] = value + end local attackPower = value * statModContext("ADD_AP_MOD_AGI") - self:ProcessStat(StatLogic.Stats.AttackPower, attackPower, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.AttackPower, attackPower, infoTable, link, color, statModContext, false) if db.profile.showAPFromAgi then local effect = attackPower * statModContext("MOD_AP") infoTable[StatLogic.Stats.AttackPower] = infoTable[StatLogic.Stats.AttackPower] + effect @@ -2421,7 +2459,7 @@ do infoTable[StatLogic.Stats.Dodge] = infoTable[StatLogic.Stats.Dodge] + effect end local bonusArmor = value * statModContext("ADD_BONUS_ARMOR_MOD_AGI") - self:ProcessStat(StatLogic.Stats.BonusArmor, bonusArmor, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.BonusArmor, bonusArmor, infoTable, link, color, statModContext, false) if db.profile.showArmorFromAgi then infoTable[StatLogic.Stats.Armor] = infoTable[StatLogic.Stats.Armor] + bonusArmor end @@ -2433,9 +2471,13 @@ do ------------- -- Stamina -- ------------- - value = value * statModContext("MOD_STA") + local mod = statModContext("MOD_STA") + value = value * mod + if isBaseStat and mod ~= 1 and db.profile.showModifiedStamina then + infoTable["Decimal"] = value + end local health = value * statModContext("ADD_HEALTH_MOD_STA") - self:ProcessStat(StatLogic.Stats.Health, health, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.Health, health, infoTable, link, color, statModContext, false) if db.profile.showHealthFromSta then local effect = health * statModContext("MOD_HEALTH") infoTable[StatLogic.Stats.Health] = infoTable[StatLogic.Stats.Health] + effect @@ -2443,7 +2485,7 @@ do local spellDamage = value * statModContext("ADD_SPELL_DMG_MOD_STA") + statModContext("ADD_SPELL_DMG_MOD_PET_STA") * statModContext("MOD_PET_STA") * statModContext("ADD_PET_STA_MOD_STA") - self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext, false) if db.profile.showSpellDmgFromSta then local effect = spellDamage * statModContext("MOD_SPELL_DMG") infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + effect @@ -2457,13 +2499,18 @@ do --------------- -- Intellect -- --------------- - value = value * statModContext("MOD_INT") + local mod = statModContext("MOD_INT") + value = value * mod + if isBaseStat and mod ~= 1 and db.profile.showModifiedIntellect then + infoTable["Decimal"] = value + end + if db.profile.showManaFromInt then local effect = value * statModContext("ADD_MANA_MOD_INT") * statModContext("MOD_MANA") infoTable[StatLogic.Stats.Mana] = infoTable[StatLogic.Stats.Mana] + effect end local spellCrit = value * statModContext("ADD_SPELL_CRIT_MOD_INT") - self:ProcessStat(StatLogic.Stats.SpellCrit, spellCrit, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.SpellCrit, spellCrit, infoTable, link, color, statModContext, false) if db.profile.showSpellCritFromInt then infoTable[StatLogic.Stats.SpellCrit] = infoTable[StatLogic.Stats.SpellCrit] + spellCrit end @@ -2473,7 +2520,7 @@ do + statModContext("ADD_SPELL_DMG_MOD_PET_INT") * statModContext("MOD_PET_INT") * statModContext("ADD_PET_INT_MOD_INT") + statModContext("ADD_SPELL_DMG_MOD_MANA") * statModContext("MOD_MANA") * statModContext("ADD_MANA_MOD_INT") ) - self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext, false) if db.profile.showSpellDmgFromInt then local effect = spellDamage * statModContext("MOD_SPELL_DMG") infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + effect @@ -2507,7 +2554,7 @@ do infoTable[StatLogic.Stats.Armor] = infoTable[StatLogic.Stats.Armor] + effect end local attackPower = value * statModContext("ADD_AP_MOD_INT") - self:ProcessStat(StatLogic.Stats.AttackPower, attackPower, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.AttackPower, attackPower, infoTable, link, color, statModContext, false) if db.profile.showAPFromInt then local effect = attackPower * statModContext("MOD_AP") infoTable[StatLogic.Stats.AttackPower] = infoTable[StatLogic.Stats.AttackPower] + effect @@ -2516,7 +2563,11 @@ do ------------ -- Spirit -- ------------ - value = value * statModContext("MOD_SPI") + local mod = statModContext("MOD_SPI") + value = value * mod + if isBaseStat and mod ~= 1 and db.profile.showModifiedSpirit then + infoTable["Decimal"] = value + end if db.profile.showMP5FromSpi then local effect = value * statModContext("ADD_NORMAL_MANA_REG_MOD_SPI") * statModContext("MOD_NORMAL_MANA_REG") * math.min(statModContext("ADD_MANA_REG_MOD_NORMAL_MANA_REG"), 1) infoTable[StatLogic.Stats.ManaRegen] = infoTable[StatLogic.Stats.ManaRegen] + effect @@ -2535,7 +2586,7 @@ do end local spellDamage = value * statModContext("ADD_SPELL_DMG_MOD_SPI") - self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext, false) if db.profile.showSpellDmgFromSpi then local effect = spellDamage * statModContext("MOD_SPELL_DMG") infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + effect @@ -2615,14 +2666,14 @@ do end local attackPower = value * statModContext("ADD_AP_MOD_DEFENSE") - self:ProcessStat(StatLogic.Stats.AttackPower, attackPower, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.AttackPower, attackPower, infoTable, link, color, statModContext, false) if db.profile.showAPFromDefense then local effect = attackPower * statModContext("MOD_AP") infoTable[StatLogic.Stats.AttackPower] = infoTable[StatLogic.Stats.AttackPower] + effect end local spellDamage = value * statModContext("ADD_SPELL_DMG_MOD_DEFENSE") - self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext, false) if db.profile.showSpellDmgFromDefense then local effect = spellDamage * statModContext("MOD_SPELL_DMG") infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + effect @@ -2630,18 +2681,19 @@ do elseif statID == StatLogic.Stats.Armor then local base, bonus = StatLogic:GetArmorDistribution(link, value, color) value = base * statModContext("MOD_ARMOR") + bonus - self:ProcessStat(StatLogic.Stats.BonusArmor, value, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.BonusArmor, value, infoTable, link, color, statModContext, false) elseif db.profile.showAPFromArmor and statID == StatLogic.Stats.BonusArmor then local effect = value * statModContext("ADD_AP_MOD_ARMOR") * statModContext("MOD_AP") infoTable[StatLogic.Stats.AttackPower] = infoTable[StatLogic.Stats.AttackPower] + effect elseif statID == StatLogic.Stats.AttackPower then - ------------------ - -- Attack Power -- - ------------------ - value = value * statModContext("MOD_AP") + local mod = statModContext("MOD_AP") + value = value * mod + if isBaseStat and mod ~= 1 and db.profile.showModifiedAttackPower then + infoTable["Decimal"] = value + end local spellDamage = value * statModContext("ADD_SPELL_DMG_MOD_AP") - self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext) + self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext, false) if db.profile.showSpellDmgFromAP then local effect = spellDamage * statModContext("MOD_SPELL_DMG") infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + effect @@ -2651,6 +2703,12 @@ do local effect = value * statModContext("ADD_HEALING_MOD_AP") * statModContext("MOD_HEALING") infoTable[StatLogic.Stats.HealingPower] = infoTable[StatLogic.Stats.HealingPower] + effect end + elseif statID == StatLogic.Stats.RangedAttackPower then + local mod = statModContext("MOD_RANGED_AP") + value = value * mod + if isBaseStat and mod ~= 1 and db.profile.showModifiedRangedAttackPower then + infoTable[statID] = value + end elseif statID == StatLogic.Stats.SpellDamage then value = value * statModContext("MOD_SPELL_DMG") if db.profile.showBlockValueFromSpellDmg then diff --git a/libs/StatLogic/StatLogic.lua b/libs/StatLogic/StatLogic.lua index 7b07832..b41ffb0 100644 --- a/libs/StatLogic/StatLogic.lua +++ b/libs/StatLogic/StatLogic.lua @@ -367,14 +367,6 @@ StatLogic.StatModInfo = { initialValue = 0, finalAdjust = 0, }, - ["MOD_AGI"] = { - initialValue = 1, - finalAdjust = 0, - }, - ["MOD_AP"] = { - initialValue = 0, - finalAdjust = 1, - }, ["MOD_ARMOR"] = { initialValue = 1, finalAdjust = 0, @@ -399,10 +391,6 @@ StatLogic.StatModInfo = { initialValue = 1, finalAdjust = 0, }, - ["MOD_INT"] = { - initialValue = 1, - finalAdjust = 0, - }, ["MOD_MANA"] = { initialValue = 1, finalAdjust = 0, @@ -419,26 +407,10 @@ StatLogic.StatModInfo = { initialValue = 1, finalAdjust = 0, }, - ["MOD_RANGED_AP"] = { - initialValue = 0, - finalAdjust = 1, - }, ["MOD_SPELL_DMG"] = { initialValue = 0, finalAdjust = 1, }, - ["MOD_SPI"] = { - initialValue = 1, - finalAdjust = 0, - }, - ["MOD_STA"] = { - initialValue = 1, - finalAdjust = 0, - }, - ["MOD_STR"] = { - initialValue = 1, - finalAdjust = 0, - }, } -- StatMods used by RatingBuster to dynamically add options for stat breakdowns @@ -670,12 +642,48 @@ local addedInfoMods = { mod = "RESILIENCE", }, + { + mod = "AGI", + initialValue = 1, + }, + { + mod = "AP", + finalAdjust = 1, + }, + { + mod = "INT", + initialValue = 1, + }, + { + mod = "RANGED_AP", + finalAdjust = 1, + }, + { + mod = "SPI", + initialValue = 1, + }, + { + mod = "STA", + initialValue = 1, + }, + { + mod = "STR", + initialValue = 1, + }, } for _, statMod in ipairs(addedInfoMods) do - local name = ("ADD_%s_MOD_%s"):format(statMod.add, statMod.mod) - statMod.initialValue = 0 - statMod.finalAdjust = 0 + local name = "" + if statMod.add then + name = ("ADD_%s_"):format(statMod.add) + end + name = name .. ("MOD_%s"):format(statMod.mod) + if not statMod.initialValue then + statMod.initialValue = 0 + end + if not statMod.finalAdjust then + statMod.finalAdjust = 0 + end StatLogic.StatModInfo[name] = statMod end diff --git a/locales/deDE.lua b/locales/deDE.lua index 1ea690b..1a046f3 100644 --- a/locales/deDE.lua +++ b/locales/deDE.lua @@ -380,6 +380,7 @@ L["statList"] = { -- "%2$s $1$s" -> "Crit +1.34%" L["StatBreakdownOrder"] = "%s %s" L["Show %s"] = SHOW.." %s" +L["Show Modified %s"] = "Show Modified %s" -- for hit rating showing both physical and spell conversions -- (+1.21%, S+0.98%) -- (+1.21%, +0.98% S) diff --git a/locales/enUS.lua b/locales/enUS.lua index 2885ad3..f21bf50 100644 --- a/locales/enUS.lua +++ b/locales/enUS.lua @@ -406,6 +406,7 @@ L["statList"] = { -- "%2$s $1$s" -> "Crit +1.34%" L["StatBreakdownOrder"] = "%s %s" L["Show %s"] = SHOW.." %s" +L["Show Modified %s"] = "Show Modified %s" -- for hit rating showing both physical and spell conversions -- (+1.21%, S+0.98%) -- (+1.21%, +0.98% S) diff --git a/locales/esES.lua b/locales/esES.lua index 8be9dc4..b049d4e 100644 --- a/locales/esES.lua +++ b/locales/esES.lua @@ -381,6 +381,7 @@ L["statList"] = { -- "%2$s $1$s" -> "Crit +1.34%" L["StatBreakdownOrder"] = "%s %s" L["Show %s"] = SHOW.." %s" +L["Show Modified %s"] = "Show Modified %s" -- for hit rating showing both physical and spell conversions -- (+1.21%, S+0.98%) -- (+1.21%, +0.98% S) diff --git a/locales/esMX.lua b/locales/esMX.lua index 1241425..4465065 100644 --- a/locales/esMX.lua +++ b/locales/esMX.lua @@ -383,6 +383,7 @@ L["statList"] = { -- "%2$s $1$s" -> "Crit +1.34%" L["StatBreakdownOrder"] = "%s %s" L["Show %s"] = SHOW.." %s" +L["Show Modified %s"] = "Show Modified %s" -- for hit rating showing both physical and spell conversions -- (+1.21%, S+0.98%) -- (+1.21%, +0.98% S) diff --git a/locales/frFR.lua b/locales/frFR.lua index 80cf6e4..39cf932 100644 --- a/locales/frFR.lua +++ b/locales/frFR.lua @@ -401,6 +401,7 @@ L["statList"] = { -- "%2$s $1$s" -> "Crit +1.34%" L["StatBreakdownOrder"] = "%s %s" L["Show %s"] = "%s" +L["Show Modified %s"] = "Show Modified %s" -- for hit rating showing both physical and spell conversions -- (+1.21%, S+0.98%) -- (+1.21%, +0.98% S) diff --git a/locales/itIT.lua b/locales/itIT.lua index 45a856e..5135a91 100644 --- a/locales/itIT.lua +++ b/locales/itIT.lua @@ -386,6 +386,7 @@ L["statList"] = { -- "%2$s $1$s" -> "Crit +1.34%" L["StatBreakdownOrder"] = "%s %s" L["Show %s"] = SHOW.." %s" +L["Show Modified %s"] = "Show Modified %s" -- for hit rating showing both physical and spell conversions -- (+1.21%, S+0.98%) -- (+1.21%, +0.98% S) diff --git a/locales/koKR.lua b/locales/koKR.lua index 1e19caf..83836d4 100644 --- a/locales/koKR.lua +++ b/locales/koKR.lua @@ -380,6 +380,7 @@ L["statList"] = { -- "%2$s $1$s" -> "Crit +1.34%" L["StatBreakdownOrder"] = "%s %s" L["Show %s"] = "%s "..SHOW +L["Show Modified %s"] = "Show Modified %s" -- for hit rating showing both physical and spell conversions -- (+1.21%, S+0.98%) -- (+1.21%, +0.98% S) diff --git a/locales/ptBR.lua b/locales/ptBR.lua index 53150a0..060c612 100644 --- a/locales/ptBR.lua +++ b/locales/ptBR.lua @@ -384,6 +384,7 @@ L["statList"] = { -- "%2$s $1$s" -> "Crit +1.34%" L["StatBreakdownOrder"] = "%s %s" L["Show %s"] = SHOW.." %s" +L["Show Modified %s"] = "Show Modified %s" -- for hit rating showing both physical and spell conversions -- (+1.21%, S+0.98%) -- (+1.21%, +0.98% S) diff --git a/locales/ruRU.lua b/locales/ruRU.lua index 0bc5766..438af46 100644 --- a/locales/ruRU.lua +++ b/locales/ruRU.lua @@ -476,6 +476,7 @@ L["statList"] = { -- "%2$s $1$s" -> "Crit +1.34%" L["StatBreakdownOrder"] = "%s %s" L["Show %s"] = SHOW.." %s" +L["Show Modified %s"] = "Show Modified %s" -- for hit rating showing both physical and spell conversions -- (+1.21%, S+0.98%) -- (+1.21%, +0.98% S) diff --git a/locales/zhCN.lua b/locales/zhCN.lua index 2861fbb..2ecd563 100644 --- a/locales/zhCN.lua +++ b/locales/zhCN.lua @@ -381,6 +381,7 @@ L["statList"] = { -- "%2$s $1$s" -> "Crit +1.34%" L["StatBreakdownOrder"] = "%s %s" L["Show %s"] = SHOW.." %s" +L["Show Modified %s"] = "Show Modified %s" -- for hit rating showing both physical and spell conversions -- (+1.21%, S+0.98%) -- (+1.21%, +0.98% S) diff --git a/locales/zhTW.lua b/locales/zhTW.lua index 4a23979..ba7ec4e 100644 --- a/locales/zhTW.lua +++ b/locales/zhTW.lua @@ -380,6 +380,7 @@ L["statList"] = { -- "%2$s $1$s" -> "Crit +1.34%" L["StatBreakdownOrder"] = "%s %s" L["Show %s"] = SHOW.." %s" +L["Show Modified %s"] = "Show Modified %s" -- for hit rating showing both physical and spell conversions -- (+1.21%, S+0.98%) -- (+1.21%, +0.98% S)