added doors
This commit is contained in:
parent
d254ad8cfc
commit
5f4832ece8
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user