Formula

CommonFun.calcBuff_5074

function CommonFun.calcBuff_5074(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Distance = targetUser:getDisSumWithAllLineUser(57)
  if Distance < 1 then
    Distance = 1
  end
  local MaxHp = targetUser:GetProperty("MaxHp")
  local A = MaxHp * (0.01 * math.min(Distance * Distance * 0.4 - 0.8 * Distance + 2, 100))
  return -A
end