CommonFun.calcBuff_508016 mapped buffs · 1 skills
function CommonFun.calcBuff_5080(srcUser, targetUser, a, b, c, d, lv)
if srcUser == nil or targetUser == nil then
return 0
end
local PoisonAtk = srcUser:GetProperty("PoisonAtk")
local PoisonDef2 = targetUser:GetProperty("PoisonDef")
local PoisonDam = 1 + PoisonAtk - PoisonDef2
if PoisonDam <= 0 then
PoisonDam = 0
end
local StateAtk = srcUser:GetProperty("StateAtk")
local StateDef2 = targetUser:GetProperty("StateDef")
local StateDam = (1 + StateAtk) * (1 - StateDef2)
if StateDam <= 0 then
StateDam = 0
end
local GemValue = srcUser:GetGemValue(31002)
local A = 0
if srcUser:HasBuffID(116010) and GemValue ~= 0 then
A = GemValue / 1000 * PoisonDam * StateDam * CommonFun.calcAttrPoisonRate(srcUser, targetUser)
end
if A <= 0 then
return 0
end
return A
endRelated skills