# HG changeset patch # User silverwing # Date 2017-09-09 09:15:17 # Node ID 2b0b0271ccb05395f8b81622b874672e92a38b25 # Parent 08bed57892a38937234dc013e5dc22a004ebdbca fix: dice game diff --git a/london_dice.lua b/london_dice.lua --- a/london_dice.lua +++ b/london_dice.lua @@ -35,6 +35,8 @@ dice_game = room { }; player_turn = function(s) if s.turn and (s.player_pts >= 100 or s.enemy_pts >= 100) then + timer:stop(); + game.timer = nil; if s.player_pts >= 100 and s.enemy_pts >= 100 then walk(s.draw); elseif s.player_pts >= 100 then @@ -52,6 +54,8 @@ dice_game = room { end; enemy_turn = function(s) if not s.turn and (s.player_pts >= 100 or s.enemy_pts >= 100) then + timer:stop(); + game.timer = nil; if s.player_pts >= 100 and s.enemy_pts >= 100 then walk(s.draw); elseif s.player_pts >= 100 then @@ -155,6 +159,6 @@ dice_game_win = cutscene("dice_game_win", "Игра в кости", [[Человек вручает вам сумму выигрыша: "Поздравляю, вы выиграли! Сыграем еще?"]], "port_street", function() pl.money = pl.money + dice_game.stake; end); -dice_game_lose = cutscene("dice_game_lose", "Игра в кости", [[Человек довольно потирает руки и прячет в карман ваши деньги: "В следующий раз вам повезет. Может сыграем еще?"]], function() +dice_game_lose = cutscene("dice_game_lose", "Игра в кости", [[Человек довольно потирает руки и прячет в карман ваши деньги: "В следующий раз вам повезет. Может сыграем еще?"]], "port_street", function() pl.money = pl.money - dice_game.stake; end); \ No newline at end of file