Formula

CommonFun.calcBuff_7430

function CommonFun.calcBuff_7430(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5_ACCESSORY)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5_ACCESSORY)
  local Ring2 = srcUser:GetEquipedID(6_ACCESSORY)
  local RefineLv2 = srcUser:GetEquipedRefineLv(6_ACCESSORY)
  local order1 = srcUser:getEquipLv(5)
  local order2 = srcUser:getEquipLv(6)
  local a = 0
  local b = 0
  local c = 1
  if (Ring1 == 44129____ or Ring1 == 144129____) and 0 <= RefineLv1 and RefineLv1 < 12 then
    a = 0
  elseif (Ring1 == 44129____ or Ring1 == 144129____) and 12 <= RefineLv1 and RefineLv1 < 15 then
    a = 0.03
  elseif (Ring1 == 44129____ or Ring1 == 144129____) and 15 <= RefineLv1 then
    a = 0.08
  end
  if (Ring2 == 44129____ or Ring2 == 144129____) and 0 <= RefineLv2 and RefineLv2 < 12 then
    b = 0
  elseif (Ring2 == 44129____ or Ring2 == 144129____) and 12 <= RefineLv2 and RefineLv2 < 15 then
    b = 0.03
  elseif (Ring2 == 44129____ or Ring2 == 144129____) and 15 <= RefineLv2 then
    b = 0.08
  end
  if (Ring1 == 44129____ or Ring1 == 144129____) and (Ring2 == 44129____ or Ring2 == 144129____) then
    c = 2
  end
  local A = (a + b) / c
  return A
end