dungeonmaster.lua 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. -- Dungeon Master by PilzAdam
  2. mobs:register_mob("mobs_flat:dungeon_master", {
  3. type = "monster",
  4. passive = false,
  5. damage = 4,
  6. attack_type = "shoot",
  7. -- dogshoot_switch = 1,
  8. -- dogshoot_count_max = 12, -- shoot for 10 seconds
  9. -- dogshoot_count2_max = 3, -- dogfight for 3 seconds
  10. -- reach = 3,
  11. shoot_interval = 2,
  12. arrow = "mobs_flat:fireball",
  13. shoot_offset = 1,
  14. hp_min = 36,
  15. hp_max = 48,
  16. armor = 50,
  17. knock_back = false,
  18. collisionbox = {-0.7, -1, -0.7, 0.7, 1.6, 0.7},
  19. visual = "upright_sprite",
  20. textures = {
  21. "mobs_flat_dm_front.png",
  22. "mobs_flat_dm_back.png",
  23. },
  24. visual_size = {x=2, y=2},
  25. makes_footstep_sound = true,
  26. sounds = {
  27. random = "mobs_dungeonmaster",
  28. shoot_attack = "mobs_fireball",
  29. },
  30. walk_velocity = 1,
  31. run_velocity = 1,
  32. jump = true,
  33. view_range = 15,
  34. drops = {},
  35. water_damage = 1,
  36. lava_damage = 0,
  37. light_damage = 0,
  38. fear_height = 3,
  39. })
  40. mobs:spawn({
  41. name = "mobs_flat:dungeon_master",
  42. nodes = {"default:cobble", "default:mossycobble"},
  43. neighbors = {"default:mese", "default:stone_with_mese", "default:lava_source", "default:mossycobble"},
  44. chance = 70,
  45. active_object_count = 2,
  46. })
  47. mobs:register_egg("mobs_flat:dungeon_master", "Dungeon Master", "default_lava.png", 1)
  48. -- fireball (weapon)
  49. mobs:register_arrow("mobs_flat:fireball", {
  50. visual = "sprite",
  51. visual_size = {x = 1, y = 1},
  52. textures = {"mobs_flat_fireball.png"},
  53. velocity = 6,
  54. tail = 1,
  55. tail_texture = "mobs_flat_fireball.png",
  56. tail_size = 10,
  57. glow = 8,
  58. expire = 0.1,
  59. -- direct hit, no fire... just plenty of pain
  60. hit_player = function(self, player)
  61. player:punch(self.object, 1.0, {
  62. full_punch_interval = 1.0,
  63. damage_groups = {fleshy = 8},
  64. }, nil)
  65. end,
  66. hit_mob = function(self, player)
  67. player:punch(self.object, 1.0, {
  68. full_punch_interval = 1.0,
  69. damage_groups = {fleshy = 8},
  70. }, nil)
  71. end,
  72. -- node hit
  73. hit_node = function(self, pos, node)
  74. mobs:boom(self, pos, 3)
  75. end
  76. })