Formula

CommonFun.calcRoguelikeNpcAttrValue

function CommonFun.calcRoguelikeNpcAttrValue(attr, Type, classtype, Layer)
  local result = {}
  if Type == 3 then
    result = CommonFun.calcRoguelikeMonsterNpcAttrValue(attr, Type, classtype, Layer)
  elseif Type == 4 then
    result = CommonFun.calcRoguelikeMiniNpcAttrValue(attr, Type, classtype, Layer)
  elseif Type == 5 then
    result = CommonFun.calcRoguelikeMvpNpcAttrValue(attr, Type, classtype, Layer)
  end
  for k, v in pairs(result) do
    result[k] = math.floor(v * 1000) / 1000
  end
  return result
end