savannah.lua 1.8 KB

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