cloudpuff.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. -- Green Slimes by TomasJLuis & TenPlus1
  2. -- sounds
  3. local green_sounds = {
  4. damage = 'slimes_damage',
  5. death = 'slimes_death',
  6. jump = 'slimes_jump',
  7. attack = 'slimes_attack',
  8. }
  9. local cloud_textures = {'fantasy_cloud_puff_sides.png', 'fantasy_cloud_puff_sides.png', 'fantasy_cloud_puff_sides.png', 'fantasy_cloud_puff_sides.png', 'fantasy_cloud_puff_front.png', 'fantasy_cloud_puff_sides.png'}
  10. mobs:register_mob('fantasy_mobs:cloudsmall', {
  11. type = 'monster',
  12. hp_min = 1, hp_max = 2,
  13. collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
  14. visual = 'cube',
  15. visual_size = {x = 0.5, y = 0.5},
  16. textures = { cloud_textures },
  17. blood_texture = 'fantasy_cloud_puff_blood.png',
  18. makes_footstep_sound = false,
  19. sounds = green_sounds,
  20. attack_type = 'dogfight',
  21. damage = 4,
  22. passive = false,
  23. walk_velocity = 2,
  24. run_velocity = 2,
  25. walk_chance = 0,
  26. jump_chance = 30,
  27. jump_height = 6,
  28. armor = 100,
  29. view_range = 15,
  30. drops = {
  31. {name = 'epic:float_crystal', chance = 16, min = 0, max = 1},
  32. {name = 'illuminati:cone_off', chance = 100, min = 0, max = 1},
  33. {name = 'illuminati:core_off', chance = 100, min = 0, max = 1},
  34. },
  35. drawtype = 'front',
  36. water_damage = 0,
  37. lava_damage = 10,
  38. light_damage = 0,
  39. })
  40. mobs:register_mob('fantasy_mobs:cloudmedium', {
  41. type = 'monster',
  42. hp_min = 3, hp_max = 4,
  43. collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  44. visual = 'cube',
  45. visual_size = {x = 1, y = 1},
  46. textures = { cloud_textures },
  47. blood_texture = 'fantasy_cloud_puff_blood.png',
  48. makes_footstep_sound = false,
  49. sounds = green_sounds,
  50. attack_type = 'dogfight',
  51. damage = 10,
  52. passive = false,
  53. walk_velocity = 2,
  54. run_velocity = 2,
  55. walk_chance = 0,
  56. jump_chance = 30,
  57. jump_height = 6,
  58. armor = 100,
  59. view_range = 15,
  60. on_die = function(self, pos)
  61. local num = math.random(2, 4)
  62. for i=1,num do
  63. minetest.add_entity({x=pos.x + math.random(-2, 2), y=pos.y + 1, z=pos.z + (math.random(-2, 2))}, 'fantasy_mobs:cloudsmall')
  64. end
  65. end,
  66. drawtype = 'front',
  67. water_damage = 0,
  68. lava_damage = 10,
  69. light_damage = 0,
  70. })
  71. mobs:register_mob('fantasy_mobs:cloudbig', {
  72. type = 'monster',
  73. hp_min = 5, hp_max = 6,
  74. collisionbox = {-1, -1, -1, 1, 1, 1},
  75. visual = 'cube',
  76. visual_size = {x = 2, y = 2},
  77. textures = { cloud_textures },
  78. blood_texture = 'fantasy_cloud_puff_blood.png',
  79. makes_footstep_sound = false,
  80. sounds = green_sounds,
  81. attack_type = 'dogfight',
  82. attacks_monsters = true,
  83. damage = 15,
  84. passive = false,
  85. walk_velocity = 2,
  86. run_velocity = 2,
  87. walk_chance = 0,
  88. jump_chance = 30,
  89. jump_height = 6,
  90. armor = 100,
  91. view_range = 15,
  92. on_die = function(self, pos)
  93. local num = math.random(1, 2)
  94. for i=1,num do
  95. minetest.add_entity({x=pos.x + math.random(-2, 2), y=pos.y + 1, z=pos.z + (math.random(-2, 2))}, 'fantasy_mobs:cloudmedium')
  96. end
  97. end,
  98. drawtype = 'front',
  99. water_damage = 0,
  100. lava_damage = 10,
  101. light_damage = 0,
  102. })
  103. mobs:spawn({
  104. name = 'fantasy_mobs:cloudbig',
  105. nodes = {'default:water_source', 'default:water_flowing'},
  106. min_height = 300,
  107. max_height = 1000,
  108. interval = 60,
  109. chance = 2500,
  110. active_object_count = 4,
  111. })