stone_monster.lua 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. local S = mobs.intllib
  2. -- Stone Monster by PilzAdam
  3. mobs:register_mob("mobs_monster:stone_monster", {
  4. type = "monster",
  5. passive = false,
  6. attack_type = "dogfight",
  7. pathfinding = true,
  8. reach = 2,
  9. damage = 3,
  10. hp_min = 12,
  11. hp_max = 35,
  12. armor = 80,
  13. collisionbox = {-0.4, -1, -0.4, 0.4, 0.9, 0.4},
  14. visual = "mesh",
  15. mesh = "mobs_stone_monster.b3d",
  16. textures = {
  17. {"mobs_stone_monster.png"},
  18. {"mobs_stone_monster2.png"}, -- by AMMOnym
  19. },
  20. makes_footstep_sound = true,
  21. sounds = {
  22. random = "mobs_stonemonster",
  23. },
  24. walk_velocity = 1,
  25. run_velocity = 2,
  26. jump_height = 0,
  27. stepheight = 1.1,
  28. floats = 0,
  29. view_range = 10,
  30. drops = {
  31. {name = "default:cobble", chance = 1, min = 0, max = 2},
  32. {name = "default:coal_lump", chance = 3, min = 0, max = 2},
  33. {name = "default:iron_lump", chance = 5, min = 0, max = 2},
  34. },
  35. water_damage = 0,
  36. lava_damage = 1,
  37. light_damage = 0,
  38. animation = {
  39. speed_normal = 15,
  40. speed_run = 15,
  41. stand_start = 0,
  42. stand_end = 14,
  43. walk_start = 15,
  44. walk_end = 38,
  45. run_start = 40,
  46. run_end = 63,
  47. punch_start = 40,
  48. punch_end = 63,
  49. },
  50. immune_to = {
  51. {"default:pick_wood", 0}, -- wooden pick doesnt hurt stone monster
  52. {"default:pick_stone", 4}, -- picks deal more damage to stone monster
  53. {"default:pick_bronze", 5},
  54. {"default:pick_steel", 5},
  55. {"default:pick_mese", 6},
  56. {"default:pick_diamond", 7},
  57. },
  58. })
  59. if not mobs.custom_spawn_monster then
  60. mobs:spawn({
  61. name = "mobs_monster:stone_monster",
  62. nodes = {"default:stone", "default:desert_stone", "default:sandstone"},
  63. max_light = 7,
  64. chance = 7000,
  65. max_height = 0,
  66. })
  67. end
  68. mobs:register_egg("mobs_monster:stone_monster", S("Stone Monster"), "default_stone.png", 1)
  69. mobs:alias_mob("mobs:stone_monster", "mobs_monster:stone_monster") -- compatibility