dungeon_master.lua 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. local S = mobs.intllib
  2. -- Dungeon Master by PilzAdam
  3. mobs:register_mob("mobs_monster:dungeon_master", {
  4. type = "monster",
  5. passive = false,
  6. damage = 4,
  7. attack_type = "dogshoot",
  8. dogshoot_switch = 1,
  9. dogshoot_count_max = 12, -- shoot for 10 seconds
  10. dogshoot_count2_max = 3, -- dogfight for 3 seconds
  11. reach = 3,
  12. shoot_interval = 2.5,
  13. arrow = "mobs_monster:fireball",
  14. shoot_offset = 1,
  15. hp_min = 12,
  16. hp_max = 35,
  17. armor = 60,
  18. collisionbox = {-0.7, -1, -0.7, 0.7, 1.6, 0.7},
  19. visual = "mesh",
  20. mesh = "mobs_dungeon_master.b3d",
  21. textures = {
  22. {"mobs_dungeon_master.png"},
  23. {"mobs_dungeon_master2.png"},
  24. {"mobs_dungeon_master3.png"},
  25. {"mobs_dungeon_master4.png"},
  26. },
  27. makes_footstep_sound = true,
  28. sounds = {
  29. random = "mobs_dungeonmaster",
  30. shoot_attack = "mobs_fireball",
  31. },
  32. walk_velocity = 1,
  33. run_velocity = 3,
  34. jump = true,
  35. view_range = 15,
  36. drops = {
  37. {name = "default:mese_crystal_fragment", chance = 1, min = 1, max = 3},
  38. {name = "default:diamond", chance = 4, min = 1, max = 1},
  39. {name = "default:mese_crystal", chance = 2, min = 1, max = 2},
  40. {name = "default:diamondblock", chance = 30, min = 1, max = 1},
  41. },
  42. water_damage = 1,
  43. lava_damage = 1,
  44. light_damage = 0,
  45. fear_height = 3,
  46. animation = {
  47. stand_start = 0,
  48. stand_end = 19,
  49. walk_start = 20,
  50. walk_end = 35,
  51. punch_start = 36,
  52. punch_end = 48,
  53. shoot_start = 36,
  54. shoot_end = 48,
  55. speed_normal = 15,
  56. speed_run = 15,
  57. },
  58. })
  59. mobs:spawn({
  60. name = "mobs_monster:dungeon_master",
  61. nodes = {"default:stone"},
  62. max_light = 7,
  63. chance = 7000,
  64. active_object_count = 1,
  65. max_height = -70,
  66. })
  67. mobs:register_egg("mobs_monster:dungeon_master", S("Dungeon Master"), "fire_basic_flame.png", 1, true)
  68. mobs:alias_mob("mobs:dungeon_master", "mobs_monster:dungeon_master") -- compatibility
  69. -- fireball (weapon)
  70. mobs:register_arrow("mobs_monster:fireball", {
  71. visual = "sprite",
  72. visual_size = {x = 1, y = 1},
  73. textures = {"mobs_fireball.png"},
  74. velocity = 6,
  75. tail = 1,
  76. tail_texture = "mobs_fireball.png",
  77. tail_size = 10,
  78. glow = 5,
  79. expire = 0.1,
  80. -- direct hit, no fire... just plenty of pain
  81. hit_player = function(self, player)
  82. player:punch(self.object, 1.0, {
  83. full_punch_interval = 1.0,
  84. damage_groups = {fleshy = 8},
  85. }, nil)
  86. end,
  87. hit_mob = function(self, player)
  88. player:punch(self.object, 1.0, {
  89. full_punch_interval = 1.0,
  90. damage_groups = {fleshy = 8},
  91. }, nil)
  92. end,
  93. -- node hit, bursts into flame
  94. hit_node = function(self, pos, node)
  95. mobs:explosion(pos, 1, 1, 0)
  96. end
  97. })