ocean_guard.lua 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. mobs:register_mob('epic:ocean_guardian', {
  2. type = 'monster',
  3. passive = false,
  4. attack_type = 'dogfight',
  5. group_attack = true,
  6. reach = 3,
  7. damage = 16,
  8. hp_min = 200,
  9. hp_max = 300,
  10. armor = 20,
  11. view_range = 7,
  12. stepheight = 0.2,
  13. collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  14. visual = 'mesh',
  15. mesh = 'epic_guardians.b3d',
  16. textures = {
  17. {'epic_guardians.png'},
  18. },
  19. visual_size = {x=9, y=9},
  20. walk_velocity = 1,
  21. run_velocity = 3,
  22. fly = true,
  23. stand_chance = 0,
  24. fly_in = 'default:water_source',
  25. stay_near = {'ocean:sea_lantern', 10},
  26. drops = {
  27. {name = 'ocean:prismarine_crystals', chance = 10, min = 0, max = 3,},
  28. {name = 'ocean:prismarine_shard', chance = 10, min = 0, max = 4,},
  29. {name = 'epic:trident', chance = 200, min = 1, max = 1,}
  30. },
  31. immune_to = {{'epic:trident', 20},},
  32. lava_damage = 15,
  33. light_damage = 0,
  34. fall_damage = 0,
  35. fear_height = 5,
  36. animation = {
  37. speed_normal = 15,
  38. speed_fly = 10,
  39. stand_start = 0,
  40. stand_end = 60,
  41. fly_start = 0,
  42. fly_end = 60,
  43. punch_start = 65,
  44. punch_end = 105,
  45. },
  46. do_custom = function(self, dtime)
  47. self.dtime = (self.dtime or 0) + dtime
  48. if self.dtime < 5 then
  49. return
  50. end
  51. if self.standing_in ~= 'default:water_source' then
  52. self.health = self.health - 10
  53. end
  54. self.dtime = 0
  55. end,
  56. })
  57. mobs:spawn({
  58. name = 'epic:ocean_guardian',
  59. nodes = {'default:water_source', 'default:water_flowing'},
  60. neighbors = {'ocean:sea_lantern', 'ocean:prismarine'},
  61. min_height = -50,
  62. max_height = 0,
  63. interval = 10,
  64. chance = 100,
  65. })