Fork du mod pmobs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

83 lines
1.8 KiB

  1. -- Wolf by KrupnoPavel
  2. local drop_coin = nil -- NALC : Drop silver coin by chance if maptools mod loaded
  3. if minetest.get_modpath("maptools") then
  4. drop_coin = {
  5. name = "maptools:silver_coin",
  6. chance = 4, min = 1, max = 1,
  7. }
  8. end
  9. mobs:register_mob(
  10. "pmobs:wolf",
  11. {
  12. type = "monster",
  13. docile_by_day = true,
  14. passive = false,
  15. pathfinding = false,
  16. reach = 2,
  17. hp_min = 15,
  18. hp_max = 20,
  19. armor = 200,
  20. passive = false,
  21. collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
  22. visual = "mesh",
  23. mesh = "mobs_wolf.x",
  24. textures = {
  25. {"mobs_wolf.png"},
  26. },
  27. makes_footstep_sound = true,
  28. sounds = {
  29. random = "mobs_wolf",
  30. war_cry = "mobs_wolf_attack",
  31. },
  32. view_range = 7,
  33. walk_velocity = 2,
  34. run_velocity = 3,
  35. stepheight = 1.1,
  36. damage = 3,
  37. attack_type = "dogfight",
  38. drops = {
  39. {
  40. name = "mobs:meat_raw",
  41. chance = 1,
  42. min = 2,
  43. max = 3,
  44. },
  45. drop_coin -- NALC
  46. },
  47. drawtype = "front",
  48. water_damage = 0,
  49. lava_damage = 5,
  50. light_damage = 0,
  51. on_rightclick = function(self, clicker)
  52. local tool = clicker:get_wielded_item():get_name()
  53. if tool == "mobs:meat_raw" or
  54. (minetest.get_modpath("zombie") and tool == "zombie:rotten_flesh") then
  55. clicker:get_inventory():remove_item("main", tool)
  56. minetest.add_entity(self.object:getpos(), "pmobs:dog")
  57. self.object:remove()
  58. end
  59. end,
  60. animation = {
  61. speed_normal = 20,
  62. speed_run = 30,
  63. stand_start = 10,
  64. stand_end = 20,
  65. walk_start = 75,
  66. walk_end = 100,
  67. run_start = 100,
  68. run_end = 130,
  69. punch_start = 135,
  70. punch_end = 155,
  71. },
  72. jump = true,
  73. step = 0.5,
  74. blood_texture = "mobs_blood.png",
  75. })
  76. mobs:register_spawn("pmobs:wolf", {"default:dirt_with_grass","default:dirt","default:snow", "default:snowblock"}, 20, -1, 100000, 1, 31000)
  77. mobs:register_egg("pmobs:wolf", "Wolf", "wool_grey.png", 1)
  78. mobs:alias_mob("mobs:wolf", "pmobs:wolf")