From 8a39fb7ee60587e5b6f9c2252df151bff4a7b6be Mon Sep 17 00:00:00 2001 From: Casey Raethke Date: Sat, 7 Sep 2024 19:41:52 -0500 Subject: [PATCH] Add SoD Tier 2 set bonuses --- RatingBuster.lua | 61 +++++++++++++++++++++++++------- libs/StatLogic/StatLogic.lua | 4 +++ libs/StatLogic/Vanilla_Logic.lua | 45 ++++++++++++++++++++--- 3 files changed, 92 insertions(+), 18 deletions(-) diff --git a/RatingBuster.lua b/RatingBuster.lua index a6e4eed..56e2f7e 100644 --- a/RatingBuster.lua +++ b/RatingBuster.lua @@ -324,6 +324,14 @@ local options = { args = {}, hidden = true, }, + spell_dmg = { + type = 'group', + name = L[StatLogic.Stats.SpellDamage], + desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.SpellDamage]), + order = 10, + args = {}, + hidden = true, + }, mastery = { type = 'group', name = L[StatLogic.Stats.MasteryRating], @@ -2359,8 +2367,10 @@ do local effect = value * statModContext("ADD_BLOCK_VALUE_MOD_STR") 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) if db.profile.showSpellDmgFromStr then - local effect = value * statModContext("MOD_SPELL_DMG") * statModContext("ADD_SPELL_DMG_MOD_STR") + local effect = spellDamage * statModContext("MOD_SPELL_DMG") infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + effect end if db.profile.showHealingFromStr then @@ -2430,12 +2440,15 @@ do local effect = health * statModContext("MOD_HEALTH") infoTable[StatLogic.Stats.Health] = infoTable[StatLogic.Stats.Health] + effect end + + 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) if db.profile.showSpellDmgFromSta then - local effect = value * statModContext("MOD_SPELL_DMG") * (statModContext("ADD_SPELL_DMG_MOD_STA") - + statModContext("ADD_SPELL_DMG_MOD_PET_STA") * statModContext("MOD_PET_STA") * statModContext("ADD_PET_STA_MOD_STA")) + local effect = spellDamage * statModContext("MOD_SPELL_DMG") infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + effect end - -- "ADD_AP_MOD_STA" -- Hunter: Hunter vs. Wild + if db.profile.showAPFromSta then local effect = value * statModContext("ADD_AP_MOD_STA") * statModContext("MOD_AP") infoTable[StatLogic.Stats.AttackPower] = infoTable[StatLogic.Stats.AttackPower] + effect @@ -2454,14 +2467,18 @@ do if db.profile.showSpellCritFromInt then infoTable[StatLogic.Stats.SpellCrit] = infoTable[StatLogic.Stats.SpellCrit] + spellCrit end + + local spellDamage = value * ( + statModContext("ADD_SPELL_DMG_MOD_INT") + + 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) if db.profile.showSpellDmgFromInt then - local effect = value * statModContext("MOD_SPELL_DMG") * ( - statModContext("ADD_SPELL_DMG_MOD_INT") - + 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") - ) + local effect = spellDamage * statModContext("MOD_SPELL_DMG") infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + effect end + if db.profile.showHealingFromInt then local effect = value * statModContext("MOD_HEALING") * ( statModContext("ADD_HEALING_MOD_INT") @@ -2516,10 +2533,14 @@ do local effect = value * statModContext("ADD_NORMAL_HEALTH_REG_MOD_SPI") * statModContext("MOD_NORMAL_HEALTH_REG") infoTable[StatLogic.Stats.HealthRegenOutOfCombat] = infoTable[StatLogic.Stats.HealthRegenOutOfCombat] + effect end + + local spellDamage = value * statModContext("ADD_SPELL_DMG_MOD_SPI") + self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext) if db.profile.showSpellDmgFromSpi then - local effect = value * statModContext("ADD_SPELL_DMG_MOD_SPI") * statModContext("MOD_SPELL_DMG") + local effect = spellDamage * statModContext("MOD_SPELL_DMG") infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + effect end + if db.profile.showHealingFromSpi then local effect = value * statModContext("ADD_HEALING_MOD_SPI") * statModContext("MOD_HEALING") infoTable[StatLogic.Stats.HealingPower] = infoTable[StatLogic.Stats.HealingPower] + effect @@ -2596,12 +2617,15 @@ do local attackPower = value * statModContext("ADD_AP_MOD_DEFENSE") self:ProcessStat(StatLogic.Stats.AttackPower, attackPower, infoTable, link, color, statModContext) if db.profile.showAPFromDefense then - infoTable[StatLogic.Stats.AttackPower] = infoTable[StatLogic.Stats.AttackPower] + attackPower + 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) if db.profile.showSpellDmgFromDefense then - infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + spellDamage + local effect = spellDamage * statModContext("MOD_SPELL_DMG") + infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + effect end elseif statID == StatLogic.Stats.Armor then local base, bonus = StatLogic:GetArmorDistribution(link, value, color) @@ -2615,14 +2639,24 @@ do -- Attack Power -- ------------------ value = value * statModContext("MOD_AP") + + local spellDamage = value * statModContext("ADD_SPELL_DMG_MOD_AP") + self:ProcessStat(StatLogic.Stats.SpellDamage, spellDamage, infoTable, link, color, statModContext) if db.profile.showSpellDmgFromAP then - local effect = value * statModContext("ADD_SPELL_DMG_MOD_AP") * statModContext("MOD_SPELL_DMG") + local effect = spellDamage * statModContext("MOD_SPELL_DMG") infoTable[StatLogic.Stats.SpellDamage] = infoTable[StatLogic.Stats.SpellDamage] + effect end + if db.profile.showHealingFromAP then 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.SpellDamage then + value = value * statModContext("MOD_SPELL_DMG") + if db.profile.showBlockValueFromSpellDmg then + local effect = value * statModContext("ADD_BLOCK_VALUE_MOD_SPELL_DMG") * statModContext("MOD_BLOCK_VALUE") + infoTable[StatLogic.Stats.BlockValue] = infoTable[StatLogic.Stats.BlockValue] + effect + end end end end @@ -3468,6 +3502,7 @@ local summaryCalcData = { statModContext("MOD_BLOCK_VALUE") * ( sum[StatLogic.Stats.BlockValue] + sum[StatLogic.Stats.Strength] * statModContext("ADD_BLOCK_VALUE_MOD_STR") + + summaryFunc[StatLogic.Stats.SpellDamage](sum, statModContext) * statModContext("ADD_BLOCK_VALUE_MOD_SPELL_DMG") ) ) or 0 end, diff --git a/libs/StatLogic/StatLogic.lua b/libs/StatLogic/StatLogic.lua index db287bd..eee49b9 100644 --- a/libs/StatLogic/StatLogic.lua +++ b/libs/StatLogic/StatLogic.lua @@ -490,6 +490,10 @@ local addedInfoMods = { add = "AP", mod = "STA", }, + { + add = "BLOCK_VALUE", + mod = "SPELL_DMG", + }, { add = "BLOCK_VALUE", mod = "STR", diff --git a/libs/StatLogic/Vanilla_Logic.lua b/libs/StatLogic/Vanilla_Logic.lua index e0f6ec1..e153010 100644 --- a/libs/StatLogic/Vanilla_Logic.lua +++ b/libs/StatLogic/Vanilla_Logic.lua @@ -739,6 +739,12 @@ elseif addon.class == "PRIEST" then ["pieces"] = 3, ["value"] = 0.15, }, + -- Set: Dawn of Transcendence (SoD) + { + ["set"] = 1812, + ["pieces"] = 2, + ["value"] = 0.15, + }, }, -- Priest: Spiritual Guidance (Rank 5) - 2,14 -- Increases spell damage and healing by up to 5%/10%/15%/20%/25% of your total Spirit. @@ -816,7 +822,18 @@ elseif addon.class == "ROGUE" then { ["known"] = 400016, ["rune"] = true, - ["value"] = 0.30, + ["stack"] = 0.06, + ["max_stacks"] = 5, + ["aura"] = 400015, + }, + }, + ["MOD_ARMOR"] = { + -- Set: Bloodfang Battlearmor (Rolling with the Punches) + { + ["known"] = 400016, + ["rune"] = true, + ["stack"] = 0.20, + ["max_stacks"] = 5, ["aura"] = 400015, }, }, @@ -843,6 +860,15 @@ elseif addon.class == "ROGUE" then [Enum.ItemWeaponSubclass.Unarmed] = true, }, }, + -- Set: Madcap's Outfit (SoD) + { + ["set"] = 1829, + ["pieces"] = 3, + ["value"] = 5, + ["weapon"] = { + [Enum.ItemWeaponSubclass.Dagger] = true, + }, + }, }, [StatLogic.Stats.WeaponSkill] = { -- Talent: Mace Specializaiton @@ -913,6 +939,17 @@ elseif addon.class == "SHAMAN" then ["value"] = 0.05, }, }, + ["ADD_BLOCK_VALUE_MOD_SPELL_DMG"] = { + -- Set: Resolve of the Ten Storms (Elemental Shield) (SoD) + { + ["set"] = 1819, + ["pieces"] = 4, + ["stack"] = 0.10, + ["max_stacks"] = 3, + ["aura"] = 467910, + ["rune"] = true, + }, + }, ["MOD_AP"] = { -- Rune: Two-Handed Mastery { @@ -945,8 +982,7 @@ elseif addon.class == "SHAMAN" then }, }, ["MOD_BLOCK_VALUE"] = { - -- Shaman: Shield Specialization 5/5 - 2,2 - -- Increases your chance to block attacks with a shield by 5% and increases the amount blocked by 5%/10%/15%/20%/25%. + -- Talent: Shield Specialization { ["tab"] = 2, ["num"] = 2, @@ -954,8 +990,7 @@ elseif addon.class == "SHAMAN" then 0.05, 0.1, 0.15, 0.2, 0.25, }, }, - -- Shaman: Shield Mastery - Rune - -- You also always gain 10% increased chance to Block and 15% increased Block value. + -- Rune: Shield Mastery { ["known"] = 408524, ["rune"] = true,