dirt_monster.lua 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. local S = mobs.intllib
  2. -- Dirt Monster by PilzAdam
  3. mobs:register_mob("mobs_monster:dirt_monster", {
  4. type = "monster",
  5. passive = false,
  6. attack_type = "dogfight",
  7. pathfinding = true,
  8. reach = 2,
  9. damage = 2,
  10. hp_min = 3,
  11. hp_max = 27,
  12. armor = 100,
  13. collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
  14. visual = "mesh",
  15. mesh = "mobs_stone_monster.b3d",
  16. textures = {
  17. {"mobs_dirt_monster.png"},
  18. },
  19. blood_texture = "default_dirt.png",
  20. makes_footstep_sound = true,
  21. sounds = {
  22. random = "mobs_dirtmonster",
  23. },
  24. view_range = 15,
  25. walk_velocity = 1,
  26. run_velocity = 3,
  27. jump = true,
  28. drops = {
  29. {name = "commoditymarket:gold_coins", chance = 3, min = 0, max = 10},
  30. {name = "default:dirt", chance = 1, min = 0, max = 2},
  31. },
  32. water_damage = 1,
  33. lava_damage = 5,
  34. light_damage = 3,
  35. fear_height = 4,
  36. animation = {
  37. speed_normal = 15,
  38. speed_run = 15,
  39. stand_start = 0,
  40. stand_end = 14,
  41. walk_start = 15,
  42. walk_end = 38,
  43. run_start = 40,
  44. run_end = 63,
  45. punch_start = 40,
  46. punch_end = 63,
  47. },
  48. immune_to = {
  49. {"default:shovel_wood", 1},
  50. {"default:shovel_stone", 4},
  51. {"default:shovel_bronze", 5},
  52. {"default:shovel_steel", 5},
  53. {"default:shovel_mese", 6},
  54. {"default:shovel_diamond", 7},
  55. {"epic:shovel_titanium", 9},
  56. },
  57. })
  58. local spawn_on = "default:dirt_with_grass"
  59. if minetest.get_modpath("ethereal") then
  60. spawn_on = "ethereal:gray_dirt"
  61. end
  62. mobs:spawn({
  63. name = "mobs_monster:dirt_monster",
  64. nodes = {spawn_on},
  65. min_light = 0,
  66. max_light = 7,
  67. chance = 6000,
  68. active_object_count = 2,
  69. min_height = 0,
  70. max_height = 1900,
  71. day_toggle = false,
  72. })
  73. mobs:register_egg("mobs_monster:dirt_monster", S("Dirt Monster"), "default_dirt.png", 1)
  74. mobs:alias_mob("mobs:dirt_monster", "mobs_monster:dirt_monster") -- compatibility