dirt_monster.lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. mobs:spawn({
  53. name = "mobs_monster:dirt_monster",
  54. nodes = {spawn_on},
  55. min_light = 0,
  56. max_light = 7,
  57. chance = 6000,
  58. active_object_count = 2,
  59. min_height = 0,
  60. day_toggle = false,
  61. })
  62. mobs:register_egg("mobs_monster:dirt_monster", S("Dirt Monster"), "default_dirt.png", 1)
  63. mobs:alias_mob("mobs:dirt_monster", "mobs_monster:dirt_monster") -- compatibility