Formula

CommonFun.calcBuff_6320

function CommonFun.calcBuff_6320(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Rate = 10
  local Weapon = srcUser:GetEquipedID(7_WEAPON)
  local RefineLv = srcUser:GetEquipedRefineLv(7_WEAPON)
  local Luk = srcUser:GetProperty("Luk")
  local Dex = srcUser:GetProperty("Dex")
  local effect = 0
  if 10 <= RefineLv then
    effect = math.min(10, (Luk + Dex) / 20)
  end
  if 5 <= RefineLv and RefineLv < 10 then
  elseif 10 <= RefineLv then
    Rate = Rate + 5 + effect
  end
  local pos = 0
  if CommonFun.IsInRate(Rate, srcUser:GetRandom()) then
    pos = 2
    if 5 <= RefineLv and CommonFun.IsInRate(Rate, srcUser:GetRandom()) then
      pos = 208
    end
  end
  return pos
end