Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1905,6 +1905,12 @@
output[stat] = (output.MainHand[stat] or 0) + (output.OffHand[stat] or 0)
elseif mode == "AVERAGE" then
output[stat] = ((output.MainHand[stat] or 0) + (output.OffHand[stat] or 0)) / 2
elseif mode == 'HARMONICMEAN' then

Check warning on line 1908 in src/Modules/CalcOffence.lua

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (HARMONICMEAN)
if output.MainHand[stat] == 0 or output.OffHand[stat] == 0 then
output[stat] = 0
else
output[stat] = 2 / ((1 / output.MainHand[stat]) + (1 / output.OffHand[stat]))
end
elseif mode == "CHANCE" then
if output.MainHand[stat] and output.OffHand[stat] then
local mainChance = output.MainHand[...] * output.MainHand.HitChance
Expand Down Expand Up @@ -2329,7 +2335,7 @@
-- Combine hit chance and attack speed
combineStat("AccuracyHitChance", "AVERAGE")
combineStat("HitChance", "AVERAGE")
combineStat("Speed", "AVERAGE")
combineStat("Speed", "HARMONICMEAN")

Check warning on line 2338 in src/Modules/CalcOffence.lua

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (HARMONICMEAN)
combineStat("HitSpeed", "OR")
combineStat("HitTime", "OR")
if output.Speed == 0 then
Expand All @@ -2354,7 +2360,7 @@
if breakdown then
breakdown.Speed = {
"Both weapons:",
s_format("(%.2f + %.2f) / 2", output.MainHand.Speed, output.OffHand.Speed),
s_format("2 / (1 / %.2f + 1 / %.2f)", output.MainHand.Speed, output.OffHand.Speed),
s_format("= %.2f", output.Speed),
}
end
Expand Down
Loading