warg.lua 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. lottmobs:register_horse("lottmobs:warg_mount", {
  2. description = "Warg",
  3. inventory_image = "lottmobs_warg_inv.png",
  4. }, {
  5. physical = true,
  6. collisionbox = {-1.2, -0.1, -1.2, 1.2, 1.5, 1.2},
  7. visual = "mesh",
  8. stepheight = 1.1,
  9. attach_height = 20,
  10. offset = true,
  11. offset_h = 4,
  12. run = true,
  13. hp = 40,
  14. dps = 8,
  15. aggressive = true,
  16. mesh = "warg_mount.b3d",
  17. textures = {"lottmobs_warg.png"},
  18. animation = {
  19. speed_normal = 10,
  20. stand_start = 135,
  21. stand_end = 280,
  22. walk_start = 80,
  23. walk_end = 130,
  24. punch_start = 350,
  25. punch_end = 390,
  26. },
  27. max_speed = 7,
  28. forward_boost = 2.33,
  29. jump_boost = 7,
  30. })
  31. ----------------
  32. mobs:register_mob("lottmobs:warg", {
  33. type = "npc",
  34. race = "GAMEorc",
  35. hp_min = 25,
  36. hp_max = 40,
  37. collisionbox = {-1.2, -0.1, -1.2, 1.2, 1.5, 1.2},
  38. textures = {
  39. {"lottmobs_warg.png"},
  40. },
  41. visual = "mesh",
  42. mesh = "warg.b3d",
  43. makes_footstep_sound = true,
  44. walk_velocity = 1,
  45. run_velocity = 3,
  46. view_range = 15,
  47. armor = 300,
  48. drops = {
  49. {name = "lottmobs:meat_raw",
  50. chance = 5,
  51. min = 3,
  52. max = 10,},
  53. {name = "lottclothes:felt_grey",
  54. chance = 5,
  55. min = 2,
  56. max = 7,},
  57. },
  58. light_resistant = true,
  59. drawtype = "front",
  60. water_damage = 3,
  61. lava_damage = 1,
  62. light_damage = 0,
  63. damage = 8,
  64. attack_type = "dogfight", --Rather suitable name!
  65. animation = {
  66. speed_normal = 10,
  67. speed_run = 10,
  68. stand_start = 135,
  69. stand_end = 280,
  70. walk_start = 40,
  71. walk_end = 75,
  72. run_start = 80,
  73. run_end = 130,
  74. punch_start = 350,
  75. punch_end = 420,
  76. },
  77. on_rightclick = function(self, clicker)
  78. local item = clicker:get_wielded_item()
  79. if item:get_name() == "bones:skeleton_body" then
  80. minetest.add_entity(self.object:getpos(), "lottmobs:warg_mount")
  81. if not minetest.setting_getbool("creative_mode") then
  82. item:take_item()
  83. clicker:set_wielded_item(item)
  84. end
  85. self.object:remove()
  86. end
  87. end,
  88. do_custom = lottmobs.do_custom_guard,
  89. jump = true,
  90. attacks_monsters = true,
  91. peaceful = true,
  92. group_attack = true,
  93. step = 1,
  94. sounds = {},
  95. })
  96. mobs:register_spawn("lottmobs:warg", {"lottmapgen:mordor_stone"}, 20, -1, 5000, 3, 31000)
  97. mobs:register_spawn("lottmobs:warg", {"default:snowblock"}, 15, -1, 7500, 3, 31000)
  98. mobs:register_spawn("lottmobs:warg", {"lottmapgen:angsnowblock"}, 20, -1, 5000, 5, 31000)