potions.lua 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. minetest.register_craftitem('maxhp:lifeforce1', { --Dropped by Zombies, Nether Larva,
  2. _doc_items_longdesc = "Increases max HP by 5 up to 50.",
  3. description = 'Low-tier Life Force\n+5, Max 50',
  4. inventory_image = 'maxhp_lifeforce1.png',
  5. groups = {not_in_creative_inventory=1, vessel=1},
  6. on_use = function(itemstack, user, pointed_thing)
  7. if maxhp.max_hp_change(user, 5, 50) then
  8. itemstack:take_item(1); return itemstack
  9. end
  10. end
  11. })
  12. minetest.register_craftitem('maxhp:lifeforce2', { --Dropped by Oerkki, Dungeon Master
  13. _doc_items_longdesc = "Increases max HP by 5 up to 65.",
  14. description = 'Low-tier Life Force\n+5, Max 65',
  15. inventory_image = 'maxhp_lifeforce2.png',
  16. groups = {not_in_creative_inventory=1, vessel=1},
  17. on_use = function(itemstack, user, pointed_thing)
  18. if maxhp.max_hp_change(user, 5, 65) then
  19. itemstack:take_item(1); return itemstack
  20. end
  21. end
  22. })
  23. minetest.register_craftitem('maxhp:lifeforce3', { --Dropped by big Scorpion
  24. _doc_items_longdesc = "Increases max HP by 5 up to 80.",
  25. description = 'Mid-tier Life Force\n+5, Max 80',
  26. inventory_image = 'maxhp_lifeforce3.png',
  27. groups = {not_in_creative_inventory=1, vessel=1},
  28. on_use = function(itemstack, user, pointed_thing)
  29. if maxhp.max_hp_change(user, 5, 80) then
  30. itemstack:take_item(1); return itemstack
  31. end
  32. end
  33. })
  34. minetest.register_craftitem('maxhp:lifeforce4', { --Cavefreaks
  35. _doc_items_longdesc = "Increases max HP by 5 up to 95.",
  36. description = 'Mid-tier Life Force\n+5, Max 95',
  37. inventory_image = 'maxhp_lifeforce4.png',
  38. groups = {not_in_creative_inventory=1, vessel=1},
  39. on_use = function(itemstack, user, pointed_thing)
  40. if maxhp.max_hp_change(user, 5, 95) then
  41. itemstack:take_item(1); return itemstack
  42. end
  43. end
  44. })
  45. minetest.register_craftitem('maxhp:lifeforce5', { --Nether Larva, Lava Titan
  46. _doc_items_longdesc = "Increases max HP by 5 up to 110.",
  47. description = 'Mid-tier Life Force\n+5, Max 110',
  48. inventory_image = 'maxhp_lifeforce5.png',
  49. groups = {not_in_creative_inventory=1, vessel=1},
  50. on_use = function(itemstack, user, pointed_thing)
  51. if maxhp.max_hp_change(user, 5, 110) then
  52. itemstack:take_item(1); return itemstack
  53. end
  54. end
  55. })
  56. minetest.register_craftitem('maxhp:lifeforce6', { --Viron
  57. _doc_items_longdesc = "Increases max HP by 5 up to 125.",
  58. description = 'Hi-tier Life Force\n+5, Max 125',
  59. inventory_image = 'maxhp_lifeforce6.png',
  60. groups = {not_in_creative_inventory=1, vessel=1},
  61. on_use = function(itemstack, user, pointed_thing)
  62. if maxhp.max_hp_change(user, 5, 125) then
  63. itemstack:take_item(1); return itemstack
  64. end
  65. end
  66. })