morwa.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. mobs:register_mob("nssm:morwa", {
  2. type = "monster",
  3. hp_max = 56,
  4. hp_min = 49,
  5. collisionbox = {-1, -0.1, -1, 1, 3, 1},
  6. visual = "mesh",
  7. mesh = "morwa.x",
  8. textures = {
  9. {"morwa.png"}
  10. },
  11. visual_size = {x = 10, y = 10},
  12. makes_footstep_sound = true,
  13. view_range = 25,
  14. fear_height = 4,
  15. walk_velocity = 0.5,
  16. run_velocity = 4,
  17. sounds = {
  18. random = "morwa",
  19. },
  20. damage = 8,
  21. jump = true,
  22. drops = {
  23. {name = "nssm:life_energy", chance = 1, min = 3, max = 4},
  24. {name = "nssm:wrathful_soul_fragment", chance = 3, min = 1, max = 1},
  25. },
  26. armor = 50,
  27. drawtype = "front",
  28. water_damage = 0,
  29. reach = 4,
  30. rotate = 270,
  31. lava_damage = 0,
  32. fire_damage = 0,
  33. light_damage = 0,
  34. group_attack = true,
  35. attack_animals = true,
  36. knock_back = 1,
  37. blood_texture = "morparticle.png",
  38. stepheight = 1.1,
  39. attack_type = "dogshoot",
  40. dogshoot_switch = true,
  41. arrow = "nssm:morarrow",
  42. shoot_interval = 2,
  43. shoot_offset = 0,
  44. animation = {
  45. speed_normal = 25,
  46. speed_run = 25,
  47. stand_start = 10,
  48. stand_end = 40,
  49. walk_start = 50,
  50. walk_end = 90,
  51. run_start = 100,
  52. run_end = 120,
  53. punch_start = 130,
  54. punch_end = 160,
  55. shoot_start =176,
  56. shoot_end=226,
  57. },
  58. do_custom = function (self)
  59. local pos = self.object:get_pos()
  60. local light = minetest.get_node_light(pos)
  61. --minetest.chat_send_all("Luce: "..light)
  62. if light < 8 then
  63. self.object:remove()
  64. minetest.set_node(pos, {name = "nssm:morwa_statue"})
  65. end
  66. end,
  67. })