From a33ca1af247272b1c8ccbdd393ca8848f35f23c3 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Thu, 14 Jan 2021 19:34:02 -0500 Subject: [PATCH] Fixed a bug where you could not get M-roll in A2 --- tetris/modes/gamemode.lua | 8 ++------ tetris/modes/marathon_a2.lua | 3 +++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 071a6fc..24a7823 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -108,14 +108,10 @@ function GameMode:initialize(ruleset, secret_inputs) end function GameMode:update(inputs, ruleset) - if self.game_over then - self.game_over_frames = self.game_over_frames + 1 - if self.game_over_frames >= 60 then - self.completed = true - end + if self.game_over or self.completed then + self:onGameOver() return end - if self.completed then return end if config.gamesettings.diagonal_input == 2 then if inputs["left"] or inputs["right"] then diff --git a/tetris/modes/marathon_a2.lua b/tetris/modes/marathon_a2.lua index e0847fa..423b6fa 100644 --- a/tetris/modes/marathon_a2.lua +++ b/tetris/modes/marathon_a2.lua @@ -130,6 +130,9 @@ end function MarathonA2Game:updateScore(level, drop_bonus, cleared_lines) if not self.clear then self:updateGrade(cleared_lines) + if cleared_lines >= 4 then + self.tetris_requirements[math.floor(level / 100)] = self.tetris_requirements[math.floor(level / 100)] + 1 + end if self.grid:checkForBravo(cleared_lines) then self.bravo = 4 else self.bravo = 1 end if cleared_lines > 0 then self.combo = self.combo + (cleared_lines - 1) * 2