added doors

This commit is contained in:
cale 2016-08-31 09:49:51 +02:00
parent d254ad8cfc
commit 5f4832ece8

View File

@ -37,11 +37,15 @@ function mobs.register_mob(name, def)
if self.object:get_hp() <= 0 then
if player and player:is_player() then
xp.add_xp(player, def.xp or xp.get_xp(def.lvl, 10))
if math.random(0,20) == 10 then
minetest.spawn_item(self.object:getpos(),"potions:upgrading")
else
if def.drops then
minetest.spawn_item(self.object:getpos(), def.drops[math.random(1, #def.drops)])
else
minetest.spawn_item(self.object:getpos(), "money:silver_coin")
end
end
mobs.count = mobs.count - 1
self.object:remove()
end