sand_monster.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. local S = mobs.intllib
  2. -- Sand Monster by PilzAdam
  3. mobs:register_mob("mobs_monster:sand_monster", {
  4. type = "monster",
  5. passive = false,
  6. attack_type = "dogfight",
  7. pathfinding = true,
  8. --specific_attack = {"player", "mobs_npc:npc"},
  9. reach = 2,
  10. damage = 1,
  11. hp_min = 4,
  12. hp_max = 20,
  13. armor = 100,
  14. collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
  15. visual = "mesh",
  16. mesh = "mobs_sand_monster.b3d",
  17. textures = {
  18. {"mobs_sand_monster.png"},
  19. },
  20. makes_footstep_sound = true,
  21. sounds = {
  22. random = "mobs_sandmonster",
  23. },
  24. walk_velocity = 1.5,
  25. run_velocity = 4,
  26. view_range = 15,
  27. jump = true,
  28. floats = 0,
  29. drops = {
  30. {name = "default:desert_sand", chance = 1, min = 3, max = 5},
  31. },
  32. water_damage = 3,
  33. lava_damage = 4,
  34. light_damage = 0,
  35. fear_height = 4,
  36. animation = {
  37. speed_normal = 15,
  38. speed_run = 15,
  39. stand_start = 0,
  40. stand_end = 39,
  41. walk_start = 41,
  42. walk_end = 72,
  43. run_start = 74,
  44. run_end = 105,
  45. punch_start = 74,
  46. punch_end = 105,
  47. },
  48. --[[
  49. custom_attack = function(self, p)
  50. local pos = self.object:getpos()
  51. minetest.add_item(pos, "default:sand")
  52. end,
  53. ]]
  54. })
  55. mobs:spawn({
  56. name = "mobs_monster:sand_monster",
  57. nodes = {"default:desert_sand"},
  58. chance = 7000,
  59. active_object_count = 2,
  60. min_height = 0,
  61. })
  62. mobs:register_egg("mobs_monster:sand_monster", S("Sand Monster"), "default_desert_sand.png", 1)
  63. mobs:alias_mob("mobs:sand_monster", "mobs_monster:sand_monster") -- compatibility