progress.lua 422 B

123456789101112131415161718192021222324252627
  1. -- COMES BEFORE DATA.LUA
  2. Types = {}
  3. function doType()
  4. -- -- -- reqlvl, name, rarity
  5. local dirt = {0, "Dirt", 1}
  6. local ston = {0, "Stone", 0.8}
  7. local clay = {0, "Clay", 0.6}
  8. local sand = {0, "Sand", 0.4}
  9. end
  10. function grade(type)
  11. local grade = math.random(100)
  12. if grade < 70 then
  13. g = "common"
  14. elseif grade < 88 then
  15. g = "uncommon"
  16. elseif grade < 98 then
  17. g = "rare"
  18. else
  19. g = "unique"
  20. end
  21. return g
  22. end