mirror of
https://github.com/D00Med/witchcraft.git
synced 2025-06-30 15:10:46 +02:00
Correction du lancé de sorts pour les parchemins
Changement d'un ingrédient de potion : lilypad remplace waterlily
This commit is contained in:
14
scrolls.lua
14
scrolls.lua
@ -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
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user