CommonFun

calcDamage / calcBuff explorer

1 formulas listed.

CommonFun.calcBuff_13314 mapped buffs · 1 skills
function CommonFun.calcBuff_133(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  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 Gem1 = srcUser:GetGemValue(102122)
  local Gem2 = srcUser:GetGemValue(112122)
  local A = (Gem1 / 1000 + Gem2 / 1000) * StunDam * StateDam * CommonFun.calcAttrDizzyRate(srcUser, targetUser)
  if A <= 0 then
    return 0
  end
  return A
end