Correction du lancé de sorts pour les parchemins

Changement d'un ingrédient de potion : lilypad remplace waterlily
This commit is contained in:
sys4-fr 2018-11-02 21:36:54 +01:00
parent dd3a7d13c7
commit 8bf04f444e
2 changed files with 9 additions and 9 deletions

View File

@ -552,7 +552,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 +574,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"},

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()
@ -423,4 +423,4 @@ minetest.register_entity("witchcraft:ice", {
)
end
end
})
})