Skip to content

Commit

Permalink
Add SoD Just a Flesh Wound dodge modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
raethkcj committed Nov 21, 2024
1 parent 2a3dd6e commit 0be9a57
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
24 changes: 13 additions & 11 deletions RatingBuster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2486,7 +2486,7 @@ do
effect = StatLogic:GetAvoidanceGainAfterDR(StatLogic.Stats.Dodge, processedDodge + effect) - StatLogic:GetAvoidanceGainAfterDR(StatLogic.Stats.Dodge, processedDodge)
processedDodge = processedDodge + effectNoDR
end
infoTable[StatLogic.Stats.Dodge] = infoTable[StatLogic.Stats.Dodge] + effect
infoTable[StatLogic.Stats.Dodge] = infoTable[StatLogic.Stats.Dodge] + effect * statModContext("MOD_DODGE")
end
local bonusArmor = value * statModContext("ADD_BONUS_ARMOR_MOD_AGI")
self:ProcessStat(StatLogic.Stats.BonusArmor, bonusArmor, infoTable, link, color, statModContext, false)
Expand Down Expand Up @@ -2669,7 +2669,7 @@ do
dodge = StatLogic:GetAvoidanceGainAfterDR(StatLogic.Stats.Dodge, processedDodge) - StatLogic:GetAvoidanceGainAfterDR(StatLogic.Stats.Dodge, processedDodge - dodge)
end
if db.profile.showDodgeFromDefense then
infoTable[StatLogic.Stats.Dodge] = infoTable[StatLogic.Stats.Dodge] + dodge
infoTable[StatLogic.Stats.Dodge] = infoTable[StatLogic.Stats.Dodge] + dodge * statModContext("MOD_DODGE")
end
end

Expand Down Expand Up @@ -3484,11 +3484,9 @@ local summaryCalcData = {
option = "sumDodgeBeforeDR",
stat = StatLogic.Stats.DodgeBeforeDR,
func = function(sum, statModContext)
return sum[StatLogic.Stats.Dodge]
+ sum[StatLogic.Stats.DodgeRating] * statModContext("ADD_DODGE_MOD_DODGE_RATING")
return 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,
},
-- Dodge Chance
Expand All @@ -3504,7 +3502,11 @@ local summaryCalcData = {
dodge = StatLogic:GetAvoidanceGainAfterDR(StatLogic.Stats.Dodge, equippedDodge + dodge) - StatLogic:GetAvoidanceGainAfterDR(StatLogic.Stats.Dodge, equippedDodge)
end
end
return dodge
return statModContext("MOD_DODGE") * (
dodge
+ sum[StatLogic.Stats.Dodge]
+ summaryFunc[StatLogic.Stats.SpellCrit](sum, statModContext) * statModContext("ADD_DODGE_MOD_SPELL_CRIT")
)
end,
},
-- Dodge Rating - DODGE_RATING
Expand All @@ -3520,11 +3522,8 @@ local summaryCalcData = {
option = "sumParryBeforeDR",
stat = StatLogic.Stats.ParryBeforeDR,
func = function(sum, statModContext)
return GetParryChance() > 0 and (
sum[StatLogic.Stats.Parry]
+ summaryFunc[StatLogic.Stats.ParryRating](sum, statModContext) * statModContext("ADD_PARRY_MOD_PARRY_RATING")
return summaryFunc[StatLogic.Stats.ParryRating](sum, statModContext) * statModContext("ADD_PARRY_MOD_PARRY_RATING")
+ summaryFunc[StatLogic.Stats.Defense](sum, statModContext) * statModContext("ADD_PARRY_MOD_DEFENSE")
) or 0
end,
},
-- Parry Chance
Expand All @@ -3540,7 +3539,10 @@ local summaryCalcData = {
parry = StatLogic:GetAvoidanceGainAfterDR(StatLogic.Stats.Parry, equippedParry + parry) - StatLogic:GetAvoidanceGainAfterDR(StatLogic.Stats.Parry, equippedParry)
end
end
return parry
return GetParryChance() > 0 and (
parry
+ sum[StatLogic.Stats.Parry]
) or 0
end,
},
-- Parry Rating - PARRY_RATING
Expand Down
4 changes: 4 additions & 0 deletions libs/StatLogic/StatLogic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ StatLogic.StatModInfo = {
initialValue = 0,
finalAdjust = 1,
},
["MOD_DODGE"] = {
initialValue = 1,
finalAdjust = 0,
},
["MOD_FERAL_AP"] = {
initialValue = 0,
finalAdjust = 1,
Expand Down
8 changes: 8 additions & 0 deletions libs/StatLogic/Vanilla_Logic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,14 @@ elseif addon.class == "ROGUE" then
["aura"] = 462230,
}
},
["MOD_DODGE"] = {
-- Rune: Just a Flesh Wound
{
["known"] = 400014,
["rune"] = true,
["value"] = -0.50,
},
},
}
elseif addon.class == "SHAMAN" then
StatLogic.StatModTable["SHAMAN"] = {
Expand Down

0 comments on commit 0be9a57

Please sign in to comment.