dirt_monster.lua 1.8 KB

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