Skip to content

Commit

Permalink
Add Dodge from SoD Dance of the Wicked
Browse files Browse the repository at this point in the history
  • Loading branch information
raethkcj committed Aug 22, 2024
1 parent e12cf79 commit 62a93d4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 12 deletions.
36 changes: 26 additions & 10 deletions RatingBuster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -298,36 +298,45 @@ local options = {
args = {},
hidden = true,
},
spell_crit = {
type = 'group',
name = L[StatLogic.Stats.SpellCrit],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.SpellCrit]),
width = "full",
order = 9,
args = {},
hidden = true,
},
health = {
type = 'group',
name = L[StatLogic.Stats.Health],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.Health]),
width = "full",
order = 8,
order = 9,
args = {},
hidden = true,
},
ap = {
type = 'group',
name = L[StatLogic.Stats.AttackPower],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.AttackPower]),
order = 9,
order = 10,
args = {},
hidden = true,
},
mastery = {
type = 'group',
name = L[StatLogic.Stats.MasteryRating],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.MasteryRating]),
order = 10,
order = 11,
args = {},
hidden = true,
},
weaponskill = {
type = 'group',
name = L[StatLogic.Stats.WeaponSkill],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.WeaponSkill]),
order = 11,
order = 12,
hidden = true,
--[[
hidden = function()
Expand All @@ -347,31 +356,31 @@ local options = {
type = 'group',
name = L[StatLogic.Stats.ExpertiseRating],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.ExpertiseRating]),
order = 12,
order = 13,
hidden = true,
args = {},
},
defense = {
type = 'group',
name = L[StatLogic.Stats.Defense],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.Defense]),
order = 13,
order = 14,
hidden = true,
args = {},
},
armor = {
type = 'group',
name = L[StatLogic.Stats.Armor],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.Armor]),
order = 14,
order = 15,
args = {},
hidden = true,
},
resilience = {
type = 'group',
name = L[StatLogic.Stats.ResilienceRating],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.ResilienceRating]),
order = 15,
order = 16,
args = {},
hidden = true,
},
Expand Down Expand Up @@ -2437,9 +2446,10 @@ do
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)
if db.profile.showSpellCritFromInt then
local effect = value * statModContext("ADD_SPELL_CRIT_MOD_INT")
infoTable[StatLogic.Stats.SpellCrit] = infoTable[StatLogic.Stats.SpellCrit] + effect
infoTable[StatLogic.Stats.SpellCrit] = infoTable[StatLogic.Stats.SpellCrit] + spellCrit
end
if db.profile.showSpellDmgFromInt then
local effect = value * statModContext("MOD_SPELL_DMG") * (
Expand Down Expand Up @@ -2531,6 +2541,11 @@ do
local effect = value * statModContext("ADD_NORMAL_HEALTH_REG_MOD_HEALTH") * statModContext("MOD_NORMAL_HEALTH_REG")
infoTable[StatLogic.Stats.HealthRegenOutOfCombat] = infoTable[StatLogic.Stats.HealthRegenOutOfCombat] + effect
end
elseif statID == StatLogic.Stats.SpellCrit then
if db.profile.showDodgeFromSpellCrit then
local effect = value * statModContext("ADD_DODGE_MOD_SPELL_CRIT")
infoTable[StatLogic.Stats.Dodge] = infoTable[StatLogic.Stats.Dodge] + effect
end
elseif statID == StatLogic.Stats.Defense then
local blockChance = value * statModContext("ADD_BLOCK_CHANCE_MOD_DEFENSE")
if db.profile.showBlockChanceFromDefense then
Expand Down Expand Up @@ -3347,6 +3362,7 @@ local summaryCalcData = {
+ sum[StatLogic.Stats.DodgeRating] * statModContext("ADD_DODGE_MOD_DODGE_RATING")
+ summaryFunc[StatLogic.Stats.Defense](sum, statModContext) * statModContext("ADD_DODGE_MOD_DEFENSE")
+ sum[StatLogic.Stats.Agility] * statModContext("ADD_DODGE_MOD_AGI")
+ summaryFunc[StatLogic.Stats.SpellCrit](sum, statModContext) * statModContext("ADD_DODGE_MOD_SPELL_CRIT")
end,
ispercent = true,
},
Expand Down
4 changes: 4 additions & 0 deletions libs/StatLogic/StatLogic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,10 @@ local addedInfoMods = {
add = "DODGE",
mod = "AGI",
},
{
add = "DODGE",
mod = "SPELL_CRIT",
},
{
add = "HEALING",
mod = "AGI",
Expand Down
11 changes: 9 additions & 2 deletions libs/StatLogic/Vanilla_Logic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1413,13 +1413,20 @@ elseif addon.class == "WARLOCK" then
["aura"] = 425463,
},
-- Rune: Dance of the Wicked
-- You and your demon pet gain dodge chance equal to your spell critical strike chance.
{
["known"] = 412798,
["rune"] = true,
["aura"] = 412800,
["tooltip"] = true,
-- TODO: ADD_DODGE_MOD_SPELL_CRIT?
}
},
["ADD_DODGE_MOD_SPELL_CRIT"] = {
-- Rune: Dance of the Wicked
{
["known"] = 412798,
["rune"] = true,
["aura"] = 412800,
["value"] = 1,
}
},
-- Warlock: Demonic Pact - Rune
Expand Down

0 comments on commit 62a93d4

Please sign in to comment.