From 9b89c4d1de32f991db7072a2acf67efbd2a0ef3f Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Mon, 2 Nov 2020 21:17:13 -0500 Subject: [PATCH] G/O line fix --- tetris/modes/marathon_a2.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tetris/modes/marathon_a2.lua b/tetris/modes/marathon_a2.lua index 9e34d75..9703b3c 100644 --- a/tetris/modes/marathon_a2.lua +++ b/tetris/modes/marathon_a2.lua @@ -16,7 +16,7 @@ MarathonA2Game.tagline = "The points don't matter! Can you reach the invisible r function MarathonA2Game:new() MarathonA2Game.super:new() - + self.roll_frames = 0 self.combo = 1 self.randomizer = History6RollsRandomizer() @@ -143,6 +143,16 @@ function MarathonA2Game:updateScore(level, drop_bonus, cleared_lines) else self.lines = self.lines + cleared_lines end end +function MarathonA2Game:onLineClear(cleared_row_count) + self.level = math.min(self.level + cleared_row_count, 999) + if self.level == 999 and not self.clear then + self.clear = true + self.grid:clear() + if self:qualifiesForMRoll() then self.grade = 32 end + self.roll_frames = -150 + end +end + function MarathonA2Game:updateSectionTimes(old_level, new_level) if self.clear then return end if math.floor(old_level / 100) < math.floor(new_level / 100) or @@ -267,7 +277,7 @@ function MarathonA2Game:qualifiesForMRoll() return false end end - if self.grade < 17 or self.frames > frameTime(8,45) then + if self.grade < 31 or self.frames > frameTime(8,45) then return false end return true