Formula
CommonFun.calcBuff_5210
function CommonFun.calcBuff_5210(srcUser, targetUser, a, b, c, d, lv)
if srcUser == nil or targetUser == nil then
return 0
end
local skilllv_1 = srcUser:GetLernedSkillLevel(123_KNIGHT:STUN)
local StunAtk = srcUser:GetProperty("StunAtk")
local StunDef2 = targetUser:GetProperty("StunDef")
local StunDam = 1 + StunAtk - StunDef2
if StunDam <= 0 then
StunDam = 0
end
local StateAtk = srcUser:GetProperty("StateAtk")
local StateDef2 = targetUser:GetProperty("StateDef")
local StateDam = 1 + StateAtk - StateDef2
if StateDam <= 0 then
StateDam = 0
end
local A = (skilllv_1 * a + b) * StunDam * StateDam * CommonFun.calcAttrDizzyRate(srcUser, targetUser)
if A <= 0 then
return 0
end
if skilllv_1 <= 0 then
return 0
end
if srcUser:HasBuffID(20410010_WARG_STRIKE_CAN_STUN_:MAX_STACK_0) == false then
return 0
end
return A
end