Formula

CommonFun.ResetTripleSeasonScore

function CommonFun.ResetTripleSeasonScore(score)
  if score == nil then
    return 0
  end
  local A = 0
  local resetscore1 = math.min((score - 500) * 0.3, 150)
  local resetscore2 = math.min((score - 1000) * 0.2, 200)
  local resetscore3 = math.min((score - 2000) * 0.1, 100)
  local resetscore4 = math.min((score - 3000) * 0.05, 150)
  A = math.max(resetscore1, 0) + math.max(resetscore2, 0) + math.max(resetscore3, 0) + math.max(resetscore4, 0)
  return A
end