Skip to content

Commit

Permalink
Average weapon damage is displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonomit committed May 20, 2022
1 parent 1e4e43e commit eb24041
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions Locale/enUs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,26 +190,32 @@ L["Totem"] = "Totem"
-- ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝


L[#L+1] = {LABEL = "Physical Damage"}
L[#L].COLOR = "WEAP_DAMAGE"
L[#L].MAP = {
{
INPUT = "(%d+) %- (%d+) Damage",
OUTPUT = function(min, max) return ("%d - %d (%d) Damage"):format(min, max, Data:Round((min + max)/2, 0)) end,
},
}
L[#L].CAPTURES = {
"%d+ %- %d+ %(%d+%) Damage",
}

for i, element in pairs(Data:GetElements()) do
L[#L+1] = {LABEL = element .. " Damage"}
L[#L].COLOR = Data:GetElementKey(i) .. "_DAMAGE"
L[#L].MAP = {
{
INPUT = "(%d+) %- (%d+) " .. Data:GetElementPattern(i) .. " Damage$",
OUTPUT = "%d - %d " .. element .. " Damage",
OUTPUT = function(min, max) return ("%d - %d (%d) %s Damage"):format(min, max, Data:Round((min + max)/2, 0), element) end,
},
}
L[#L].CAPTURES = {
"%d+ %- %d+ " .. element .. " Damage",
"%d+ %- %d+ %(%d+%) " .. element .. " Damage",
}
end

L[#L+1] = {LABEL = "Physical Damage"}
L[#L].COLOR = "WEAP_DAMAGE"
L[#L].CAPTURES = {
"%d+ %- %d+ Damage",
}

L[#L+1] = {LABEL = "Damage per Second"}
L[#L].MAP = {
{
Expand All @@ -220,7 +226,7 @@ L[#L].MAP = {
INPUT = "Adds ([%d%.]+) damage per second",
OUTPUT = "+%s DPS",
},
}
}
L[#L].CAPTURES = {
"%(%s+ DPS%)",
}
Expand Down

0 comments on commit eb24041

Please sign in to comment.