init.lua 2.9 KB

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