Formula
CommonFun.calcBuff_5080
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_USE_VENOM_DART_UNDER_POISONOUS_WEAPON_STATUS_TO_OBTAIN_AN_EXTRA_PERCENTAGE_CHANCE_OF_DEALING_A_NEW_LAYER_OF_VENOM_ON_TARGET)
local A = 0
if srcUser:HasBuffID(116010_POISONOUS_WEAPON_ATTRIBUTE_TURNS_INTO_POISON_:MAX_STACK_0) and GemValue ~= 0 then
A = GemValue / 1000 * PoisonDam * StateDam * CommonFun.calcAttrPoisonRate(srcUser, targetUser)
end
if A <= 0 then
return 0
end
return A
end