roadrunner.lua 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. local S = minetest.get_translator("animalworld")
  2. mobs:register_mob("animalworld:roadrunner", {
  3. stepheight = 3,
  4. type = "animal",
  5. passive = true,
  6. attack_type = "dogfight",
  7. attack_animals = false,
  8. reach = 2,
  9. damage = 2,
  10. hp_min = 5,
  11. hp_max = 30,
  12. armor = 100,
  13. collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.5, 0.3},
  14. visual = "mesh",
  15. mesh = "Roadrunner.b3d",
  16. visual_size = {x = 1.0, y = 1.0},
  17. textures = {
  18. {"textureroadrunner.png"},
  19. },
  20. sounds = {
  21. random = "animalworld_roadrunner",
  22. },
  23. makes_footstep_sound = true,
  24. walk_velocity = 3,
  25. run_velocity = 5,
  26. fall_speed = -1,
  27. fall_damage = 0,
  28. runaway = true,
  29. runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player", "animalworld:wolf", "animalworld:panda", "animalworld:stingray", "marinaramobs:jellyfish", "marinaramobs:octopus", "livingcavesmobs:biter", "livingcavesmobs:flesheatingbacteria"},
  30. jump = true,
  31. jump_height = 3,
  32. stay_near = {{"livingdesert:date_palm_leaves", "livingdesert:yucca", "default:dry_shrub", "livingdesert:figcactus_trunk", "livingdesert:coldsteppe_grass1", "livingdesert:cactus", "livingdesert:cactus3", "livingdesert:cactus2", "livingdesert:cactus4"}, 5},
  33. drops = {
  34. {name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1},
  35. {name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1},
  36. },
  37. water_damage = 1,
  38. lava_damage = 4,
  39. light_damage = 0,
  40. fear_height = 4,
  41. animation = {
  42. speed_normal = 100,
  43. stand_start = 0,
  44. stand_end = 100,
  45. stand1_start = 100,
  46. stand1_end = 200,
  47. walk_start = 220,
  48. walk_end = 320,
  49. fly_start = 340, -- swim animation
  50. fly_end = 420,
  51. jump_start = 450,
  52. jump_end = 550,
  53. die_start = 450,
  54. die_end = 550,
  55. die_speed = 50,
  56. die_loop = false,
  57. die_rotate = true,
  58. },
  59. fly_in = {"air"},
  60. floats = 0,
  61. follow = {
  62. "fishing:bait:worm", "farming:seed_wheat", "farming:seed_rice", "farming:seed_oat", "ethereal:pine_nuts", "ethereal:worm", "fishing:bait:worm", "bees:frame_full", "animalworld:ant", "animalworld:termite", "livingdesert:figcactus_fruit", "animalworld:cockroach"
  63. },
  64. view_range = 7,
  65. on_rightclick = function(self, clicker)
  66. -- feed or tame
  67. if mobs:feed_tame(self, clicker, 4, false, true) then return end
  68. if mobs:protect(self, clicker) then return end
  69. if mobs:capture_mob(self, clicker, 5, 25, 0, false, nil) then return end
  70. end,
  71. })
  72. if not mobs.custom_spawn_animalworld then
  73. mobs:spawn({
  74. name = "animalworld:roadrunner",
  75. nodes = {"default:sand"},
  76. neighbors = {"livingdesert:yucca", "default:dry_shrub", "livingdesert:euphoriba_trunk"},
  77. min_light = 0,
  78. interval = 30,
  79. chance = 1000, -- 15000
  80. active_object_count = 1,
  81. min_height = 0,
  82. max_height = 100,
  83. day_toggle = true,
  84. })
  85. end
  86. mobs:register_egg("animalworld:roadrunner", S("Roadrunner"), "aroadrunner.png")