init.lua 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. if mobs.mod and mobs.mod == "redo" then
  2. local l_water_level = minetest.setting_get("water_level") - 1
  3. -- Normal dolphin
  4. mobs:register_mob("mobs_dolphin:dolphin", {
  5. type = "monster",
  6. passive = false,
  7. attack_type = "dogfight",
  8. pathfinding = true,
  9. reach = 3,
  10. damage = 4,
  11. hp_min = 30,
  12. hp_max = 40,
  13. armor = 150,
  14. collisionbox = {-0.75, -0.5, -0.75, 0.75, 0.5, 0.75},
  15. visual = "mesh",
  16. mesh = "mobs_dolphin.b3d",
  17. textures = {
  18. {"dolphin_blue.png"},
  19. {"dolphin_white.png"}
  20. },
  21. sounds = {
  22. random = "dolphin",
  23. },
  24. drops = {
  25. {name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
  26. },
  27. makes_footstep_sound = false,
  28. walk_velocity = 3,
  29. run_velocity = 4,
  30. fly = true,
  31. fly_in = "default:water_source",
  32. fall_speed = 0,
  33. rotate = 0,
  34. view_range = 10,
  35. water_damage = 0,
  36. lava_damage = 10,
  37. light_damage = 0,
  38. animation = {
  39. speed_normal = 15,
  40. speed_run = 15,
  41. stand_start = 66,
  42. stand_end = 90,
  43. walk_start = 0,
  44. walk_end = 40,
  45. run_start = 40,
  46. run_end = 60,
  47. punch_start = 40,
  48. punch_end = 40,
  49. },
  50. follow = {"ethereal:fish_raw"},
  51. on_rightclick = function(self, clicker)
  52. mobs:capture_mob(self, clicker, 80, 100, 0, true, nil)
  53. end
  54. })
  55. --name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
  56. mobs:spawn_specific("mobs_dolphin:dolphin", {"default:water_source"}, {"default:water_flowing","default:water_source"}, 5, 20, 30, 100000, 2, -100, l_water_level)
  57. mobs:register_egg("mobs_dolphin:dolphin", "Dolphin", "dolphin_inv.png", 0)
  58. -- Robot dolphin
  59. mobs:register_mob("mobs_dolphin:robot_dolphin", {
  60. type = "monster",
  61. passive = false,
  62. attack_type = "dogfight",
  63. pathfinding = true,
  64. reach = 3,
  65. damage = 8,
  66. hp_min = 100,
  67. hp_max = 200,
  68. armor = 300,
  69. collisionbox = {-0.75, -0.5, -0.75, 0.75, 0.5, 0.75},
  70. visual = "mesh",
  71. mesh = "mobs_dolphin.b3d",
  72. textures = {
  73. {"robot_dolphin.png"}
  74. },
  75. sounds = {
  76. random = "robot_dolphin"
  77. },
  78. drops = {
  79. {name = "default:mese_crystal_fragment", chance = 1, min = 1, max = 3}
  80. },
  81. makes_footstep_sound = false,
  82. walk_velocity = 2,
  83. run_velocity = 12,
  84. fly = true,
  85. fly_in = "default:water_source",
  86. fall_speed = 0,
  87. rotate = 0,
  88. view_range = 12,
  89. water_damage = 0,
  90. lava_damage = 0,
  91. light_damage = 0,
  92. animation = {
  93. speed_normal = 15,
  94. speed_run = 15,
  95. stand_start = 66,
  96. stand_end = 90,
  97. walk_start = 0,
  98. walk_end = 40,
  99. run_start = 40,
  100. run_end = 60,
  101. punch_start = 40,
  102. punch_end = 40,
  103. }
  104. })
  105. --name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
  106. mobs:spawn_specific("mobs_dolphin:robot_dolphin", {"default:water_source"}, {"default:water_flowing","default:water_source"}, 0, 15, 30, 10000, 2, -1000, -100)
  107. end