dirt_monster.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 = "default:dirt", chance = 1, min = 0, max = 2},
  30. },
  31. water_damage = 1,
  32. lava_damage = 5,
  33. light_damage = 3,
  34. fear_height = 4,
  35. animation = {
  36. speed_normal = 15,
  37. speed_run = 15,
  38. stand_start = 0,
  39. stand_end = 14,
  40. walk_start = 15,
  41. walk_end = 38,
  42. run_start = 40,
  43. run_end = 63,
  44. punch_start = 40,
  45. punch_end = 63,
  46. },
  47. })
  48. local spawn_on = "default:dirt_with_grass"
  49. if minetest.get_modpath("ethereal") then
  50. spawn_on = "ethereal:gray_dirt"
  51. end
  52. if not mobs.custom_spawn_monster then
  53. mobs:spawn({
  54. name = "mobs_monster:dirt_monster",
  55. nodes = {spawn_on},
  56. min_light = 0,
  57. max_light = 7,
  58. chance = 6000,
  59. active_object_count = 2,
  60. min_height = 0,
  61. day_toggle = false,
  62. })
  63. end
  64. mobs:register_egg("mobs_monster:dirt_monster", S("Dirt Monster"), "default_dirt.png", 1)
  65. mobs:alias_mob("mobs:dirt_monster", "mobs_monster:dirt_monster") -- compatibility