Initial commit
164
brewing_stand.lua
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
--brewing stand and level 2 potions
|
||||||
|
|
||||||
|
-- GENERATED CODE
|
||||||
|
-- Node Box Editor, version 0.8.1 - Glass
|
||||||
|
|
||||||
|
minetest.register_node("witchcraft:brewing_stand", {
|
||||||
|
tiles = {
|
||||||
|
"witchcraft_brewing_stand_top.png",
|
||||||
|
"witchcraft_brewing_stand_top.png",
|
||||||
|
"witchcraft_brewing_stand_side.png",
|
||||||
|
"witchcraft_brewing_stand_side.png",
|
||||||
|
"witchcraft_brewing_stand_side.png",
|
||||||
|
"witchcraft_brewing_stand_side.png"
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
use_texture_alpha = true,
|
||||||
|
paramtype = "light",
|
||||||
|
drop = {
|
||||||
|
items = {
|
||||||
|
{items = {'witchcraft:brewing_stand_unready'}, rarity = 1},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
groups = {cracky=1, oddly_breakable_by_hand=1},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.25, -0.5, -0.25, 0.25, -0.4375, 0.25}, -- NodeBox1
|
||||||
|
{-0.0625, -0.5, -0.0625, 0.0625, 0, 0.0625}, -- NodeBox2
|
||||||
|
{-0.5, 0, -0.125, 0.5, 0.0625, 0.125}, -- NodeBox3
|
||||||
|
{-0.4375, -0.1875, -0.0625, -0.3125, 0.375, 0.0625}, -- NodeBox4
|
||||||
|
{0.3125, -0.1875, -0.0625, 0.4375, 0.375, 0.0625}, -- NodeBox5
|
||||||
|
{-0.125, 0.0625, -0.125, 0.125, 0.125, 0.125}, -- NodeBox6
|
||||||
|
{-0.1875, 0.125, -0.125, 0.1875, 0.375, 0.125}, -- NodeBox7
|
||||||
|
{-0.125, 0.125, -0.1875, 0.125, 0.375, 0.1875}, -- NodeBox8
|
||||||
|
{-0.0625, 0.375, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
on_rightclick = function(pos, node, clicker, item, _)
|
||||||
|
local wield_item = clicker:get_wielded_item():get_name()
|
||||||
|
local new_item = wield_item.."_2"
|
||||||
|
if minetest.get_item_group(wield_item, "potion") ~= 0 then
|
||||||
|
minetest.set_node(pos, {name="witchcraft:brewing_stand_active", param2=node.param2})
|
||||||
|
item:take_item()
|
||||||
|
minetest.after(30, function()
|
||||||
|
minetest.set_node(pos, {name="witchcraft:brewing_stand_unready", param2=node.param2})
|
||||||
|
minetest.add_item(pos, new_item)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("witchcraft:brewing_stand_active", {
|
||||||
|
tiles = {
|
||||||
|
"witchcraft_brewing_stand_top.png",
|
||||||
|
"witchcraft_brewing_stand_top.png",
|
||||||
|
"witchcraft_brewing_stand_side.png",
|
||||||
|
"witchcraft_brewing_stand_side.png",
|
||||||
|
"witchcraft_brewing_stand_side.png",
|
||||||
|
"witchcraft_brewing_stand_side.png"
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
use_texture_alpha = true,
|
||||||
|
paramtype = "light",
|
||||||
|
light_source = 1,
|
||||||
|
drop = {
|
||||||
|
items = {
|
||||||
|
{items = {'witchcraft:brewing_stand_unready'}, rarity = 1},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
groups = {cracky=1, oddly_breakable_by_hand=1},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.25, -0.5, -0.25, 0.25, -0.4375, 0.25}, -- NodeBox1
|
||||||
|
{-0.0625, -0.5, -0.0625, 0.0625, 0, 0.0625}, -- NodeBox2
|
||||||
|
{-0.5, 0, -0.125, 0.5, 0.0625, 0.125}, -- NodeBox3
|
||||||
|
{-0.4375, -0.1875, -0.0625, -0.3125, 0.375, 0.0625}, -- NodeBox4
|
||||||
|
{0.3125, -0.1875, -0.0625, 0.4375, 0.375, 0.0625}, -- NodeBox5
|
||||||
|
{-0.125, 0.0625, -0.125, 0.125, 0.125, 0.125}, -- NodeBox6
|
||||||
|
{-0.1875, 0.125, -0.125, 0.1875, 0.375, 0.125}, -- NodeBox7
|
||||||
|
{-0.125, 0.125, -0.1875, 0.125, 0.375, 0.1875}, -- NodeBox8
|
||||||
|
{-0.0625, 0.375, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox9
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("witchcraft:brewing_stand_unready", {
|
||||||
|
description = "brewing stand",
|
||||||
|
tiles = {
|
||||||
|
"witchcraft_brewing_stand_top.png^[colorize:black:100",
|
||||||
|
"witchcraft_brewing_stand_top.png^[colorize:black:100",
|
||||||
|
"witchcraft_brewing_stand_side.png^[colorize:black:100",
|
||||||
|
"witchcraft_brewing_stand_side.png^[colorize:black:100",
|
||||||
|
"witchcraft_brewing_stand_side.png^[colorize:black:100",
|
||||||
|
"witchcraft_brewing_stand_side.png^[colorize:black:100"
|
||||||
|
},
|
||||||
|
inventory_image = "witchcraft_brewing_stand_inv.png",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
use_texture_alpha = true,
|
||||||
|
paramtype = "light",
|
||||||
|
light_source = 1,
|
||||||
|
drop = {
|
||||||
|
items = {
|
||||||
|
{items = {'witchcraft:brewing_stand_unready'}, rarity = 1},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
groups = {cracky=1, oddly_breakable_by_hand=1},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.25, -0.5, -0.25, 0.25, -0.4375, 0.25}, -- NodeBox1
|
||||||
|
{-0.0625, -0.5, -0.0625, 0.0625, 0, 0.0625}, -- NodeBox2
|
||||||
|
{-0.5, 0, -0.125, 0.5, 0.0625, 0.125}, -- NodeBox3
|
||||||
|
{-0.4375, -0.1875, -0.0625, -0.3125, 0.375, 0.0625}, -- NodeBox4
|
||||||
|
{0.3125, -0.1875, -0.0625, 0.4375, 0.375, 0.0625}, -- NodeBox5
|
||||||
|
{-0.125, 0.0625, -0.125, 0.125, 0.125, 0.125}, -- NodeBox6
|
||||||
|
{-0.1875, 0.125, -0.125, 0.1875, 0.375, 0.125}, -- NodeBox7
|
||||||
|
{-0.125, 0.125, -0.1875, 0.125, 0.375, 0.1875}, -- NodeBox8
|
||||||
|
{-0.0625, 0.375, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
on_rightclick = function(pos, node, clicker, item, _)
|
||||||
|
local wield_item = clicker:get_wielded_item():get_name()
|
||||||
|
if wield_item == "default:mese_crystal_fragment" then
|
||||||
|
minetest.set_node(pos, {name="witchcraft:brewing_stand", param2=node.param2})
|
||||||
|
item:take_item()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
--end of GENERATED CODE
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"witchcraft:brewing_stand_active"},
|
||||||
|
interval = 0.5,
|
||||||
|
chance = 1,
|
||||||
|
action = function(pos, node)
|
||||||
|
minetest.add_particlespawner({
|
||||||
|
amount = 2,
|
||||||
|
time = 1,
|
||||||
|
minpos = {x=pos.x-0.1, y=pos.y, z=pos.z-0.1},
|
||||||
|
maxpos = {x=pos.x+0.1, y=pos.y, z=pos.z+0.1},
|
||||||
|
minvel = {x=0, y=0.5, z=0},
|
||||||
|
maxvel = {x=0, y=0.6, z=0},
|
||||||
|
minacc = {x=0, y=0.2, z=0},
|
||||||
|
maxacc = {x=0, y=0.3, z=0},
|
||||||
|
minexptime = 1,
|
||||||
|
maxexptime = 2,
|
||||||
|
minsize = 0.5,
|
||||||
|
maxsize = 1,
|
||||||
|
collisiondetection = false,
|
||||||
|
texture = "witchcraft_smoke.png"
|
||||||
|
})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'witchcraft:brewing_stand_unready',
|
||||||
|
recipe = {
|
||||||
|
{'', '', ''},
|
||||||
|
{'group:stick', 'default:diamond', 'group:stick'},
|
||||||
|
{'', 'default:obsidian_shard', ''},
|
||||||
|
}
|
||||||
|
})
|
9
depends.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
default
|
||||||
|
vessels
|
||||||
|
tnt
|
||||||
|
fire
|
||||||
|
farming?
|
||||||
|
lightning?
|
||||||
|
pmobs?
|
||||||
|
hud_hunger?
|
||||||
|
moreplants?
|
2467
init_old.lua
Normal file
29
license.txt
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
License for Code
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Copyright (C) 2016 DOOmed <heiselong@gmx.com>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
License for Textures, Models and Sounds
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
CC-BY-SA 3.0 UNPORTED. Created by DOOmed
|
||||||
|
|
||||||
|
All potion bottles derived from
|
||||||
|
vessels_glass_bottle.png (by Authors)
|
||||||
|
|
||||||
|
kilbith (WTFPL)
|
65
readme.txt
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
Witchcraft by D00Med
|
||||||
|
Some notes:
|
||||||
|
>farming_redo is required for the mod even though this is not shown in depends.txt
|
||||||
|
>mobs_redo is optionally required for the mod, but since pmobs requires it, it is assumed that if you have pmobs then you have mobs.
|
||||||
|
>Some potions are dangerous!
|
||||||
|
|
||||||
|
Some crafting recipes:
|
||||||
|
|
||||||
|
herbs(shapeless):
|
||||||
|
weed or groundfungus or bush
|
||||||
|
|
||||||
|
jar of eyes:
|
||||||
|
eye, X, X
|
||||||
|
eye, X. X
|
||||||
|
drinking glass, X, X
|
||||||
|
|
||||||
|
eyes(shapeless):
|
||||||
|
jar of eyes
|
||||||
|
|
||||||
|
magic cooking pot:
|
||||||
|
copper lump, X, copper lump
|
||||||
|
copper lump, X, copper lump
|
||||||
|
X, copper lump, X
|
||||||
|
|
||||||
|
the magic cooking pot cooks its contents without fire, so there is no need to light a fire underneath.
|
||||||
|
|
||||||
|
potion shelf:
|
||||||
|
wood, wood, wood
|
||||||
|
potion, potion, potion
|
||||||
|
wood, wood, wood
|
||||||
|
|
||||||
|
empty scroll:
|
||||||
|
paper, diamond, paper
|
||||||
|
paper, paper, paper
|
||||||
|
|
||||||
|
Need some slime? try scraping it out of an empty cauldron with a drinking glass.
|
||||||
|
|
||||||
|
Potion ingredients(may be slightly inaccurate):
|
||||||
|
>herbs
|
||||||
|
>jar of eyes
|
||||||
|
>diamond
|
||||||
|
>apple
|
||||||
|
>gold lumps
|
||||||
|
>mese crystal fragment
|
||||||
|
>obsidian shard
|
||||||
|
>jar of slime
|
||||||
|
>curlyfruit
|
||||||
|
>mushroom(moreplants)
|
||||||
|
>red mushroom(flowers)
|
||||||
|
>grass
|
||||||
|
>umbrella plant
|
||||||
|
>glass
|
||||||
|
>glass fragments
|
||||||
|
>flint
|
||||||
|
>tnt
|
||||||
|
>copper block
|
||||||
|
>steel block
|
||||||
|
>steel ingot
|
||||||
|
>lilypad
|
||||||
|
>dirt
|
||||||
|
>sand
|
||||||
|
>gravel
|
||||||
|
>bucket of water
|
||||||
|
>bullrush
|
||||||
|
>bones
|
BIN
screenshot.png
Normal file
After Width: | Height: | Size: 95 KiB |
396
scrolls.lua
Normal file
@ -0,0 +1,396 @@
|
|||||||
|
--scrolls
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craftitem("witchcraft:scroll_day", {
|
||||||
|
description = "Scroll of day",
|
||||||
|
inventory_image = "witchcraft_scroll.png^witchcraft_sun_over.png",
|
||||||
|
stack_max = 1,
|
||||||
|
on_use = function(item)
|
||||||
|
minetest.set_timeofday(0.5)
|
||||||
|
item:take_item()
|
||||||
|
return item
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("witchcraft:scroll_night", {
|
||||||
|
description = "Scroll of night",
|
||||||
|
inventory_image = "witchcraft_scroll.png^witchcraft_moon_over.png",
|
||||||
|
stack_max = 1,
|
||||||
|
on_use = function(item)
|
||||||
|
minetest.set_timeofday(0)
|
||||||
|
item:take_item()
|
||||||
|
return item
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
if minetest.get_modpath("pmobs")then
|
||||||
|
minetest.register_craftitem("witchcraft:scroll_wild", {
|
||||||
|
description = "Scroll of Wild",
|
||||||
|
inventory_image = "witchcraft_scroll.png^witchcraft_dark_over.png",
|
||||||
|
stack_max = 1,
|
||||||
|
on_use = function(item, placer)
|
||||||
|
local pos = placer:getpos();
|
||||||
|
minetest.env:add_entity(pos, "pmobs:dog")
|
||||||
|
item:take_item()
|
||||||
|
return item
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_craftitem("witchcraft:scroll_fireball", {
|
||||||
|
description = "Scroll of fireball",
|
||||||
|
inventory_image = "witchcraft_scroll.png^witchcraft_fire_over.png",
|
||||||
|
stack_max = 1,
|
||||||
|
on_use = function(item, placer, pos)
|
||||||
|
local dir = placer:get_look_dir();
|
||||||
|
local playerpos = placer:getpos();
|
||||||
|
local vec = {x=dir.x*7,y=dir.y*7,z=dir.z*7}
|
||||||
|
local obj = minetest.env:add_entity({x=playerpos.x+dir.x*1.5,y=playerpos.y+1.5+dir.y,z=playerpos.z+0+dir.z}, "witchcraft:fireball")
|
||||||
|
obj:setvelocity(vec)
|
||||||
|
|
||||||
|
item:take_item()
|
||||||
|
return item
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
if minetest.get_modpath("lightning") then
|
||||||
|
minetest.register_craftitem("witchcraft:scroll_lightning", {
|
||||||
|
description = "Scroll of lightning",
|
||||||
|
inventory_image = "witchcraft_scroll.png^witchcraft_thunder_over.png",
|
||||||
|
stack_max = 1,
|
||||||
|
on_use = function(item, placer, pos)
|
||||||
|
local playerpos = placer:getpos();
|
||||||
|
local dir = placer:get_look_dir();
|
||||||
|
lightning.strike({x=playerpos.x+dir.x*2,y=playerpos.y+0+dir.y,z=playerpos.z+dir.z*2})
|
||||||
|
item:take_item()
|
||||||
|
return item
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_craftitem("witchcraft:scroll_icicle", {
|
||||||
|
description = "Scroll of icicle",
|
||||||
|
inventory_image = "witchcraft_scroll.png^witchcraft_ice_over.png",
|
||||||
|
stack_max = 1,
|
||||||
|
on_use = function(item, placer, pos)
|
||||||
|
local dir = placer:get_look_dir();
|
||||||
|
local playerpos = placer:getpos();
|
||||||
|
local vec = {x=dir.x*7,y=dir.y*7,z=dir.z*7}
|
||||||
|
local obj = minetest.env:add_entity({x=playerpos.x+dir.x*1.5,y=playerpos.y+1.5+dir.y,z=playerpos.z+0+dir.z}, "witchcraft:ice")
|
||||||
|
local obj2 = minetest.env:add_entity({x=playerpos.x+dir.x*1.5,y=playerpos.y+1.5+dir.y,z=playerpos.z+1+dir.z}, "witchcraft:ice")
|
||||||
|
local obj3 = minetest.env:add_entity({x=playerpos.x+1+dir.x*1.5,y=playerpos.y+1.5+dir.y,z=playerpos.z+0+dir.z}, "witchcraft:ice")
|
||||||
|
obj:setvelocity(vec)
|
||||||
|
obj2:setvelocity(vec)
|
||||||
|
obj3:setvelocity(vec)
|
||||||
|
|
||||||
|
item:take_item()
|
||||||
|
return item
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craftitem("witchcraft:scroll_nature", {
|
||||||
|
description = "Scroll of nature",
|
||||||
|
inventory_image = "witchcraft_scroll.png^witchcraft_leaf_over.png",
|
||||||
|
stack_max = 1,
|
||||||
|
on_use = function(item, placer, pos)
|
||||||
|
local dir = placer:get_look_dir();
|
||||||
|
local playerpos = placer:getpos();
|
||||||
|
local vec = {x=dir.x*6,y=dir.y*6,z=dir.z*6}
|
||||||
|
local obj = minetest.env:add_entity({x=playerpos.x+dir.x*1.5,y=playerpos.y+1.5+dir.y,z=playerpos.z+0+dir.z}, "witchcraft:tree")
|
||||||
|
obj:setvelocity(vec)
|
||||||
|
|
||||||
|
item:take_item()
|
||||||
|
return item
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("witchcraft:scroll", {
|
||||||
|
description = "Blank Scroll",
|
||||||
|
inventory_image = "witchcraft_scroll.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("witchcraft:scroll_recipe", {
|
||||||
|
description = "Recipe Scroll",
|
||||||
|
inventory_image = "witchcraft_scroll.png^witchcraft_writing_over.png",
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
|
||||||
|
local formspec = "size[10,9]"..
|
||||||
|
"background[-0.6,-0.5;11.5,10.4;witchcraft_recipes.png]";
|
||||||
|
|
||||||
|
minetest.show_formspec(user:get_player_name(), "witchcraft:scroll", formspec);
|
||||||
|
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
if minetest.get_modpath("pmobs")then
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'witchcraft:scroll_wild',
|
||||||
|
recipe = {
|
||||||
|
{'mobs:meat_raw'},
|
||||||
|
{'witchcraft:scroll'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'witchcraft:scroll',
|
||||||
|
recipe = {
|
||||||
|
{'default:paper', 'default:diamond', 'default:paper'},
|
||||||
|
{'default:paper', 'default:paper', 'default:paper'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'witchcraft:scroll_recipe',
|
||||||
|
recipe = {
|
||||||
|
{'dye:black'},
|
||||||
|
{'witchcraft:scroll'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'witchcraft:scroll_icicle',
|
||||||
|
recipe = {
|
||||||
|
{'default:ice'},
|
||||||
|
{'witchcraft:scroll'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'witchcraft:scroll_fireball',
|
||||||
|
recipe = {
|
||||||
|
{'default:obsidian_shard'},
|
||||||
|
{'witchcraft:scroll'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'witchcraft:scroll_nature',
|
||||||
|
recipe = {
|
||||||
|
{'default:leaves'},
|
||||||
|
{'witchcraft:scroll'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'witchcraft:scroll_day',
|
||||||
|
recipe = {
|
||||||
|
{'default:torch'},
|
||||||
|
{'witchcraft:scroll'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'witchcraft:scroll_night',
|
||||||
|
recipe = {
|
||||||
|
{'default:coal_lump'},
|
||||||
|
{'witchcraft:scroll'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'witchcraft:scroll_lightning',
|
||||||
|
recipe = {
|
||||||
|
{'default:steel_ingot'},
|
||||||
|
{'witchcraft:scroll'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
--scroll powers
|
||||||
|
|
||||||
|
minetest.register_entity("witchcraft:fireball", {
|
||||||
|
textures = {"tnt_boom.png"},
|
||||||
|
velocity = 0.1,
|
||||||
|
damage = 2,
|
||||||
|
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||||
|
on_step = function(self, obj, pos)
|
||||||
|
local remove = minetest.after(2, function()
|
||||||
|
self.object:remove()
|
||||||
|
end)
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)
|
||||||
|
for k, obj in pairs(objs) do
|
||||||
|
if obj:get_luaentity() ~= nil then
|
||||||
|
if obj:get_luaentity().name ~= "witchcraft:fireball" and obj:get_luaentity().name ~= "__builtin:item" then
|
||||||
|
obj:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval=1.0,
|
||||||
|
damage_groups={fleshy=3},
|
||||||
|
}, nil)
|
||||||
|
self.object:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for dx=0,1 do
|
||||||
|
for dy=0,1 do
|
||||||
|
for dz=0,1 do
|
||||||
|
local p = {x=pos.x+dx, y=pos.y, z=pos.z+dz}
|
||||||
|
local t = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||||
|
local n = minetest.env:get_node(p).name
|
||||||
|
if n ~= "witchcraft:fireball" and n ~="default:dirt_with_grass" and n ~="default:dirt_with_dry_grass" and n ~="default:stone" then
|
||||||
|
if minetest.registered_nodes[n].groups.flammable --[[or math.random(1, 100) <= 1]] then
|
||||||
|
minetest.env:set_node(t, {name="fire:basic_flame"})
|
||||||
|
self.object:remove()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
hit_node = function(self, pos, node)
|
||||||
|
-- local pos = self.object:getpos()
|
||||||
|
for dx=-4,4 do
|
||||||
|
for dy=-4,4 do
|
||||||
|
for dz=-4,4 do
|
||||||
|
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||||
|
local t = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||||
|
local n = minetest.env:get_node(pos).name
|
||||||
|
if math.random(1, 50) <= 35 then
|
||||||
|
minetest.env:remove_node(p)
|
||||||
|
end
|
||||||
|
if minetest.registered_nodes[n].groups.flammable or math.random(1, 100) <=5 then
|
||||||
|
minetest.env:set_node(t, {name="fire:basic_flame"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local apos = self.object:getpos()
|
||||||
|
local part = minetest.add_particlespawner(
|
||||||
|
6, --amount
|
||||||
|
0.3, --time
|
||||||
|
{x=apos.x-0.3, y=apos.y-0.3, z=apos.z-0.3}, --minpos
|
||||||
|
{x=apos.x+0.3, y=apos.y+0.3, z=apos.z+0.3}, --maxpos
|
||||||
|
{x=-0, y=-0, z=-0}, --minvel
|
||||||
|
{x=0, y=0, z=0}, --maxvel
|
||||||
|
{x=0,y=-0.5,z=0}, --minacc
|
||||||
|
{x=0.5,y=0.5,z=0.5}, --maxacc
|
||||||
|
0.1, --minexptime
|
||||||
|
0.3, --maxexptime
|
||||||
|
1, --minsize
|
||||||
|
2, --maxsize
|
||||||
|
false, --collisiondetection
|
||||||
|
"witchcraft_flame.png" --texture
|
||||||
|
)
|
||||||
|
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_entity("witchcraft:tree", {
|
||||||
|
textures = {"witchcraft_skin.png"},
|
||||||
|
velocity = 1,
|
||||||
|
damage = 2,
|
||||||
|
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||||
|
on_step = function(self, obj, pos)
|
||||||
|
local remove = minetest.after(2, function()
|
||||||
|
self.object:remove()
|
||||||
|
end)
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)
|
||||||
|
for k, obj in pairs(objs) do
|
||||||
|
if obj:get_luaentity() ~= nil then
|
||||||
|
if obj:get_luaentity().name ~= "witchcraft:tree" and obj:get_luaentity().name ~= "__builtin:item" then
|
||||||
|
obj:remove()
|
||||||
|
local treepos = self.object:getpos()
|
||||||
|
default.grow_new_jungle_tree(treepos)
|
||||||
|
self.object:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for dx=0,1 do
|
||||||
|
for dy=0,1 do
|
||||||
|
for dz=0,1 do
|
||||||
|
local p = {x=pos.x+dx, y=pos.y, z=pos.z+dz}
|
||||||
|
local t = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||||
|
local n = minetest.env:get_node(p).name
|
||||||
|
if n ~= "witchcraft:tree" and n ~="air" then
|
||||||
|
local treepos = self.object:getpos()
|
||||||
|
default.grow_new_jungle_tree(treepos)
|
||||||
|
self.object:remove()
|
||||||
|
elseif n == "default:wood" or n =="default:tree" or n =="default:dirt_with_grass" or n =="default:dirt_with_dry_grass" then
|
||||||
|
self.hit_node(self, pos, node)
|
||||||
|
self.object:remove()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
hit_node = function(self, pos, node)
|
||||||
|
local treepos = self.object:getpos()
|
||||||
|
default.grow_new_jungle_tree(treepos)
|
||||||
|
end
|
||||||
|
|
||||||
|
local apos = self.object:getpos()
|
||||||
|
local part = minetest.add_particlespawner(
|
||||||
|
6, --amount
|
||||||
|
0.3, --time
|
||||||
|
{x=apos.x-0.3, y=apos.y-0.3, z=apos.z-0.3}, --minpos
|
||||||
|
{x=apos.x+0.3, y=apos.y+0.3, z=apos.z+0.3}, --maxpos
|
||||||
|
{x=-0, y=-0, z=-0}, --minvel
|
||||||
|
{x=0, y=0, z=0}, --maxvel
|
||||||
|
{x=0,y=-0.5,z=0}, --minacc
|
||||||
|
{x=0.5,y=0.5,z=0.5}, --maxacc
|
||||||
|
0.1, --minexptime
|
||||||
|
0.3, --maxexptime
|
||||||
|
1, --minsize
|
||||||
|
2, --maxsize
|
||||||
|
false, --collisiondetection
|
||||||
|
"witchcraft_leaf_over.png" --texture
|
||||||
|
)
|
||||||
|
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_entity("witchcraft:ice", {
|
||||||
|
visual="sprite",
|
||||||
|
visual_size={x=1,y=1},
|
||||||
|
physical=false,
|
||||||
|
textures={"witchcraft_ice.png"},
|
||||||
|
velocity = 1,
|
||||||
|
rotate = 90,
|
||||||
|
auto_rotate = true,
|
||||||
|
damage = 2,
|
||||||
|
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||||
|
on_step = function(self, obj, pos)
|
||||||
|
local remove = minetest.after(2, function()
|
||||||
|
self.object:remove()
|
||||||
|
end)
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)
|
||||||
|
for k, obj in pairs(objs) do
|
||||||
|
if obj:get_luaentity() ~= nil then
|
||||||
|
if obj:get_luaentity().name ~= "witchcraft:ice" and obj:get_luaentity().name ~= "__builtin:item" then
|
||||||
|
obj:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval=1.0,
|
||||||
|
damage_groups={fleshy=1},
|
||||||
|
}, nil)
|
||||||
|
self.object:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local apos = self.object:getpos()
|
||||||
|
local part = minetest.add_particlespawner(
|
||||||
|
10, --amount
|
||||||
|
0.3, --time
|
||||||
|
{x=apos.x-0.3, y=apos.y-0.3, z=apos.z-0.3}, --minpos
|
||||||
|
{x=apos.x+0.3, y=apos.y+0.3, z=apos.z+0.3}, --maxpos
|
||||||
|
{x=-0, y=-0, z=-0}, --minvel
|
||||||
|
{x=0, y=0, z=0}, --maxvel
|
||||||
|
{x=0,y=-0.5,z=0}, --minacc
|
||||||
|
{x=0.5,y=0.5,z=0.5}, --maxacc
|
||||||
|
0.1, --minexptime
|
||||||
|
0.3, --maxexptime
|
||||||
|
0.2, --minsize
|
||||||
|
0.5, --maxsize
|
||||||
|
false, --collisiondetection
|
||||||
|
"witchcraft_light_over.png" --texture
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
2
sounds/license.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
Pop sound from www.freesfx.co.uk
|
BIN
sounds/pop.ogg
Normal file
BIN
textures/vessels_shelf_overlay.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
textures/witchcraft_brewing_stand_inv.png
Normal file
After Width: | Height: | Size: 228 B |
BIN
textures/witchcraft_brewing_stand_side.png
Normal file
After Width: | Height: | Size: 493 B |
BIN
textures/witchcraft_brewing_stand_top.png
Normal file
After Width: | Height: | Size: 458 B |
BIN
textures/witchcraft_bubble.png
Normal file
After Width: | Height: | Size: 127 B |
BIN
textures/witchcraft_bubbles.png
Normal file
After Width: | Height: | Size: 162 B |
BIN
textures/witchcraft_bubbles_pink.png
Normal file
After Width: | Height: | Size: 167 B |
BIN
textures/witchcraft_dark_over.png
Normal file
After Width: | Height: | Size: 155 B |
BIN
textures/witchcraft_effect.png
Normal file
After Width: | Height: | Size: 79 B |
BIN
textures/witchcraft_fire_over.png
Normal file
After Width: | Height: | Size: 135 B |
BIN
textures/witchcraft_flame.png
Normal file
After Width: | Height: | Size: 133 B |
BIN
textures/witchcraft_herbs.png
Normal file
After Width: | Height: | Size: 258 B |
BIN
textures/witchcraft_ice.png
Normal file
After Width: | Height: | Size: 255 B |
BIN
textures/witchcraft_ice_over.png
Normal file
After Width: | Height: | Size: 137 B |
BIN
textures/witchcraft_jar_eyes.png
Normal file
After Width: | Height: | Size: 401 B |
BIN
textures/witchcraft_jar_slime.png
Normal file
After Width: | Height: | Size: 338 B |
BIN
textures/witchcraft_leaf_over.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
textures/witchcraft_light_over.png
Normal file
After Width: | Height: | Size: 120 B |
BIN
textures/witchcraft_moon_over.png
Normal file
After Width: | Height: | Size: 157 B |
BIN
textures/witchcraft_pot_aqua.png
Normal file
After Width: | Height: | Size: 679 B |
BIN
textures/witchcraft_pot_blue.png
Normal file
After Width: | Height: | Size: 698 B |
BIN
textures/witchcraft_pot_blue2.png
Normal file
After Width: | Height: | Size: 665 B |
BIN
textures/witchcraft_pot_bottom.png
Normal file
After Width: | Height: | Size: 86 B |
BIN
textures/witchcraft_pot_brown.png
Normal file
After Width: | Height: | Size: 694 B |
BIN
textures/witchcraft_pot_cyan.png
Normal file
After Width: | Height: | Size: 683 B |
BIN
textures/witchcraft_pot_darkpurple.png
Normal file
After Width: | Height: | Size: 667 B |
BIN
textures/witchcraft_pot_gcyan.png
Normal file
After Width: | Height: | Size: 1017 B |
BIN
textures/witchcraft_pot_ggreen.png
Normal file
After Width: | Height: | Size: 961 B |
BIN
textures/witchcraft_pot_gpurple.png
Normal file
After Width: | Height: | Size: 968 B |
BIN
textures/witchcraft_pot_gred.png
Normal file
After Width: | Height: | Size: 981 B |
BIN
textures/witchcraft_pot_green.png
Normal file
After Width: | Height: | Size: 693 B |
BIN
textures/witchcraft_pot_green2.png
Normal file
After Width: | Height: | Size: 698 B |
BIN
textures/witchcraft_pot_grey.png
Normal file
After Width: | Height: | Size: 674 B |
BIN
textures/witchcraft_pot_magenta.png
Normal file
After Width: | Height: | Size: 661 B |
BIN
textures/witchcraft_pot_orange.png
Normal file
After Width: | Height: | Size: 658 B |
BIN
textures/witchcraft_pot_purple.png
Normal file
After Width: | Height: | Size: 657 B |
BIN
textures/witchcraft_pot_red.png
Normal file
After Width: | Height: | Size: 643 B |
BIN
textures/witchcraft_pot_redbrown.png
Normal file
After Width: | Height: | Size: 689 B |
BIN
textures/witchcraft_pot_side.png
Normal file
After Width: | Height: | Size: 285 B |
BIN
textures/witchcraft_pot_top.png
Normal file
After Width: | Height: | Size: 351 B |
BIN
textures/witchcraft_pot_ui.png
Normal file
After Width: | Height: | Size: 437 B |
BIN
textures/witchcraft_pot_yellow.png
Normal file
After Width: | Height: | Size: 665 B |
BIN
textures/witchcraft_pot_yllwgrn.png
Normal file
After Width: | Height: | Size: 679 B |
BIN
textures/witchcraft_potion_aqua.png
Normal file
After Width: | Height: | Size: 388 B |
BIN
textures/witchcraft_potion_blue.png
Normal file
After Width: | Height: | Size: 377 B |
BIN
textures/witchcraft_potion_blue2.png
Normal file
After Width: | Height: | Size: 394 B |
BIN
textures/witchcraft_potion_brown.png
Normal file
After Width: | Height: | Size: 382 B |
BIN
textures/witchcraft_potion_cyan.png
Normal file
After Width: | Height: | Size: 385 B |
BIN
textures/witchcraft_potion_darkpurple.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
textures/witchcraft_potion_gcyan.png
Normal file
After Width: | Height: | Size: 544 B |
BIN
textures/witchcraft_potion_ggreen.png
Normal file
After Width: | Height: | Size: 550 B |
BIN
textures/witchcraft_potion_gpurple.png
Normal file
After Width: | Height: | Size: 546 B |
BIN
textures/witchcraft_potion_gred.png
Normal file
After Width: | Height: | Size: 552 B |
BIN
textures/witchcraft_potion_green.png
Normal file
After Width: | Height: | Size: 392 B |
BIN
textures/witchcraft_potion_green2.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
textures/witchcraft_potion_grey.png
Normal file
After Width: | Height: | Size: 373 B |
BIN
textures/witchcraft_potion_magenta.png
Normal file
After Width: | Height: | Size: 395 B |
BIN
textures/witchcraft_potion_orange.png
Normal file
After Width: | Height: | Size: 395 B |
BIN
textures/witchcraft_potion_purple.png
Normal file
After Width: | Height: | Size: 387 B |
BIN
textures/witchcraft_potion_red.png
Normal file
After Width: | Height: | Size: 375 B |
BIN
textures/witchcraft_potion_redbrown.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
textures/witchcraft_potion_yellgrn.png
Normal file
After Width: | Height: | Size: 393 B |
BIN
textures/witchcraft_potion_yellow.png
Normal file
After Width: | Height: | Size: 398 B |
BIN
textures/witchcraft_recipes.png
Normal file
After Width: | Height: | Size: 215 KiB |
BIN
textures/witchcraft_scroll.png
Normal file
After Width: | Height: | Size: 409 B |
BIN
textures/witchcraft_skin.png
Normal file
After Width: | Height: | Size: 75 B |
BIN
textures/witchcraft_smoke.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
textures/witchcraft_splash_orange.png
Normal file
After Width: | Height: | Size: 393 B |
BIN
textures/witchcraft_splash_yellgrn.png
Normal file
After Width: | Height: | Size: 388 B |
BIN
textures/witchcraft_sun_over.png
Normal file
After Width: | Height: | Size: 307 B |
BIN
textures/witchcraft_symbol.png
Normal file
After Width: | Height: | Size: 88 B |
BIN
textures/witchcraft_thunder_over.png
Normal file
After Width: | Height: | Size: 122 B |
BIN
textures/witchcraft_water_over.png
Normal file
After Width: | Height: | Size: 137 B |
BIN
textures/witchcraft_writing_over.png
Normal file
After Width: | Height: | Size: 96 B |
BIN
textures/witchcraft_zap.png
Normal file
After Width: | Height: | Size: 453 B |