savannah.lua 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. mobs:register_mob("tmw_slimes:savannah_slime", {
  2. group_attack = true,
  3. type = "monster",
  4. passive = false,
  5. attack_animals = false,
  6. attack_npcs = false,
  7. attack_monsters = false,
  8. attack_type = "dogfight",
  9. reach = 2,
  10. sounds = {random = "steps_in_the_mud_shorter",},
  11. damage = tmw_slimes.strong_dmg,
  12. hp_min = 20,
  13. hp_max = 40,
  14. armor = 180,
  15. collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.4, 0.2},
  16. visual_size = {x = 2, y = 2},
  17. visual = "mesh",
  18. mesh = "slime_land.b3d",
  19. blood_texture = "tmw_slime_goo.png^[colorize:"..tmw_slimes.colors["savannah"],
  20. textures = {
  21. {"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["savannah"],"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["savannah"],"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["savannah"]},
  22. },
  23. makes_footstep_sound = false,
  24. walk_velocity = 0.5,
  25. run_velocity = 1.8,
  26. jump_height = 7,
  27. jump = true,
  28. view_range = 15,
  29. drops = {
  30. {name = "tmw_slimes:savannah_goo", chance = 1, min = 0, max = 2},
  31. },
  32. water_damage = 0,
  33. lava_damage = 8,
  34. light_damage = 0,
  35. animation = {
  36. idle_start = 0,
  37. idle_end = 20,
  38. move_start = 21,
  39. move_end = 41,
  40. fall_start = 42,
  41. fall_end = 62,
  42. jump_start = 63,
  43. jump_end = 83
  44. },
  45. do_custom = function(self)
  46. --tmw_slimes.animate(self)
  47. tmw_slimes.absorb_nearby_items(self)
  48. end,
  49. on_die = function(self, pos)
  50. tmw_slimes.drop_items(self, pos)
  51. end
  52. })
  53. minetest.override_item("tmw_slimes:savannah_goo", {on_use = minetest.item_eat(1)})
  54. if minetest.registered_items["mesecons_materials:glue"] then
  55. minetest.register_craft({
  56. type = "cooking",
  57. output = "mesecons_materials:glue",
  58. recipe = "tmw_slimes:savannah_goo"
  59. })
  60. end
  61. mobs:spawn({
  62. name = "tmw_slimes:savannah_slime",
  63. nodes = {
  64. "default:dirt_with_dry_grass",
  65. "default:dry_dirt_with_dry_grass",
  66. },
  67. min_light = 0,
  68. max_light = 16,
  69. chance = tmw_slimes.uncommon,
  70. active_object_count = tmw_slimes.uncommon_max,
  71. min_height = -31000,
  72. max_height = 31000,
  73. })