Epic/mods/maxhp/potions.lua

72 lines
2.7 KiB
Lua
Raw Permalink Normal View History

2020-07-10 17:58:54 -07:00
minetest.register_craftitem('maxhp:lifeforce1', { --Dropped by Zombies, Nether Larva,
2020-07-09 06:24:09 -07:00
_doc_items_longdesc = "Increases max HP by 5 up to 50.",
2020-07-21 06:19:32 -07:00
description = 'Low-tier Life Force\n+5, Max 50',
2020-07-10 17:58:54 -07:00
inventory_image = 'maxhp_lifeforce1.png',
2020-10-07 06:32:00 -07:00
groups = {not_in_creative_inventory=1, vessel=1},
2020-07-09 06:24:09 -07:00
on_use = function(itemstack, user, pointed_thing)
if maxhp.max_hp_change(user, 5, 50) then
itemstack:take_item(1); return itemstack
end
end
})
2020-07-10 17:58:54 -07:00
minetest.register_craftitem('maxhp:lifeforce2', { --Dropped by Oerkki, Dungeon Master
_doc_items_longdesc = "Increases max HP by 5 up to 65.",
2020-07-21 06:19:32 -07:00
description = 'Low-tier Life Force\n+5, Max 65',
2020-07-10 17:58:54 -07:00
inventory_image = 'maxhp_lifeforce2.png',
2020-10-07 06:32:00 -07:00
groups = {not_in_creative_inventory=1, vessel=1},
2020-07-10 17:58:54 -07:00
on_use = function(itemstack, user, pointed_thing)
if maxhp.max_hp_change(user, 5, 65) then
itemstack:take_item(1); return itemstack
end
end
})
minetest.register_craftitem('maxhp:lifeforce3', { --Dropped by big Scorpion
_doc_items_longdesc = "Increases max HP by 5 up to 80.",
2020-07-21 06:19:32 -07:00
description = 'Mid-tier Life Force\n+5, Max 80',
2020-07-10 17:58:54 -07:00
inventory_image = 'maxhp_lifeforce3.png',
2020-10-07 06:32:00 -07:00
groups = {not_in_creative_inventory=1, vessel=1},
2020-07-10 17:58:54 -07:00
on_use = function(itemstack, user, pointed_thing)
if maxhp.max_hp_change(user, 5, 80) then
itemstack:take_item(1); return itemstack
end
end
})
minetest.register_craftitem('maxhp:lifeforce4', { --Cavefreaks
_doc_items_longdesc = "Increases max HP by 5 up to 95.",
2020-07-21 06:19:32 -07:00
description = 'Mid-tier Life Force\n+5, Max 95',
2020-07-10 17:58:54 -07:00
inventory_image = 'maxhp_lifeforce4.png',
2020-10-07 06:32:00 -07:00
groups = {not_in_creative_inventory=1, vessel=1},
2020-07-10 17:58:54 -07:00
on_use = function(itemstack, user, pointed_thing)
if maxhp.max_hp_change(user, 5, 95) then
itemstack:take_item(1); return itemstack
end
end
})
minetest.register_craftitem('maxhp:lifeforce5', { --Nether Larva, Lava Titan
_doc_items_longdesc = "Increases max HP by 5 up to 110.",
2020-07-21 06:19:32 -07:00
description = 'Mid-tier Life Force\n+5, Max 110',
2020-07-10 17:58:54 -07:00
inventory_image = 'maxhp_lifeforce5.png',
2020-10-07 06:32:00 -07:00
groups = {not_in_creative_inventory=1, vessel=1},
2020-07-10 17:58:54 -07:00
on_use = function(itemstack, user, pointed_thing)
if maxhp.max_hp_change(user, 5, 110) then
itemstack:take_item(1); return itemstack
end
end
})
minetest.register_craftitem('maxhp:lifeforce6', { --Viron
_doc_items_longdesc = "Increases max HP by 5 up to 125.",
2020-07-21 06:19:32 -07:00
description = 'Hi-tier Life Force\n+5, Max 125',
2020-07-10 17:58:54 -07:00
inventory_image = 'maxhp_lifeforce6.png',
2020-10-07 06:32:00 -07:00
groups = {not_in_creative_inventory=1, vessel=1},
2020-07-10 17:58:54 -07:00
on_use = function(itemstack, user, pointed_thing)
if maxhp.max_hp_change(user, 5, 125) then
itemstack:take_item(1); return itemstack
end
end
})