1
0
mirror of https://github.com/D00Med/witchcraft.git synced 2024-11-16 23:30:26 +01:00

Compare commits

..

31 Commits
v0.2 ... master

Author SHA1 Message Date
D00Med
c129dea077
Merge pull request #10 from sys4-fr/master
Multiple fixes and optipng textures
2021-03-15 07:19:30 +10:00
a9cac59e4c Fix crash when right clicking with bucket on a filled pot 2021-03-14 22:15:44 +01:00
11f39382ef Multiple fixes and optipng textures
* Fix bugs with pots, (splash) potions, scrolls etc.
* Fix warnings caused by deprecated functions and definitions
* Add mod.conf
* Clean and indent code
* Remove the stack limit of 3 glass bottles
* Optimize textures with optipng
2021-03-14 20:48:55 +01:00
D00Med
efe57c3137
Merge pull request #9 from orbea/hunger_ng
Add hunger_ng support.
2020-05-04 07:50:46 +10:00
orbea
ee1eb7d8ce Add hunger_ng support.
Fixes https://github.com/D00Med/witchcraft/issues/6
2020-05-03 07:37:36 -07:00
D00Med
0115b9f0ba
Merge pull request #8 from orbea/light
Silence light_source warnings.
2017-11-05 19:27:54 +10:00
orbea
9ee613bf2f Silence light_source warnings.
WARNING[Main]: Node 'light_source' value exceeds maximum, limiting to maximum: witchcraft:pentagram
WARNING[Main]: Node 'light_source' value exceeds maximum, limiting to maximum: witchcraft:portal
2017-11-05 01:07:34 -08:00
D00Med
882af8e149
Merge pull request #7 from orbea/eyes
Fix jar of eyes recipe.
2017-11-02 20:49:26 +10:00
orbea
fe9df3f1b6 Fix jar of eyes recipe. 2017-11-02 02:16:43 -07:00
D00Med
27cd07358a 27.6.17 update
>mod now supports player_monoids
>potion textures match the new glass bottle texture
2017-06-27 08:23:58 +10:00
D00Med
0baf0cb53b fix my name in the license 2017-02-01 07:20:21 +10:00
D00Med
b41c525de8 recipe scrolls updated 2017-01-08 16:21:05 +10:00
D00Med
ceca04813c fix for vessels 2016-12-31 05:42:25 +10:00
D00Med
ef7533976c recipe changes 2016-12-31 05:38:58 +10:00
D00Med
97e501f57a silver potion and recipes
>finished new recipe chain
>added silver potion
>switched gold and yellow potion
2016-11-12 06:53:12 +10:00
D00Med
db7fec5801 increase shiny potion duration 2016-10-28 06:12:11 +10:00
D00Med
81d7d65bed fix for shiny potion 2016-10-26 16:37:46 +10:00
D00Med
4fe76ee709 pot changes and gold potion
>adds gold(shiny) potion, which brightens the world at night
>darkness potions change the day/night ratio as well as adding particles
>the empty potion pot has depth
2016-10-26 06:34:50 +10:00
D00Med
6176581e72 1potion pot = 3 potions
Right-clicking a pot with 3 bottles will replace the stack with the
potion, and add two more above the pot, however if only one bottle is
used, then the bottle will be replaced with a potion.
2016-10-15 06:26:29 +10:00
D00Med
355dcc9e9d readme changes 2016-10-13 09:04:34 +10:00
D00Med
ba05c10b2f bugfixes 2016-10-13 08:49:17 +10:00
D00Med
c38186fcd8 Minor scroll improvements 2016-09-10 07:34:38 +10:00
D00Med
76e14fbc24 pentagram changes and effect information 2016-09-01 18:04:48 +10:00
D00Med
b2a77d9d85 Bottles and ingredients
>added small bottles for storage of ingredients and potions(but mostly
for decoration)
>added tooth, bone, and horn
2016-08-27 06:40:43 +10:00
D00Med
c241fd3d1b player effects and decorative nodes
>physics changing potions now use playereffects
>the mod is dependant on playereffects
>adds mortar and pestle and a floor pentagram.
2016-08-26 17:00:04 +10:00
D00Med
bd27cf1e92 Check if the player exists
Attempt to fix the problem of the game potentially crashing after
players use a potion and then leave the game.
2016-08-19 06:49:48 +10:00
D00Med
b78d27c8da Fixed Filling potion 2016-08-18 17:01:46 +10:00
D00Med
945bc01568 bugfixes
>fixed dodgy potion bugs(the irony!)
>fixed heal potion related recipes
2016-08-17 18:40:26 +10:00
D00Med
a4b2d80610 more splash potions
>added alternate potions for those that need other mods
>changed recipes
>added splash potions (red, brown, grey, redbrown, cyan, magenta,
purple, green, ggreen)
2016-08-17 10:37:22 +10:00
D00Med
d29799083d Some tweaks
>fixed some potions returing buckets instead of bottles
>made blank scrolls easier to craft
>Changed the recipe for the yellow potion
2016-08-16 06:43:56 +10:00
D00Med
793195db93 Red potion fix
Fixed red potion to work with hud_hunger
2016-07-02 07:12:27 +10:00
114 changed files with 2950 additions and 1558 deletions

View File

@ -13,7 +13,7 @@ minetest.register_node("witchcraft:brewing_stand", {
"witchcraft_brewing_stand_side.png"
},
drawtype = "nodebox",
use_texture_alpha = true,
use_texture_alpha = "blend",
paramtype = "light",
drop = {
items = {
@ -36,14 +36,14 @@ minetest.register_node("witchcraft:brewing_stand", {
}
},
on_rightclick = function(pos, node, clicker, item, _)
local wield_item = clicker:get_wielded_item():get_name()
local wield_item = 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)
minetest.set_node(pos, {name="witchcraft:brewing_stand_unready", param2=node.param2})
minetest.add_item(pos, new_item)
end)
end
end,
@ -59,7 +59,7 @@ minetest.register_node("witchcraft:brewing_stand_active", {
"witchcraft_brewing_stand_side.png"
},
drawtype = "nodebox",
use_texture_alpha = true,
use_texture_alpha = "blend",
paramtype = "light",
light_source = 1,
drop = {
@ -96,7 +96,7 @@ minetest.register_node("witchcraft:brewing_stand_unready", {
},
inventory_image = "witchcraft_brewing_stand_inv.png",
drawtype = "nodebox",
use_texture_alpha = true,
use_texture_alpha = "blend",
paramtype = "light",
light_source = 1,
drop = {
@ -120,7 +120,7 @@ minetest.register_node("witchcraft:brewing_stand_unready", {
}
},
on_rightclick = function(pos, node, clicker, item, _)
local wield_item = clicker:get_wielded_item():get_name()
local wield_item = 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()
@ -161,4 +161,4 @@ minetest.register_craft({
{'group:stick', 'default:diamond', 'group:stick'},
{'', 'default:obsidian_shard', ''},
}
})
})

View File

@ -2,8 +2,12 @@ default
vessels
tnt
fire
playereffects
player_monoids?
farming?
lightning?
pmobs?
hud_hunger?
moreplants?
hunger_ng?
moreplants?
horror?

3748
init.lua

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
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
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
---------------------------------------
CC-BY-SA 3.0 UNPORTED. Created by DOOmed
CC-BY-SA 3.0 UNPORTED. Created by D00Med
All potion bottles derived from
vessels_glass_bottle.png (by Authors)

3
mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = witchcraft
depends = default,vessels,tnt,fire,playereffects
optional_depends = player_monoids,farming,lightning,pmobs,hud_hunger,hunger_ng,moreplants,horror

19
models/3quarters.obj Normal file
View 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
View 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
View 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
View 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

View File

@ -62,4 +62,19 @@ Potion ingredients(may be slightly inaccurate):
>gravel
>bucket of water
>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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,396 +1,412 @@
--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,
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,
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,
})
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:get_pos()
minetest.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,
description = "Scroll of fireball",
inventory_image = "witchcraft_scroll.png^witchcraft_fire_over.png",
stack_max = 1,
on_use = function(item, placer, pointed_thing)
local dir = placer:get_look_dir()
local playerpos = placer:get_pos()
local entities = {}
for i=1,4 do
entities[i] = 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")
end
entities[2]:set_velocity({x=dir.x*7+0.5,y=dir.y*7,z=dir.z*7+0.5})
entities[3]:set_velocity({x=dir.x*7-0.5,y=dir.y*7,z=dir.z*7-0.5})
entities[4]:set_velocity({x=dir.x*7,y=dir.y*7-0.5,z=dir.z*7})
entities[1]:set_velocity({x=dir.x*7,y=dir.y*7+0.5,z=dir.z*7})
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,
})
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, pointed_thing)
local playerpos = placer:get_pos()
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,
description = "Scroll of icicle",
inventory_image = "witchcraft_scroll.png^witchcraft_ice_over.png",
stack_max = 1,
on_use = function(item, placer, pointed_thing)
local dir = placer:get_look_dir()
local playerpos = placer:get_pos()
local vec = {x=dir.x*7,y=dir.y*7,z=dir.z*7}
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.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.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:set_velocity(vec)
obj2:set_velocity(vec)
obj3:set_velocity(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,
description = "Scroll of nature",
inventory_image = "witchcraft_scroll.png^witchcraft_leaf_over.png",
stack_max = 1,
on_use = function(item, placer, pointed_thing)
local dir = placer:get_look_dir()
local playerpos = placer:get_pos()
local vec = {x=dir.x*6,y=dir.y*6,z=dir.z*6}
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:set_velocity(vec)
item:take_item()
return item
end,
})
minetest.register_craftitem("witchcraft:scroll", {
description = "Blank Scroll",
inventory_image = "witchcraft_scroll.png",
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,
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'},
}
})
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'},
}
output = 'witchcraft:scroll',
recipe = {
{'default:paper', 'default:paper', ''},
{'default:paper', 'default:paper', ''},
}
})
minetest.register_craft({
output = 'witchcraft:scroll_recipe',
recipe = {
{'dye:black'},
{'witchcraft:scroll'},
}
output = 'witchcraft:scroll_recipe',
recipe = {
{'dye:black'},
{'witchcraft:scroll'},
}
})
minetest.register_craft({
output = 'witchcraft:scroll_icicle',
recipe = {
{'default:ice'},
{'witchcraft:scroll'},
}
output = 'witchcraft:scroll_icicle',
recipe = {
{'default:ice'},
{'default:diamond'},
{'witchcraft:scroll'},
}
})
minetest.register_craft({
output = 'witchcraft:scroll_fireball',
recipe = {
{'default:obsidian_shard'},
{'witchcraft:scroll'},
}
output = 'witchcraft:scroll_fireball',
recipe = {
{'default:obsidian_shard'},
{'default:diamond'},
{'witchcraft:scroll'},
}
})
minetest.register_craft({
output = 'witchcraft:scroll_nature',
recipe = {
{'default:leaves'},
{'witchcraft:scroll'},
}
output = 'witchcraft:scroll_nature',
recipe = {
{'default:leaves'},
{'default:diamond'},
{'witchcraft:scroll'},
}
})
minetest.register_craft({
output = 'witchcraft:scroll_day',
recipe = {
{'default:torch'},
{'witchcraft:scroll'},
}
output = 'witchcraft:scroll_day',
recipe = {
{'default:torch'},
{'default:diamond'},
{'witchcraft:scroll'},
}
})
minetest.register_craft({
output = 'witchcraft:scroll_night',
recipe = {
{'default:coal_lump'},
{'witchcraft:scroll'},
}
output = 'witchcraft:scroll_night',
recipe = {
{'default:coal_lump'},
{'default:diamond'},
{'witchcraft:scroll'},
}
})
minetest.register_craft({
output = 'witchcraft:scroll_lightning',
recipe = {
{'default:steel_ingot'},
{'witchcraft:scroll'},
}
output = 'witchcraft:scroll_lightning',
recipe = {
{'default:steel_ingot'},
{'default:diamond'},
{'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)
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:get_pos()
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() then
if obj:get_luaentity().name ~= "witchcraft:fireball"
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,
damage_groups={fleshy=3},
}, nil)
self.object:remove()
return
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
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 ~= "witchcraft:fireball" and n ~="default:dirt_with_grass" then
if minetest.registered_nodes[n].groups.flammable then
minetest.set_node(t, {name="fire:basic_flame"})
self.object:remove()
return
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,
local vec = self.object:get_velocity()
minetest.add_particlespawner({
amount = 6,
time = 0.3,
minpos = {x=pos.x-0.3, y=pos.y-0.3, z=pos.z-0.3},
maxpos = {x=pos.x+0.3, y=pos.y+0.3, z=pos.z+0.3},
minvel = {x=-0, y=-0, z=-0},
maxvel = {x=0, y=0, z=0},
minacc = {x=0,y=-0.5,z=0},
maxacc = {x=-vec.x,y=-vec.y,z=-vec.z},
minexptime = 0.1,
maxexptime = 0.3,
minsize = 1,
maxsize = 2,
collisiondetection = false,
texture = "witchcraft_flame.png"
})
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)
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:get_pos()
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() 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()
default.grow_new_jungle_tree(pos)
self.object:remove()
return
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 n = minetest.get_node(pos).name
if n ~= "witchcraft:tree" and n ~="air" then
default.grow_new_jungle_tree(pos)
self.object:remove()
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.add_particlespawner({
amount = 6,
time = 0.3,
minpos = {x=pos.x-0.3, y=pos.y-0.3, z=pos.z-0.3},
maxpos = {x=pos.x+0.3, y=pos.y+0.3, z=pos.z+0.3},
minvel = {x=-0, y=-0, z=-0},
maxvel = {x=0, y=0, z=0},
minacc = {x=0,y=-0.5,z=0},
maxacc = {x=0.5,y=0.5,z=0.5},
minexptime = 0.1,
maxexptime = 0.3,
minsize = 1,
maxsize = 2,
collisiondetection = false,
texture = "witchcraft_leaf_over.png"
})
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)
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(10, function()
self.object:remove()
end)
local pos = self.object:get_pos()
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
if obj:get_luaentity().name ~= "witchcraft:ice"
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,
damage_groups={fleshy=1},
}, nil)
self.object:remove()
return
end
end
end
local velo = self.object:get_velocity()
local hit = {
{ p = {x=pos.x+1, y=pos.y, z=pos.z},
v = {x=math.abs(velo.x)*-1, y=velo.y, z=velo.z}}, -- x
{ p = {x=pos.x-1, y=pos.y, z=pos.z},
v = {x=math.abs(velo.x), y=velo.y, z=velo.z}},
{ p = {x=pos.x, y=pos.y+1, z=pos.z},
v = {x=velo.x, y=math.abs(velo.y)*-1, z=velo.z}}, -- y
{ p = {x=pos.x, y=pos.y-1, z=pos.z},
v = {x=velo.x, y=math.abs(velo.y), z=velo.z}},
{ p = {x=pos.x, y=pos.y, z=pos.z+1},
v = {x=velo.x, y=velo.y, z=math.abs(velo.z)*-1}}, -- z
{ p = {x=pos.x, y=pos.y, z=pos.z-1},
v = {x=velo.x, y=velo.y, z=math.abs(velo.z)}}
}
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
})
for _,h in pairs(hit) do
local n = minetest.get_node(h.p).name
if n ~= "air" and n~= "witchcraft:ice" then
if n == "default:water_source" or n =="default:river_water_source" then
minetest.set_node(h.p, {name="default:ice"})
h.v.y = 0
end
self.object:set_velocity(h.v)
break
end
end
minetest.add_particlespawner({
amount = 10,
time = 0.3,
minpos = {x=pos.x-0.3, y=pos.y-0.3, z=pos.z-0.3},
maxpos = {x=pos.x+0.3, y=pos.y+0.3, z=pos.z+0.3},
minvel = {x=-0, y=-0, z=-0},
maxvel = {x=0, y=0, z=0},
minacc = {x=0,y=-0.5,z=0},
maxacc = {x=0.5,y=0.5,z=0.5},
minexptime = 0.1,
maxexptime = 0.3,
minsize = 0.2,
maxsize = 0.5,
collisiondetection = false,
texture = "witchcraft_light_over.png"
})
end
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 493 B

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 B

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 679 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 B

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 B

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1017 B

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 961 B

After

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 968 B

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 981 B

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 693 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 340 B

View File

Before

Width:  |  Height:  |  Size: 437 B

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 661 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 657 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 689 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 679 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 394 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 382 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 385 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 409 B

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Some files were not shown because too many files have changed in this diff Show More