sandworm.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. mobs:register_mob("nssm:sandworm", {
  2. type = "monster",
  3. hp_max = 40,
  4. hp_min = 25,
  5. collisionbox = {-0.4, -0.2, -0.4, 0.4, 1.90, 0.4},
  6. visual = "mesh",
  7. mesh = "sandworm.x",
  8. textures = {
  9. {"sandworm.png"}
  10. },
  11. visual_size = {x = 4, y = 4},
  12. makes_footstep_sound = false,
  13. view_range = 17,
  14. rotate = 270,
  15. reach = 2,
  16. fear_height = 3,
  17. walk_velocity = 2,
  18. run_velocity = 2,
  19. damage = 6,
  20. sounds = {
  21. random = "sandworm",
  22. distance = 40,
  23. },
  24. jump = false,
  25. drops = {
  26. {name = "nssm:worm_flesh", chance = 2, min = 1, max = 3},
  27. {name = "nssm:sandworm_skin", chance = 2, min = 1, max = 3},
  28. {name = "nssm:life_energy", chance = 1, min = 2, max = 3},
  29. },
  30. armor = 60,
  31. drawtype = "front",
  32. water_damage = 5,
  33. lava_damage = 10,
  34. fire_damage = 10,
  35. light_damage = 0,
  36. group_attack = true,
  37. attack_animals = true,
  38. knock_back = 2,
  39. blood_texture = "nssm_blood_blue.png",
  40. stepheight = 1.1,
  41. attack_type = "dogfight",
  42. animation = {
  43. speed_normal = 25,
  44. speed_run = 40,
  45. stand_start = 1,
  46. stand_end = 100,
  47. walk_start = 110,
  48. walk_end = 140,
  49. run_start = 110,
  50. run_end = 140,
  51. punch_start = 150,
  52. punch_end = 180,
  53. },
  54. do_custom = function(self)
  55. digging_attack(self, "sand", self.run_velocity, {x = 0, y = 3, z = 0})
  56. end,
  57. })