cloudpuff.lua 3.2 KB

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