lava_titan.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. mobs:register_mob("fantasy_mobs:lava_titan", {
  2. type = "monster",
  3. hp_max = 180,
  4. hp_min = 100,
  5. collisionbox = {-0.45, -0.05, -0.45, 0.45, 1.8, 0.45},
  6. visual = "mesh",
  7. mesh = "fantasy_lava_titan.b3d",
  8. textures = {{"fantasy_lava_titan.png"}},
  9. visual_size = {x=2, y=2},
  10. makes_footstep_sound = true,
  11. view_range = 20,
  12. fear_height = 4,
  13. lifetimer = 500,
  14. walk_velocity = 0.5,
  15. run_velocity = 1.3,
  16. sounds = {
  17. random = "lava_titan",
  18. },
  19. damage = 8,
  20. damage_max = 40,
  21. damage_chance = 80,
  22. jump = false,
  23. jump_height=0,
  24. drops = {
  25. {name = "bucket:bucket_lava", chance = 2, min = 1, max = 3,},
  26. {name = "epic:slicer", chance = 3, min = 1, max = 2},
  27. {name = 'maxhp:lifeforce5', chance = 150, min = 0, max = 1},
  28. },
  29. armor = 20,
  30. drawtype = "front",
  31. water_damage = 25,
  32. rotate = 270,
  33. light_damage = 0,
  34. lava_damage = 0,
  35. on_rightclick = nil,
  36. floats = 0,
  37. knock_back=0,
  38. attack_type = "dogshoot",
  39. dogshoot_switch = true,
  40. arrow = "fantasy_mobs:lava_arrow",
  41. shoot_interval = 2,
  42. shoot_offset = 0,
  43. animation = {
  44. speed_normal = 25,
  45. speed_run = 45,
  46. stand_start = 120,
  47. stand_end = 300,
  48. walk_start = 10,
  49. walk_end = 110,
  50. run_start = 10,
  51. run_end = 110,
  52. punch_start = 301,
  53. punch_end = 340,
  54. shoot_start =340,
  55. shoot_end=400,
  56. },
  57. })
  58. mobs:register_arrow("fantasy_mobs:lava_arrow", {
  59. visual = "sprite",
  60. visual_size = {x = 1, y = 1},
  61. textures = {"epic_blank.png"},
  62. velocity = 10,
  63. -- direct hit
  64. hit_player = function(self, player)
  65. local pos = self.object:getpos()
  66. if minetest.is_protected(pos, "") then
  67. return
  68. end
  69. for dy=-1, 6, 1 do
  70. for dx=-1, 1, 2 do
  71. for dz=-1, 1, 2 do
  72. local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
  73. local n = minetest.env:get_node(p).name
  74. if n~="default:lava_flowing" and not minetest.is_protected(p, "") then
  75. minetest.set_node(p, {name="default:lava_flowing"})
  76. end
  77. end
  78. end
  79. end
  80. end,
  81. })
  82. mobs:spawn({
  83. name = 'fantasy_mobs:lava_titan',
  84. nodes = {'nether:lava_crust'},
  85. min_height = -31000,
  86. max_height = -25000,
  87. interval = 31,
  88. chance = 2000,
  89. active_object_count = 5,
  90. })