diff options
author | Fernando Carmona Varo <ferkiwi@gmail.com> | 2015-10-28 00:03:28 +0100 |
---|---|---|
committer | Fernando Carmona Varo <ferkiwi@gmail.com> | 2015-10-28 00:03:28 +0100 |
commit | 4c03a0e5880e44e920007ead8212025858a1fb21 (patch) | |
tree | 20e7ec370ea0f95a93d2402e7f897e09729a7966 /mario/turtle.lua | |
parent | 3eb0d44c20383a1c3d0fe4552b169b223010a46e (diff) | |
parent | 55ba62165293b6bf8f3f78e2e5fc3bb5152400f4 (diff) |
Merge branch 'master' of https://github.com/DonBatman/myarcade
Conflicts:
mario/gamestate.lua
mario/hud.lua
mario/init.lua
Diffstat (limited to 'mario/turtle.lua')
-rw-r--r-- | mario/turtle.lua | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/mario/turtle.lua b/mario/turtle.lua index ef9a624..546123f 100644 --- a/mario/turtle.lua +++ b/mario/turtle.lua @@ -104,16 +104,7 @@ for i in ipairs(turtles) do if distance < 1.5 then -- player touches ghost!! - if gamestate.power_pellet then - -- Player eats ghost! move it to spawn - local ghost_spawn = vector.add(gamestate.pos, {x=13,y=0.5,z=19}) - self.object:setpos(ghost_spawn) - -- set the timer negative so it'll have to wait extra time - self.timer = -ghosts_death_delay - -- play sound and reward player - minetest.sound_play("mario_eatghost", {pos = boardcenter,max_hear_distance = 6, object=player, loop=false}) - player:get_inventory():add_item('main', 'mario:cherrys') - else + -- Ghost catches the player! gamestate.lives = gamestate.lives - 1 if gamestate.lives < 1 then @@ -128,8 +119,10 @@ for i in ipairs(turtles) do minetest.chat_send_player(gamestate.player_name,"You have ".. gamestate.lives .." lives left") mario.game_reset(self.gameid, player) end - end + --end mario.update_hud(self.gameid, player) + + else local vec = {x=p.x-s.x, y=p.y-s.y, z=p.z-s.z} |