Оукей.
Считаем: BV = 3160 * 2 (активный Блок Щитом)
self.Calculation["Shield Slam"] = function( calculation, ActiveAuras, Talents )
local dr = 24.5 * calculation.playerLevel --1960 at level 80
local cap = 39.5 * calculation.playerLevel --3160 at level 80
local bv = calculation.blockValue = 3160 * 2 = 6320
local bonus = 0
if ActiveAuras["Shield Block"] then
local mult = self.MetaGem_BlockBonus + (Talents["Shield Mastery"] or 0) + (ActiveAuras["Glyph of Blocking"] and 0.1 or 0)
mult = 0 + 0.3 + 0.1 = 0.4
bonus = bv / (2 + mult)
bonus = 6320 / (2 + 0.4) = 2633.3
bv = bonus * (1 + mult)
bv = 2633.3 * (1 + 0.4) = 3686.6
--TODO: Improve this?
if Talents["Shield Mastery"] and bv > dr then
yes, bv>dr
bonus = bonus * (1 + math_min(0.13,(bv - dr) * 0.055))
bonus = 2633.3 * (1 + min (0.13, (3686.6 - 1960) * 0.055)) = 2633.3 * (1 + min(0.13,94.967)) = 2975.6.
end
end
if bv > dr then
yes, bv>dr
--At level 80 true bonus is 2072 with 3160 blockvalue. 112 effective block value from 1200 block value.
bv = math_min(cap, bv)
bv = min (3160, 3686.6) = 3160
bv = dr + (bv - dr) * (112/1200)
bv = 1960 + (3160 - 1960) * (112/1200) = 2072
end
calculation.minDam = calculation.minDam + bv + bonus
calculation.minDam = calculation.minDam + 2072 + 2975.6 = calculation.minDam + 5047.6
calculation.maxDam = calculation.maxDam + bv + bonus
calculation.maxDam = calculation.maxDam + 2072 + 2975.6 = calculation.maxDam + 5047.6
calculation.coeff = (bv + bonus) / calculation.blockValue
calculation.coeff = (2072 + 2976.5) / (3160 * 2) = 0.799
calculation.coeffv = calculation.blockValue
calculation.coeffv = 3160 * 2 = 6320
if self:GetSetAmount("T7 - Prot") >= 2 then
calculation.dmgM_Add = calculation.dmgM_Add + 0.1
end
if self:GetSetAmount( "T10 - Prot" ) >= 2 then
calculation.dmgM_Add = calculation.dmgM_Add + 0.2
end
end
Так?