Formula

CommonFun.calcBuff_8910

function CommonFun.calcBuff_8910(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Distance = targetUser:GetDisWithLineUser(58)
  if Distance < 1 then
    Distance = 1
  end
  local skilllv_1 = srcUser:GetLernedSkillLevel(2954_MERCHANT:ORDERLESS_SHACKLE)
  local ratio = math.min(Distance * Distance / 100, 1)
  local A = (0.5 + skilllv_1 * 0.1) * ratio
  if skilllv_1 == 0 then
    A = 0
  end
  return -A
end