panda.lua 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. local S = mobs.intllib
  2. -- Panda by AspireMint (CC BY-SA 3.0)
  3. mobs:register_mob("mobs_animal:panda", {
  4. stepheight = 0.6,
  5. type = "animal",
  6. passive = false,
  7. attack_type = "dogfight",
  8. group_attack = false,
  9. owner_loyal = true,
  10. attack_npcs = false,
  11. reach = 2,
  12. damage = 3,
  13. damage_chance = 50,
  14. hp_min = 10,
  15. hp_max = 24,
  16. armor = 200,
  17. collisionbox = {-0.4, -0.45, -0.4, 0.4, 0.45, 0.4},
  18. visual = "mesh",
  19. mesh = "mobs_panda.b3d",
  20. textures = {
  21. {"mobs_panda.png"},
  22. },
  23. makes_footstep_sound = true,
  24. sounds = {
  25. random = "mobs_panda",
  26. attack = "mobs_panda",
  27. },
  28. walk_chance = 5,
  29. walk_velocity = 0.5,
  30. run_velocity = 1.5,
  31. jump = false,
  32. jump_height = 6,
  33. follow = {"default:papyrus"},
  34. view_range = 8,
  35. drops = {
  36. {name = "mobs:meat_raw", chance = 1, min = 1, max = 2},
  37. },
  38. water_damage = 1,
  39. lava_damage = 5,
  40. light_damage = 0,
  41. fear_height = 6,
  42. animation = {
  43. speed_normal = 15,
  44. stand_start = 130,
  45. stand_end = 270,
  46. stand1_start = 0,
  47. stand1_end = 0,
  48. stand2_start = 1,
  49. stand2_end = 1,
  50. stand3_start = 2,
  51. stand3_end = 2,
  52. walk_start = 10,
  53. walk_end = 70,
  54. run_start = 10,
  55. run_end = 70,
  56. punch_start = 80,
  57. punch_end = 120,
  58. -- 0 = rest, 1 = hiding (covers eyes), 2 = surprised
  59. },
  60. on_rightclick = function(self, clicker)
  61. if mobs:feed_tame(self, clicker, 20, true, true) then return end
  62. if mobs:protect(self, clicker) then return end
  63. if mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) then return end
  64. end,
  65. })
  66. mobs:spawn({
  67. name = "mobs_animal:panda",
  68. nodes = {"default:dirt_with_rainforest_litter"},
  69. neighbors = {"default:jungletree"},
  70. min_light = 14,
  71. interval = 60,
  72. chance = 8000, -- 15000
  73. min_height = 30,
  74. max_height = 90,
  75. day_toggle = true,
  76. })
  77. mobs:register_egg("mobs_animal:panda", S("Panda"), "wool.png^[multiply:#008000", 1)