5 Commits

Author SHA1 Message Date
32e3f8928b Ajoute message de chargement du mod dans le journal "action" 2019-01-19 20:25:08 +01:00
c515b58ca1 La dent s'obtient aléatoirement en ramassant du sable 2018-11-03 14:52:41 +01:00
8bf04f444e Correction du lancé de sorts pour les parchemins
Changement d'un ingrédient de potion : lilypad remplace waterlily
2018-11-02 21:36:54 +01:00
dd3a7d13c7 Corrige un crash avec la splash potion orange
Corrige la collision avec la gauge bar
2018-11-02 20:40:25 +01:00
fef074b9ed Change le craft de la dent avec le sable du desert. 2018-10-13 17:03:32 +02:00
2 changed files with 113 additions and 97 deletions

196
init.lua
View File

@ -178,7 +178,7 @@ minetest.register_craft({
output = 'witchcraft:shelf',
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
{'group:potion', 'group:potion', 'group:potion'},
{'group:potion2', 'group:potion2', 'group:potion2'},
{'group:wood', 'group:wood', 'group:wood'},
}
})
@ -397,14 +397,26 @@ minetest.register_craft({
})
--teeth from sand, maybe fossilised?
minetest.register_craft({
output = 'witchcraft:tooth 1',
recipe = {
{'default:sand'},
},
minetest.override_item("default:sand", {
drop = {
max_items = 1,
items = {
{
items = {"witchcraft:tooth"},
rarity = 30,
},
{
items = {"default:sand"},
}
}
},
})
minetest.register_craft({
type = "shapeless",
output = "default:sand",
recipe = {"witchcraft:tooth"},
})
--splash potions crafting
@ -552,7 +564,7 @@ witchcraft.pot = {
{"blue", "brown", "default:dirt", "blue2", "moreplants:bullrush", "red", "purple"},
{"blue2", "yellow", "default:steelblock", "yellow", "default:copperblock", "green2", "aqua"},
{"darkpurple", "cyan", "flowers:mushroom_red", "green", "moreplants:weed", "yellow", "redbrown"},
{"purple", "blue2", "flowers:waterlily", "gpurple", "default:mese_crystal", "magenta", "darkpurple"},
{"purple", "blue2", "nalc_flowers:lily_pad", "gpurple", "default:mese_crystal", "magenta", "darkpurple"},
{"magenta", "purple", "witchcraft:bottle_eyes", "darkpurple", "moreplants:mushroom", "purple", "darkpurple"},
{"red", "grey", "default:gravel", "yllwgrn", "default:flint", "blue", "purple"},
{"redbrown", "magenta", "flowers:mushroom_brown", "magenta", "default:stone", "grey", "brown"},
@ -574,7 +586,7 @@ witchcraft.pot = {
--new recipes
witchcraft.pot_new = {
{"blue", "blue2", "flowers:waterlily", "brown", "default:dirt", "red", "purple"},
{"blue", "blue2", "nalc_flowers:lily_pad", "brown", "default:dirt", "red", "purple"},
{"blue2", "green", "default:papyrus", "", "", "gred", "magenta"},
{"green", "green2", "default:sapling", "", "", "yellow", "yllwgrn"},
{"green2", "yellow", "default:mese_crystal_fragment", "", "", "blue", "cyan"},
@ -922,7 +934,7 @@ minetest.register_entity("witchcraft:tnt_splash", {
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:tnt_splash" and obj:get_luaentity().name ~= "__builtin:item" then
if obj:get_luaentity().name ~= "witchcraft:tnt_splash" 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},
@ -938,7 +950,7 @@ minetest.register_entity("witchcraft:tnt_splash", {
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:tnt_splash" and n ~="default:obsidian" and n ~= "air" then
if n ~= "witchcraft:tnt_splash" and n ~="default:obsidian" and n ~= "air" and n ~= "gauges:hp_bar" then
local pos = self.object:getpos()
minetest.sound_play("default_break_glass.1", {
pos = self.object:getpos(),
@ -992,7 +1004,7 @@ minetest.register_entity("witchcraft:fire_splash", {
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:fire_splash" and obj:get_luaentity().name ~= "__builtin:item" then
if obj:get_luaentity().name ~= "witchcraft:fire_splash" 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},
@ -1007,16 +1019,18 @@ minetest.register_entity("witchcraft:fire_splash", {
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:fire_splash" and n ~= "air" then
if not ignore_protection and minetest.is_protected(npos, "") then
return
end
minetest.env:set_node(t, {name="fire:basic_flame"})
minetest.sound_play("default_break_glass.1", {
pos = self.object:getpos(),
max_hear_distance = 20,
gain = 10.0,
})
if n ~= "witchcraft:fire_splash" and n ~= "air" and n ~= "gauges:hp_bar" then
if not ignore_protection and minetest.is_protected(p, "") then
return
end
minetest.env:set_node(t, {name="fire:basic_flame"})
minetest.sound_play(
"default_break_glass.1",
{
pos = self.object:getpos(),
max_hear_distance = 20,
gain = 10.0,
})
self.object:remove()
elseif n =="default:dirt_with_grass" or n =="default:dirt_with_dry_grass" then
self.object:remove()
@ -1060,7 +1074,7 @@ minetest.register_entity("witchcraft:death_splash", {
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:death_splash" and obj:get_luaentity().name ~= "__builtin:item" then
if obj:get_luaentity().name ~= "witchcraft:death_splash" 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=50},
@ -1075,7 +1089,7 @@ minetest.register_entity("witchcraft:death_splash", {
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:death_splash" and n ~= "air" then
if n ~= "witchcraft:death_splash" and n ~= "air" and n ~= "gauges:hp_bar" then
minetest.sound_play("default_break_glass.1", {
pos = self.object:getpos(),
max_hear_distance = 20,
@ -1107,7 +1121,7 @@ minetest.register_entity("witchcraft:heal_splash", {
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:heal_splash" and obj:get_luaentity().name ~= "__builtin:item" then
if obj:get_luaentity().name ~= "witchcraft:heal_splash" 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=-20},
@ -1122,7 +1136,7 @@ minetest.register_entity("witchcraft:heal_splash", {
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:heal_splash" and n ~= "air" then
if n ~= "witchcraft:heal_splash" and n ~= "air" and n ~= "gauges:hp_bar" then
minetest.sound_play("default_break_glass.1", {
pos = self.object:getpos(),
max_hear_distance = 20,
@ -1154,7 +1168,7 @@ minetest.register_entity("witchcraft:slow_splash", {
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:slow_splash" and obj:get_luaentity().name ~= "__builtin:item" then
if obj:get_luaentity().name ~= "witchcraft:slow_splash" and obj:get_luaentity().name ~= "__builtin:item" and obj:get_luaentity().name ~= "gauges:hp_bar" then
local vel = obj:getvelocity()
obj:setvelocity({x=vel.x*0.5, y=vel.y*0.5, z=vel.z*0.5})
self.object:remove()
@ -1167,7 +1181,7 @@ minetest.register_entity("witchcraft:slow_splash", {
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:slow_splash" and n ~= "air" then
if n ~= "witchcraft:slow_splash" and n ~= "air" and n ~= "gauges:hp_bar" then
self.object:remove()
elseif n =="default:dirt_with_grass" or n =="default:dirt_with_dry_grass" then
@ -1200,7 +1214,7 @@ minetest.register_entity("witchcraft:fast_splash", {
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:fast_splash" and obj:get_luaentity().name ~= "__builtin:item" then
if obj:get_luaentity().name ~= "witchcraft:fast_splash" and obj:get_luaentity().name ~= "__builtin:item" and obj:get_luaentity().name ~= "gauges:hp_bar" then
local vel = obj:getvelocity()
obj:setvelocity({x=vel.x*4, y=vel.y*1, z=vel.z*4})
self.object:remove()
@ -1213,7 +1227,7 @@ minetest.register_entity("witchcraft:fast_splash", {
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:fast_splash" and n ~= "air" then
if n ~= "witchcraft:fast_splash" and n ~= "air" and n ~= "gauges:hp_bar" then
self.object:remove()
elseif n =="default:dirt_with_grass" or n =="default:dirt_with_dry_grass" then
@ -1246,7 +1260,7 @@ minetest.register_entity("witchcraft:antigrav_splash", {
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:antigrav_splash" and obj:get_luaentity().name ~= "__builtin:item" then
if obj:get_luaentity().name ~= "witchcraft:antigrav_splash" and obj:get_luaentity().name ~= "__builtin:item" and obj:get_luaentity().name ~= "gauges:hp_bar" then
local vel = obj:getvelocity()
obj:setvelocity({x=vel.x*1, y=vel.y*0.1, z=vel.z*1})
self.object:remove()
@ -1259,7 +1273,7 @@ minetest.register_entity("witchcraft:antigrav_splash", {
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:antigrav_splash" and n ~= "air" then
if n ~= "witchcraft:antigrav_splash" and n ~= "air" and n ~= "gauges:hp_bar" then
self.object:remove()
elseif n =="default:dirt_with_grass" or n =="default:dirt_with_dry_grass" then
@ -1292,7 +1306,7 @@ minetest.register_entity("witchcraft:jump_splash", {
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:jump_splash" and obj:get_luaentity().name ~= "__builtin:item" then
if obj:get_luaentity().name ~= "witchcraft:jump_splash" and obj:get_luaentity().name ~= "__builtin:item" and obj:get_luaentity().name ~= "gauges:hp_bar" then
local vel = obj:getvelocity()
obj:setvelocity({x=vel.x*1, y=(vel.y+2)*3, z=vel.z*1})
self.object:remove()
@ -1305,7 +1319,7 @@ minetest.register_entity("witchcraft:jump_splash", {
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:jump_splash" and n ~= "air" then
if n ~= "witchcraft:jump_splash" and n ~= "air" and n ~= "gauges:hp_bar" then
self.object:remove()
elseif n =="default:dirt_with_grass" or n =="default:dirt_with_dry_grass" then
@ -1338,7 +1352,7 @@ minetest.register_entity("witchcraft:murky_splash", {
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:murky_splash" and obj:get_luaentity().name ~= "__builtin:item" then
if obj:get_luaentity().name ~= "witchcraft:murky_splash" 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=20},
@ -1353,7 +1367,7 @@ minetest.register_entity("witchcraft:murky_splash", {
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:murky_splash" and n ~= "air" then
if n ~= "witchcraft:murky_splash" and n ~= "air" and n ~= "gauges:hp_bar" then
minetest.sound_play("default_break_glass.1", {
pos = self.object:getpos(),
max_hear_distance = 20,
@ -1653,7 +1667,7 @@ minetest.register_node("witchcraft:splash_orange", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_orange.png",
on_use = function(item, placer, pos)
@ -1682,7 +1696,7 @@ minetest.register_node("witchcraft:splash_purple", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_purple.png",
on_use = function(item, placer, pos)
@ -1711,7 +1725,7 @@ minetest.register_node("witchcraft:splash_red", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_red.png",
on_use = function(item, placer, pos)
@ -1740,7 +1754,7 @@ minetest.register_node("witchcraft:splash_green", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_green.png",
on_use = function(item, placer, pos)
@ -1769,7 +1783,7 @@ minetest.register_node("witchcraft:splash_cyan", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_cyan.png",
on_use = function(item, placer, pos)
@ -1798,7 +1812,7 @@ minetest.register_node("witchcraft:splash_redbrown", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_redbrown.png",
on_use = function(item, placer, pos)
@ -1827,7 +1841,7 @@ minetest.register_node("witchcraft:splash_magenta", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_magenta.png",
on_use = function(item, placer, pos)
@ -1856,7 +1870,7 @@ minetest.register_node("witchcraft:splash_brown", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_brown.png",
on_use = function(item, placer, pos)
@ -1885,7 +1899,7 @@ minetest.register_node("witchcraft:splash_grey", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_grey.png",
on_use = function(item, placer, pos)
@ -1916,7 +1930,7 @@ minetest.register_node("witchcraft:splash_ggreen", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_ggreen.png",
on_use = function(item, placer, pos)
@ -1945,7 +1959,7 @@ minetest.register_node("witchcraft:splash_yellwgrn", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_yellgrn.png",
on_use = function(item, placer, pos)
@ -1976,7 +1990,7 @@ minetest.register_node("witchcraft:potion_red", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_red.png",
on_use = function(itemstack, player)
@ -2000,7 +2014,7 @@ minetest.register_node("witchcraft:potion_red_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_red.png^[colorize:black:50",
on_use = function(itemstack, player)
@ -2022,7 +2036,7 @@ minetest.register_node("witchcraft:potion_darkpurple", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
stack_max = 1,
wield_image = "witchcraft_potion_darkpurple.png",
@ -2110,7 +2124,7 @@ minetest.register_node("witchcraft:potion_darkpurple_2", {
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
paramtype = "light",
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
stack_max = 1,
wield_image = "witchcraft_potion_darkpurple.png^[colorize:black:50",
@ -2198,7 +2212,7 @@ minetest.register_node("witchcraft:potion_brown", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_brown.png",
on_use = minetest.item_eat(-5, "vessels:glass_bottle"),
@ -2217,7 +2231,7 @@ minetest.register_node("witchcraft:potion_brown_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_brown.png^[colorize:black:50",
on_use = minetest.item_eat(-10, "vessels:glass_bottle"),
@ -2238,7 +2252,7 @@ minetest.register_node("witchcraft:potion_yllwgrn", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_yellgrn.png",
on_use = function(pos, placer, itemstack)
@ -2261,7 +2275,7 @@ minetest.register_node("witchcraft:potion_yllwgrn_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_yellgrn.png^[colorize:black:50",
on_use = function(pos, placer, itemstack)
@ -2364,7 +2378,7 @@ minetest.register_node("witchcraft:potion_orange", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_orange.png",
on_use = function(item, placer, pos)
@ -2408,7 +2422,7 @@ minetest.register_node("witchcraft:potion_orange_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_orange.png^[colorize:black:50",
on_use = function(item, placer, pos)
@ -2452,7 +2466,7 @@ minetest.register_node("witchcraft:splash_orange", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_orange.png",
on_use = function(item, placer, pos)
@ -2481,7 +2495,7 @@ minetest.register_node("witchcraft:splash_yellwgrn", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_splash_yellgrn.png",
on_use = function(item, placer, pos)
@ -2510,7 +2524,7 @@ minetest.register_node("witchcraft:potion_purple", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_purple.png",
on_use = function(item, placer, pos)
@ -2556,7 +2570,7 @@ minetest.register_node("witchcraft:potion_gpurple", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_gpurple.png",
on_use = function(item, placer, pos)
@ -2578,7 +2592,7 @@ minetest.register_node("witchcraft:potion_gred", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_gred.png",
on_use = function(item, placer, pos)
@ -2604,7 +2618,7 @@ else
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_purple.png",
on_use = function(itemstack, player)
@ -2627,7 +2641,7 @@ else
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_gred.png",
on_use = function(itemstack, player)
@ -2653,7 +2667,7 @@ minetest.register_node("witchcraft:potion_purple_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_purple.png^[colorize:black:20",
on_use = function(item, placer, pos)
@ -2695,7 +2709,7 @@ minetest.register_node("witchcraft:potion_grey", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_grey.png",
on_use = minetest.item_eat(-100, "vessels:glass_bottle"),
@ -2714,7 +2728,7 @@ minetest.register_node("witchcraft:potion_grey_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_grey.png^[colorize:black:50",
on_use = minetest.item_eat(-200, "vessels:glass_bottle"),
@ -2733,7 +2747,7 @@ minetest.register_node("witchcraft:potion_blue", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_blue.png",
on_use = function(item, user, pointed_thing)
@ -2765,7 +2779,7 @@ minetest.register_node("witchcraft:potion_silver", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_silver.png",
on_use = function(item, user, pointed_thing)
@ -2788,7 +2802,7 @@ minetest.register_node("witchcraft:potion_silver_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_silver.png^[colorize:black:50",
on_use = function(item, user, pointed_thing)
@ -2812,7 +2826,7 @@ minetest.register_node("witchcraft:potion_green", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_green.png",
on_use = function(item, user, pointed_thing)
@ -2860,7 +2874,7 @@ minetest.register_node("witchcraft:potion_green", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_green.png",
on_use = function(item, user, pointed_thing)
@ -2909,7 +2923,7 @@ minetest.register_node("witchcraft:potion_gold", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_gold.png",
on_use = function(item, user, pointed_thing)
@ -2957,7 +2971,7 @@ minetest.register_node("witchcraft:potion_gold_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_gold.png^[colorize:black:50",
on_use = function(item, user, pointed_thing)
@ -3008,7 +3022,7 @@ minetest.register_node("witchcraft:potion_aqua", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_aqua.png",
on_use = function(item, placer, pos)
@ -3053,7 +3067,7 @@ minetest.register_node("witchcraft:potion_aqua", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_aqua.png",
on_use = function(item, placer, pos)
@ -3100,7 +3114,7 @@ minetest.register_node("witchcraft:potion_magenta", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_magenta.png",
on_use = function(item, user, pointed_thing)
@ -3143,7 +3157,7 @@ minetest.register_node("witchcraft:potion_magenta_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_magenta.png^[colorize:black:50",
on_use = function(item, user, pointed_thing)
@ -3186,7 +3200,7 @@ minetest.register_node("witchcraft:potion_cyan", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_cyan.png",
on_use = function(item, user, pointed_thing)
@ -3228,7 +3242,7 @@ minetest.register_node("witchcraft:potion_gcyan", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_gcyan.png",
on_use = function(item, user, pointed_thing)
@ -3269,7 +3283,7 @@ minetest.register_node("witchcraft:potion_cyan_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_cyan.png^[colorize:black:50",
on_use = function(item, user, pointed_thing)
@ -3311,7 +3325,7 @@ minetest.register_node("witchcraft:potion_green2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_green2.png",
on_use = function(item, user, pointed_thing)
@ -3353,7 +3367,7 @@ minetest.register_node("witchcraft:potion_ggreen", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_ggreen.png",
on_use = function(item, user, pointed_thing)
@ -3400,7 +3414,7 @@ minetest.register_node("witchcraft:potion_green2_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_green2.png^[colorize:black:50",
on_use = function(item, user, pointed_thing)
@ -3442,7 +3456,7 @@ minetest.register_node("witchcraft:potion_redbrown", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_redbrown.png",
on_use = function(item, user, pointed_thing)
@ -3484,7 +3498,7 @@ minetest.register_node("witchcraft:potion_redbrown_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_redbrown.png^[colorize:black:50",
on_use = function(item, user, pointed_thing)
@ -3526,7 +3540,7 @@ minetest.register_node("witchcraft:potion_blue2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
groups = {dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_blue2.png",
on_use = function(item, user, pointed_thing)
@ -3570,7 +3584,7 @@ minetest.register_node("witchcraft:potion_blue2_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_blue2.png^[colorize:black:50",
on_use = function(item, user, pointed_thing)
@ -3626,7 +3640,7 @@ minetest.register_node("witchcraft:potion_yellow", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_yellow.png",
on_use = function(item, user, pointed_thing)
@ -3667,7 +3681,7 @@ minetest.register_node("witchcraft:potion_yellow_2", {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
groups = {dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_yellow.png^[colorize:black:50",
on_use = function(item, user, pointed_thing)
@ -3892,3 +3906,5 @@ minetest.register_node("witchcraft:candle", {
dofile(minetest.get_modpath("witchcraft").."/scrolls.lua")
dofile(minetest.get_modpath("witchcraft").."/brewing_stand.lua")
minetest.log("action", "[witchcraft] loaded.")

View File

@ -225,7 +225,7 @@ minetest.register_entity("witchcraft:fireball", {
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
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},
@ -240,7 +240,7 @@ minetest.register_entity("witchcraft:fireball", {
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 n ~= "witchcraft:fireball" and n ~="default:dirt_with_grass" and n ~="default:dirt_with_dry_grass" and n ~="default:stone" and n ~= "gauges:hp_bar" 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()
@ -306,7 +306,7 @@ minetest.register_entity("witchcraft:tree", {
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
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()
local treepos = self.object:getpos()
default.grow_new_jungle_tree(treepos)
@ -320,7 +320,7 @@ minetest.register_entity("witchcraft:tree", {
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
if n ~= "witchcraft:tree" and n ~="air" and n ~= "gauges:hp_bar" then
local treepos = self.object:getpos()
default.grow_new_jungle_tree(treepos)
self.object:remove()
@ -376,7 +376,7 @@ minetest.register_entity("witchcraft:ice", {
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
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},
@ -394,7 +394,7 @@ minetest.register_entity("witchcraft:ice", {
local pos = self.object:getpos()
minetest.set_node(pos, {name="default:ice"})
self.object:remove()
elseif n ~= "air" then
elseif n ~= "air" and n ~= "gauges:hp_bar" then
local velo = self.object:getvelocity()
self.object:setvelocity({x=velo.x*-1, y=velo.y*0, z=velo.z*1})
--self.object:remove()