Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
0d8fa05588 | |||
0115b9f0ba | |||
9ee613bf2f | |||
882af8e149 | |||
fe9df3f1b6 | |||
27cd07358a | |||
0baf0cb53b | |||
b41c525de8 | |||
ceca04813c | |||
ef7533976c | |||
97e501f57a | |||
db7fec5801 | |||
81d7d65bed | |||
4fe76ee709 | |||
6176581e72 | |||
355dcc9e9d | |||
ba05c10b2f | |||
c38186fcd8 | |||
76e14fbc24 | |||
b2a77d9d85 | |||
c241fd3d1b | |||
bd27cf1e92 | |||
b78d27c8da | |||
945bc01568 | |||
a4b2d80610 | |||
d29799083d | |||
793195db93 |
@ -2,8 +2,11 @@ default
|
|||||||
vessels
|
vessels
|
||||||
tnt
|
tnt
|
||||||
fire
|
fire
|
||||||
|
player_physics
|
||||||
|
playereffects
|
||||||
farming?
|
farming?
|
||||||
lightning?
|
lightning?
|
||||||
pmobs?
|
pmobs?
|
||||||
hud_hunger?
|
hud_hunger?
|
||||||
moreplants?
|
moreplants?
|
||||||
|
horror?
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
License for Code
|
License for Code
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
Copyright (C) 2016 DOOmed <heiselong@gmx.com>
|
Copyright (C) 2016 D00Med <heiselong@gmx.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
License for Textures, Models and Sounds
|
License for Textures, Models and Sounds
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
CC-BY-SA 3.0 UNPORTED. Created by DOOmed
|
CC-BY-SA 3.0 UNPORTED. Created by D00Med
|
||||||
|
|
||||||
All potion bottles derived from
|
All potion bottles derived from
|
||||||
vessels_glass_bottle.png (by Authors)
|
vessels_glass_bottle.png (by Authors)
|
||||||
|
19
models/3quarters.obj
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
mtllib 3 4ths.mtl
|
||||||
|
o converted_out
|
||||||
|
v 0.375 -0.25 -0.375
|
||||||
|
v 0.375 -0.25 0.375
|
||||||
|
v 0.375 0.1875 0.375
|
||||||
|
v 0.375 0.1875 -0.375
|
||||||
|
v -0.375 -0.25 -0.375
|
||||||
|
v -0.375 -0.25 0.375
|
||||||
|
v -0.375 0.1875 0.375
|
||||||
|
v -0.375 0.1875 -0.375
|
||||||
|
usemtl none
|
||||||
|
s off
|
||||||
|
g nodebox21
|
||||||
|
f 1 2 3 4
|
||||||
|
f 5 6 7 8
|
||||||
|
f 1 4 8 5
|
||||||
|
f 2 3 7 6
|
||||||
|
f 1 2 6 5
|
||||||
|
f 4 3 7 8
|
19
models/4th.obj
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
mtllib 1 4th.mtl
|
||||||
|
o converted_out
|
||||||
|
v 0.375 -0.25 -0.375
|
||||||
|
v 0.375 -0.25 0.375
|
||||||
|
v 0.375 -0.0625 0.375
|
||||||
|
v 0.375 -0.0625 -0.375
|
||||||
|
v -0.375 -0.25 -0.375
|
||||||
|
v -0.375 -0.25 0.375
|
||||||
|
v -0.375 -0.0625 0.375
|
||||||
|
v -0.375 -0.0625 -0.375
|
||||||
|
usemtl none
|
||||||
|
s off
|
||||||
|
g nodebox21
|
||||||
|
f 1 2 3 4
|
||||||
|
f 5 6 7 8
|
||||||
|
f 1 4 8 5
|
||||||
|
f 2 3 7 6
|
||||||
|
f 1 2 6 5
|
||||||
|
f 4 3 7 8
|
19
models/full.obj
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
mtllib full.mtl
|
||||||
|
o converted_out
|
||||||
|
v 0.375 -0.25 -0.375
|
||||||
|
v 0.375 -0.25 0.375
|
||||||
|
v 0.375 0.375 0.375
|
||||||
|
v 0.375 0.375 -0.375
|
||||||
|
v -0.375 -0.25 -0.375
|
||||||
|
v -0.375 -0.25 0.375
|
||||||
|
v -0.375 0.375 0.375
|
||||||
|
v -0.375 0.375 -0.375
|
||||||
|
usemtl none
|
||||||
|
s off
|
||||||
|
g nodebox21
|
||||||
|
f 1 2 3 4
|
||||||
|
f 5 6 7 8
|
||||||
|
f 1 4 8 5
|
||||||
|
f 2 3 7 6
|
||||||
|
f 1 2 6 5
|
||||||
|
f 4 3 7 8
|
19
models/half.obj
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
mtllib half.mtl
|
||||||
|
o converted_out
|
||||||
|
v 0.375 -0.25 -0.375
|
||||||
|
v 0.375 -0.25 0.375
|
||||||
|
v 0.375 0.0625 0.375
|
||||||
|
v 0.375 0.0625 -0.375
|
||||||
|
v -0.375 -0.25 -0.375
|
||||||
|
v -0.375 -0.25 0.375
|
||||||
|
v -0.375 0.0625 0.375
|
||||||
|
v -0.375 0.0625 -0.375
|
||||||
|
usemtl none
|
||||||
|
s off
|
||||||
|
g nodebox21
|
||||||
|
f 1 2 3 4
|
||||||
|
f 5 6 7 8
|
||||||
|
f 1 4 8 5
|
||||||
|
f 2 3 7 6
|
||||||
|
f 1 2 6 5
|
||||||
|
f 4 3 7 8
|
15
readme.txt
@ -63,3 +63,18 @@ Potion ingredients(may be slightly inaccurate):
|
|||||||
>bucket of water
|
>bucket of water
|
||||||
>bullrush
|
>bullrush
|
||||||
>bones
|
>bones
|
||||||
|
|
||||||
|
About the recipes:
|
||||||
|
|
||||||
|
init.lua contains the pot recipes. For each pot there is a line similar to the one below, in the 'witchraft.pot' table.
|
||||||
|
|
||||||
|
{"blue", "brown", "default:dirt", "blue2", "moreplants:bullrush", "red", "purple"},
|
||||||
|
{"potion name", "result1", "ingredient1", "result2", "ingredient2", "combine potion", "combine result"}
|
||||||
|
|
||||||
|
The first column of the table("blue"), is the color of the current potion pot. In the example, it is the blue pot, so the ingredients and results in the other columns
|
||||||
|
will apply to the blue pot, ie: the blue pot must be rightclicked. It is important that the name of the pot is in the name of it's texture, eg: a blue pot has the texture "witchraft_pot_blue.png"
|
||||||
|
|
||||||
|
The second and fourth columns are the two possible results after adding new ingredients. The last column is the result after combining the current potion with another.
|
||||||
|
|
||||||
|
The third and fifth columns are the ingredients required. The ingredient req. to make the potion in column 2 must be in column 3, and the ingredient req. to make the potion in columns 4 must be in columns 5.
|
||||||
|
The 6th column is the potion that can be combined with the current potion to make a new potion.
|
234
scrolls.lua
@ -1,7 +1,8 @@
|
|||||||
--scrolls
|
--scrolls
|
||||||
|
|
||||||
|
minetest.register_craftitem(
|
||||||
minetest.register_craftitem("witchcraft:scroll_day", {
|
"witchcraft:scroll_day",
|
||||||
|
{
|
||||||
description = "Scroll of day",
|
description = "Scroll of day",
|
||||||
inventory_image = "witchcraft_scroll.png^witchcraft_sun_over.png",
|
inventory_image = "witchcraft_scroll.png^witchcraft_sun_over.png",
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
@ -10,9 +11,11 @@ minetest.register_craftitem("witchcraft:scroll_day", {
|
|||||||
item:take_item()
|
item:take_item()
|
||||||
return item
|
return item
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("witchcraft:scroll_night", {
|
minetest.register_craftitem(
|
||||||
|
"witchcraft:scroll_night",
|
||||||
|
{
|
||||||
description = "Scroll of night",
|
description = "Scroll of night",
|
||||||
inventory_image = "witchcraft_scroll.png^witchcraft_moon_over.png",
|
inventory_image = "witchcraft_scroll.png^witchcraft_moon_over.png",
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
@ -21,40 +24,58 @@ minetest.register_craftitem("witchcraft:scroll_night", {
|
|||||||
item:take_item()
|
item:take_item()
|
||||||
return item
|
return item
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("pmobs")then
|
if minetest.get_modpath("pmobs") then
|
||||||
minetest.register_craftitem("witchcraft:scroll_wild", {
|
minetest.register_craftitem(
|
||||||
|
"witchcraft:scroll_wild",
|
||||||
|
{
|
||||||
description = "Scroll of Wild",
|
description = "Scroll of Wild",
|
||||||
inventory_image = "witchcraft_scroll.png^witchcraft_dark_over.png",
|
inventory_image = "witchcraft_scroll.png^witchcraft_dark_over.png",
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
on_use = function(item, placer)
|
on_use = function(item, placer)
|
||||||
local pos = placer:getpos();
|
local pos = placer:getpos();
|
||||||
minetest.env:add_entity(pos, "pmobs:dog")
|
minetest.add_entity(pos, "pmobs:dog")
|
||||||
item:take_item()
|
item:take_item()
|
||||||
return item
|
return item
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craftitem("witchcraft:scroll_fireball", {
|
minetest.register_craftitem(
|
||||||
|
"witchcraft:scroll_fireball",
|
||||||
|
{
|
||||||
description = "Scroll of fireball",
|
description = "Scroll of fireball",
|
||||||
inventory_image = "witchcraft_scroll.png^witchcraft_fire_over.png",
|
inventory_image = "witchcraft_scroll.png^witchcraft_fire_over.png",
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
on_use = function(item, placer, pos)
|
on_use = function(item, placer, pos)
|
||||||
local dir = placer:get_look_dir();
|
local dir = placer:get_look_dir();
|
||||||
local playerpos = placer:getpos();
|
local playerpos = placer:getpos();
|
||||||
local vec = {x=dir.x*7,y=dir.y*7,z=dir.z*7}
|
local obj = minetest.add_entity(
|
||||||
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")
|
{x=playerpos.x+dir.x*1.5,y=playerpos.y+1.5+dir.y,z=playerpos.z+0+dir.z},
|
||||||
obj:setvelocity(vec)
|
"witchcraft:fireball")
|
||||||
|
local obj2 = minetest.add_entity(
|
||||||
|
{x=playerpos.x+dir.x*1.5,y=playerpos.y+1.5+dir.y,z=playerpos.z+0+dir.z},
|
||||||
|
"witchcraft:fireball")
|
||||||
|
local obj3 = minetest.add_entity(
|
||||||
|
{x=playerpos.x+dir.x*1.5,y=playerpos.y+1.5+dir.y,z=playerpos.z+0+dir.z},
|
||||||
|
"witchcraft:fireball")
|
||||||
|
local obj4 = minetest.add_entity(
|
||||||
|
{x=playerpos.x+dir.x*1.5,y=playerpos.y+1.5+dir.y,z=playerpos.z+0+dir.z},
|
||||||
|
"witchcraft:fireball")
|
||||||
|
obj2:setvelocity({x=dir.x*7+0.5,y=dir.y*7,z=dir.z*7+0.5})
|
||||||
|
obj3:setvelocity({x=dir.x*7-0.5,y=dir.y*7,z=dir.z*7-0.5})
|
||||||
|
obj4:setvelocity({x=dir.x*7,y=dir.y*7-0.5,z=dir.z*7})
|
||||||
|
obj:setvelocity({x=dir.x*7,y=dir.y*7+0.5,z=dir.z*7})
|
||||||
item:take_item()
|
item:take_item()
|
||||||
return item
|
return item
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("lightning") then
|
if minetest.get_modpath("lightning") then
|
||||||
minetest.register_craftitem("witchcraft:scroll_lightning", {
|
minetest.register_craftitem(
|
||||||
|
"witchcraft:scroll_lightning",
|
||||||
|
{
|
||||||
description = "Scroll of lightning",
|
description = "Scroll of lightning",
|
||||||
inventory_image = "witchcraft_scroll.png^witchcraft_thunder_over.png",
|
inventory_image = "witchcraft_scroll.png^witchcraft_thunder_over.png",
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
@ -65,10 +86,12 @@ minetest.register_craftitem("witchcraft:scroll_lightning", {
|
|||||||
item:take_item()
|
item:take_item()
|
||||||
return item
|
return item
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craftitem("witchcraft:scroll_icicle", {
|
minetest.register_craftitem(
|
||||||
|
"witchcraft:scroll_icicle",
|
||||||
|
{
|
||||||
description = "Scroll of icicle",
|
description = "Scroll of icicle",
|
||||||
inventory_image = "witchcraft_scroll.png^witchcraft_ice_over.png",
|
inventory_image = "witchcraft_scroll.png^witchcraft_ice_over.png",
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
@ -76,9 +99,9 @@ minetest.register_craftitem("witchcraft:scroll_icicle", {
|
|||||||
local dir = placer:get_look_dir();
|
local dir = placer:get_look_dir();
|
||||||
local playerpos = placer:getpos();
|
local playerpos = placer:getpos();
|
||||||
local vec = {x=dir.x*7,y=dir.y*7,z=dir.z*7}
|
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 obj = minetest.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 obj2 = minetest.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")
|
local obj3 = minetest.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)
|
obj:setvelocity(vec)
|
||||||
obj2:setvelocity(vec)
|
obj2:setvelocity(vec)
|
||||||
obj3:setvelocity(vec)
|
obj3:setvelocity(vec)
|
||||||
@ -86,10 +109,11 @@ minetest.register_craftitem("witchcraft:scroll_icicle", {
|
|||||||
item:take_item()
|
item:take_item()
|
||||||
return item
|
return item
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem(
|
||||||
minetest.register_craftitem("witchcraft:scroll_nature", {
|
"witchcraft:scroll_nature",
|
||||||
|
{
|
||||||
description = "Scroll of nature",
|
description = "Scroll of nature",
|
||||||
inventory_image = "witchcraft_scroll.png^witchcraft_leaf_over.png",
|
inventory_image = "witchcraft_scroll.png^witchcraft_leaf_over.png",
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
@ -97,126 +121,151 @@ minetest.register_craftitem("witchcraft:scroll_nature", {
|
|||||||
local dir = placer:get_look_dir();
|
local dir = placer:get_look_dir();
|
||||||
local playerpos = placer:getpos();
|
local playerpos = placer:getpos();
|
||||||
local vec = {x=dir.x*6,y=dir.y*6,z=dir.z*6}
|
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")
|
local obj = minetest.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)
|
obj:setvelocity(vec)
|
||||||
|
|
||||||
item:take_item()
|
item:take_item()
|
||||||
return item
|
return item
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("witchcraft:scroll", {
|
minetest.register_craftitem(
|
||||||
|
"witchcraft:scroll",
|
||||||
|
{
|
||||||
description = "Blank Scroll",
|
description = "Blank Scroll",
|
||||||
inventory_image = "witchcraft_scroll.png",
|
inventory_image = "witchcraft_scroll.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("witchcraft:scroll_recipe", {
|
minetest.register_craftitem(
|
||||||
|
"witchcraft:scroll_recipe",
|
||||||
|
{
|
||||||
description = "Recipe Scroll",
|
description = "Recipe Scroll",
|
||||||
inventory_image = "witchcraft_scroll.png^witchcraft_writing_over.png",
|
inventory_image = "witchcraft_scroll.png^witchcraft_writing_over.png",
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
|
||||||
local formspec = "size[10,9]"..
|
local formspec = "size[10,9]"..
|
||||||
"background[-0.6,-0.5;11.5,10.4;witchcraft_recipes.png]";
|
"background[-0.6,-0.5;11.5,10.4;witchcraft_recipes.png]";
|
||||||
|
|
||||||
minetest.show_formspec(user:get_player_name(), "witchcraft:scroll", formspec);
|
minetest.show_formspec(user:get_player_name(), "witchcraft:scroll", formspec);
|
||||||
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("pmobs")then
|
if minetest.get_modpath("pmobs")then
|
||||||
minetest.register_craft({
|
minetest.register_craft(
|
||||||
|
{
|
||||||
output = 'witchcraft:scroll_wild',
|
output = 'witchcraft:scroll_wild',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'mobs:meat_raw'},
|
{'mobs:meat_raw'},
|
||||||
{'witchcraft:scroll'},
|
{'witchcraft:scroll'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft(
|
||||||
|
{
|
||||||
output = 'witchcraft:scroll',
|
output = 'witchcraft:scroll',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:paper', 'default:diamond', 'default:paper'},
|
{'default:paper', 'default:paper', ''},
|
||||||
{'default:paper', 'default:paper', 'default:paper'},
|
{'default:paper', 'default:paper', ''},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft(
|
||||||
|
{
|
||||||
output = 'witchcraft:scroll_recipe',
|
output = 'witchcraft:scroll_recipe',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'dye:black'},
|
{'dye:black'},
|
||||||
{'witchcraft:scroll'},
|
{'witchcraft:scroll'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft(
|
||||||
|
{
|
||||||
output = 'witchcraft:scroll_icicle',
|
output = 'witchcraft:scroll_icicle',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:ice'},
|
{'default:ice'},
|
||||||
|
{'default:diamond'},
|
||||||
{'witchcraft:scroll'},
|
{'witchcraft:scroll'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft(
|
||||||
|
{
|
||||||
output = 'witchcraft:scroll_fireball',
|
output = 'witchcraft:scroll_fireball',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:obsidian_shard'},
|
{'default:obsidian_shard'},
|
||||||
|
{'default:diamond'},
|
||||||
{'witchcraft:scroll'},
|
{'witchcraft:scroll'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft(
|
||||||
|
{
|
||||||
output = 'witchcraft:scroll_nature',
|
output = 'witchcraft:scroll_nature',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:leaves'},
|
{'default:leaves'},
|
||||||
|
{'default:diamond'},
|
||||||
{'witchcraft:scroll'},
|
{'witchcraft:scroll'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft(
|
||||||
|
{
|
||||||
output = 'witchcraft:scroll_day',
|
output = 'witchcraft:scroll_day',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:torch'},
|
{'default:torch'},
|
||||||
|
{'default:diamond'},
|
||||||
{'witchcraft:scroll'},
|
{'witchcraft:scroll'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft(
|
||||||
|
{
|
||||||
output = 'witchcraft:scroll_night',
|
output = 'witchcraft:scroll_night',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:coal_lump'},
|
{'default:coal_lump'},
|
||||||
|
{'default:diamond'},
|
||||||
{'witchcraft:scroll'},
|
{'witchcraft:scroll'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft(
|
||||||
|
{
|
||||||
output = 'witchcraft:scroll_lightning',
|
output = 'witchcraft:scroll_lightning',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot'},
|
{'default:steel_ingot'},
|
||||||
|
{'default:diamond'},
|
||||||
{'witchcraft:scroll'},
|
{'witchcraft:scroll'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
--scroll powers
|
--scroll powers
|
||||||
|
|
||||||
minetest.register_entity("witchcraft:fireball", {
|
minetest.register_entity(
|
||||||
|
"witchcraft:fireball",
|
||||||
|
{
|
||||||
textures = {"tnt_boom.png"},
|
textures = {"tnt_boom.png"},
|
||||||
velocity = 0.1,
|
velocity = 0.1,
|
||||||
damage = 2,
|
damage = 2,
|
||||||
collisionbox = {0, 0, 0, 0, 0, 0},
|
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||||
on_step = function(self, obj, pos)
|
on_step = function(self, obj, pos)
|
||||||
local remove = minetest.after(2, function()
|
local remove = minetest.after(
|
||||||
|
2,
|
||||||
|
function()
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end)
|
end)
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:getpos()
|
||||||
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)
|
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)
|
||||||
for k, obj in pairs(objs) do
|
for k, obj in pairs(objs) do
|
||||||
if obj:get_luaentity() ~= nil then
|
if obj:get_luaentity() ~= nil then
|
||||||
if obj:get_luaentity().name ~= "witchcraft:fireball" and obj:get_luaentity().name ~= "__builtin:item" then
|
if obj:get_luaentity().name ~= "witchcraft:fireball"
|
||||||
obj:punch(self.object, 1.0, {
|
and obj:get_luaentity().name ~= "__builtin:item"
|
||||||
|
and obj:get_luaentity().name ~= "gauges:hp_bar"
|
||||||
|
then
|
||||||
|
obj:punch(
|
||||||
|
self.object, 1.0,
|
||||||
|
{
|
||||||
full_punch_interval=1.0,
|
full_punch_interval=1.0,
|
||||||
damage_groups={fleshy=3},
|
damage_groups={fleshy=3},
|
||||||
}, nil)
|
}, nil)
|
||||||
@ -229,10 +278,11 @@ minetest.register_entity("witchcraft:fireball", {
|
|||||||
for dz=0,1 do
|
for dz=0,1 do
|
||||||
local p = {x=pos.x+dx, y=pos.y, z=pos.z+dz}
|
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 t = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||||
local n = minetest.env:get_node(p).name
|
local n = minetest.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 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
|
if minetest.registered_nodes[n].groups.flammable --[[or math.random(1, 100) <= 1]] then
|
||||||
minetest.env:set_node(t, {name="fire:basic_flame"})
|
minetest.set_node(t, {name="fire:basic_flame"})
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -241,18 +291,18 @@ minetest.register_entity("witchcraft:fireball", {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
hit_node = function(self, pos, node)
|
hit_node = function(self, pos, node)
|
||||||
-- local pos = self.object:getpos()
|
-- local pos = self.object:getpos()
|
||||||
for dx=-4,4 do
|
for dx=-4,4 do
|
||||||
for dy=-4,4 do
|
for dy=-4,4 do
|
||||||
for dz=-4,4 do
|
for dz=-4,4 do
|
||||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
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 t = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||||
local n = minetest.env:get_node(pos).name
|
local n = minetest.get_node(pos).name
|
||||||
if math.random(1, 50) <= 35 then
|
if math.random(1, 50) <= 35 then
|
||||||
minetest.env:remove_node(p)
|
minetest.remove_node(p)
|
||||||
end
|
end
|
||||||
if minetest.registered_nodes[n].groups.flammable or math.random(1, 100) <=5 then
|
if minetest.registered_nodes[n].groups.flammable or math.random(1, 100) <=5 then
|
||||||
minetest.env:set_node(t, {name="fire:basic_flame"})
|
minetest.set_node(t, {name="fire:basic_flame"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -260,6 +310,7 @@ minetest.register_entity("witchcraft:fireball", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
local apos = self.object:getpos()
|
local apos = self.object:getpos()
|
||||||
|
local vec = self.object:getvelocity()
|
||||||
local part = minetest.add_particlespawner(
|
local part = minetest.add_particlespawner(
|
||||||
6, --amount
|
6, --amount
|
||||||
0.3, --time
|
0.3, --time
|
||||||
@ -268,7 +319,7 @@ minetest.register_entity("witchcraft:fireball", {
|
|||||||
{x=-0, y=-0, z=-0}, --minvel
|
{x=-0, y=-0, z=-0}, --minvel
|
||||||
{x=0, y=0, z=0}, --maxvel
|
{x=0, y=0, z=0}, --maxvel
|
||||||
{x=0,y=-0.5,z=0}, --minacc
|
{x=0,y=-0.5,z=0}, --minacc
|
||||||
{x=0.5,y=0.5,z=0.5}, --maxacc
|
{x=-vec.x,y=-vec.y,z=-vec.z}, --maxacc
|
||||||
0.1, --minexptime
|
0.1, --minexptime
|
||||||
0.3, --maxexptime
|
0.3, --maxexptime
|
||||||
1, --minsize
|
1, --minsize
|
||||||
@ -278,24 +329,31 @@ minetest.register_entity("witchcraft:fireball", {
|
|||||||
)
|
)
|
||||||
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_entity("witchcraft:tree", {
|
minetest.register_entity(
|
||||||
|
"witchcraft:tree",
|
||||||
|
{
|
||||||
textures = {"witchcraft_skin.png"},
|
textures = {"witchcraft_skin.png"},
|
||||||
velocity = 1,
|
velocity = 1,
|
||||||
damage = 2,
|
damage = 2,
|
||||||
collisionbox = {0, 0, 0, 0, 0, 0},
|
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||||
on_step = function(self, obj, pos)
|
on_step = function(self, obj, pos)
|
||||||
local remove = minetest.after(2, function()
|
local remove = minetest.after(
|
||||||
|
2,
|
||||||
|
function()
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end)
|
end)
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:getpos()
|
||||||
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)
|
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)
|
||||||
for k, obj in pairs(objs) do
|
for k, obj in pairs(objs) do
|
||||||
if obj:get_luaentity() ~= nil then
|
if obj:get_luaentity() ~= nil then
|
||||||
if obj:get_luaentity().name ~= "witchcraft:tree" and obj:get_luaentity().name ~= "__builtin:item" then
|
if obj:get_luaentity().name ~= "witchcraft:tree"
|
||||||
|
and obj:get_luaentity().name ~= "__builtin:item"
|
||||||
|
and obj:get_luaentity().name ~= "gauges:hp_bar"
|
||||||
|
then
|
||||||
obj:remove()
|
obj:remove()
|
||||||
local treepos = self.object:getpos()
|
local treepos = self.object:getpos()
|
||||||
default.grow_new_jungle_tree(treepos)
|
default.grow_new_jungle_tree(treepos)
|
||||||
@ -308,7 +366,7 @@ minetest.register_entity("witchcraft:tree", {
|
|||||||
for dz=0,1 do
|
for dz=0,1 do
|
||||||
local p = {x=pos.x+dx, y=pos.y, z=pos.z+dz}
|
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 t = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||||
local n = minetest.env:get_node(p).name
|
local n = minetest.get_node(p).name
|
||||||
if n ~= "witchcraft:tree" and n ~="air" then
|
if n ~= "witchcraft:tree" and n ~="air" then
|
||||||
local treepos = self.object:getpos()
|
local treepos = self.object:getpos()
|
||||||
default.grow_new_jungle_tree(treepos)
|
default.grow_new_jungle_tree(treepos)
|
||||||
@ -345,9 +403,11 @@ minetest.register_entity("witchcraft:tree", {
|
|||||||
)
|
)
|
||||||
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_entity("witchcraft:ice", {
|
minetest.register_entity(
|
||||||
|
"witchcraft:ice",
|
||||||
|
{
|
||||||
visual="sprite",
|
visual="sprite",
|
||||||
visual_size={x=1,y=1},
|
visual_size={x=1,y=1},
|
||||||
physical=false,
|
physical=false,
|
||||||
@ -358,21 +418,45 @@ minetest.register_entity("witchcraft:ice", {
|
|||||||
damage = 2,
|
damage = 2,
|
||||||
collisionbox = {0, 0, 0, 0, 0, 0},
|
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||||
on_step = function(self, obj, pos)
|
on_step = function(self, obj, pos)
|
||||||
local remove = minetest.after(2, function()
|
local remove = minetest.after(10, function()
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end)
|
end)
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:getpos()
|
||||||
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)
|
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)
|
||||||
for k, obj in pairs(objs) do
|
for k, obj in pairs(objs) do
|
||||||
if obj:get_luaentity() ~= nil then
|
if obj:get_luaentity() ~= nil then
|
||||||
if obj:get_luaentity().name ~= "witchcraft:ice" and obj:get_luaentity().name ~= "__builtin:item" then
|
if obj:get_luaentity().name ~= "witchcraft:ice"
|
||||||
obj:punch(self.object, 1.0, {
|
and obj:get_luaentity().name ~= "__builtin:item"
|
||||||
|
and obj:get_luaentity().name ~= "gauges:hp_bar"
|
||||||
|
then
|
||||||
|
obj:punch(
|
||||||
|
self.object, 1.0,
|
||||||
|
{
|
||||||
full_punch_interval=1.0,
|
full_punch_interval=1.0,
|
||||||
damage_groups={fleshy=1},
|
damage_groups={fleshy=1},
|
||||||
}, nil)
|
}, nil)
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
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.get_node(p).name
|
||||||
|
if n == "default:water_source" or n =="default:river_water_source" then
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
minetest.set_node(pos, {name="default:ice"})
|
||||||
|
self.object:remove()
|
||||||
|
elseif n ~= "air" then
|
||||||
|
local velo = self.object:getvelocity()
|
||||||
|
self.object:setvelocity({x=velo.x*-1, y=velo.y*0, z=velo.z*1})
|
||||||
|
--self.object:remove()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local apos = self.object:getpos()
|
local apos = self.object:getpos()
|
||||||
local part = minetest.add_particlespawner(
|
local part = minetest.add_particlespawner(
|
||||||
|
BIN
textures/witchcraft_bone.png
Normal file
After Width: | Height: | Size: 217 B |
BIN
textures/witchcraft_bone_bottle.png
Normal file
After Width: | Height: | Size: 266 B |
BIN
textures/witchcraft_candle.png
Normal file
After Width: | Height: | Size: 303 B |
BIN
textures/witchcraft_candle_top.png
Normal file
After Width: | Height: | Size: 683 B |
BIN
textures/witchcraft_dagger.png
Normal file
After Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 133 B After Width: | Height: | Size: 306 B |
BIN
textures/witchcraft_herb_bottle.png
Normal file
After Width: | Height: | Size: 227 B |
BIN
textures/witchcraft_horn.png
Normal file
After Width: | Height: | Size: 193 B |
BIN
textures/witchcraft_launcher.png
Normal file
After Width: | Height: | Size: 352 B |
BIN
textures/witchcraft_launcher_potion.png
Normal file
After Width: | Height: | Size: 134 B |
BIN
textures/witchcraft_medicine_bottle.png
Normal file
After Width: | Height: | Size: 277 B |
BIN
textures/witchcraft_mud_bottle.png
Normal file
After Width: | Height: | Size: 230 B |
BIN
textures/witchcraft_penta.png
Normal file
After Width: | Height: | Size: 414 B |
BIN
textures/witchcraft_pentablock.png
Normal file
After Width: | Height: | Size: 438 B |
BIN
textures/witchcraft_pentagram.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
textures/witchcraft_portal.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
textures/witchcraft_pot_gold.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 437 B After Width: | Height: | Size: 437 B |
BIN
textures/witchcraft_pot_silver.png
Normal file
After Width: | Height: | Size: 664 B |
BIN
textures/witchcraft_potion_gold.png
Normal file
After Width: | Height: | Size: 424 B |
BIN
textures/witchcraft_potion_silver.png
Normal file
After Width: | Height: | Size: 419 B |
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 465 KiB |
BIN
textures/witchcraft_recipes_old.png
Normal file
After Width: | Height: | Size: 216 KiB |
BIN
textures/witchcraft_slime_bottle.png
Normal file
After Width: | Height: | Size: 242 B |
BIN
textures/witchcraft_small_bottle.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
textures/witchcraft_splash_blue2.png
Normal file
After Width: | Height: | Size: 421 B |
BIN
textures/witchcraft_splash_brown.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
textures/witchcraft_splash_cyan.png
Normal file
After Width: | Height: | Size: 422 B |
BIN
textures/witchcraft_splash_darkpurple.png
Normal file
After Width: | Height: | Size: 423 B |
BIN
textures/witchcraft_splash_ggreen.png
Normal file
After Width: | Height: | Size: 423 B |
BIN
textures/witchcraft_splash_green.png
Normal file
After Width: | Height: | Size: 425 B |
BIN
textures/witchcraft_splash_grey.png
Normal file
After Width: | Height: | Size: 385 B |
BIN
textures/witchcraft_splash_magenta.png
Normal file
After Width: | Height: | Size: 403 B |
BIN
textures/witchcraft_splash_purple.png
Normal file
After Width: | Height: | Size: 406 B |
BIN
textures/witchcraft_splash_red.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
textures/witchcraft_splash_redbrown.png
Normal file
After Width: | Height: | Size: 425 B |
BIN
textures/witchcraft_tooth.png
Normal file
After Width: | Height: | Size: 246 B |
BIN
textures/witchcraft_water_bottle.png
Normal file
After Width: | Height: | Size: 272 B |