Skip to content
Snippets Groups Projects
Commit 6514a792 authored by Milan's avatar Milan
Browse files

add health potions

parents
Branches
No related tags found
No related merge requests found
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
# =========================
# Operating System Files
# =========================
# OSX
# =========================
.DS_Store
.AppleDouble
.LSOverride
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
minetest.register_node("magical_potion:medicine_small", {
description = "Small bottle of Medicine",
drawtype = "plantlike",
tiles = {"medicine_bottle_small.png"},
wield_image = "medicine_bottle_small.png",
paramtype = "light",
stack_max = 1,
is_ground_content = false,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "medicine_bottle_small.png",
on_use = function(itemstack, player)
local health = player:get_hp();
player:set_hp(health+5)
if minetest.get_modpath("vessels") then
player:get_inventory():add_item("main", "vessels:glass_bottle")
end
itemstack:take_item(1)
return itemstack
end,
})
minetest.register_node("magical_potion:medicine_big", {
description = "Big bottle of Medicine",
drawtype = "plantlike",
tiles = {"medicine_bottle_big.png"},
wield_image = "medicine_bottle_big.png",
paramtype = "light",
stack_max = 1,
is_ground_content = false,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "medicine_bottle_big.png",
on_use = function(itemstack, player)
local health = player:get_hp();
player:set_hp(health+10)
if minetest.get_modpath("vessels") then
player:get_inventory():add_item("main", "vessels:glass_bottle")
end
itemstack:take_item(1)
return itemstack
end,
})
minetest.register_node("magical_potion:medicine_huge", {
description = "Huge bottle of Medicine",
drawtype = "plantlike",
tiles = {"medicine_bottle_huge.png"},
wield_image = "medicine_bottle_huge.png",
paramtype = "light",
stack_max = 1,
is_ground_content = false,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "medicine_bottle_huge.png",
on_use = function(itemstack, player)
local health = player:get_hp();
player:set_hp(health+20)
itemstack:replace("vessels:glass_bottle")
if minetest.get_modpath("vessels") then
player:get_inventory():add_item("main", "vessels:glass_bottle")
end
itemstack:take_item(1)
return itemstack
end,
})
vessels
player_effect ?
local magical_potion = {}
dofile(minetest.get_modpath("magical_potion").."/bottles.lua")
### Magical Potion
This mod adds magical potions to the game, depending the playereffects mod.
It includes for example temporally fly and more.
Since the potions are meant for donation presents, there are no recipes.
If you like the modidea but prefer craftable stuff, take a look at
the Witchcraft or Jatpack mod for Minetest.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment