From e8e303ddc29ca2a4ab92fc24e453114ca3dd597b Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj <59454579+SashLilac@users.noreply.github.com> Date: Thu, 12 Nov 2020 13:19:15 -0500 Subject: [PATCH] Fixed CK to fix game over on fading torikan --- tetris/modes/ck.lua | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tetris/modes/ck.lua b/tetris/modes/ck.lua index da755b8..f117fa5 100644 --- a/tetris/modes/ck.lua +++ b/tetris/modes/ck.lua @@ -215,16 +215,17 @@ function SurvivalCKGame:advanceBottomRow(dx) end function SurvivalCKGame:drawGrid() - if self.level >= 1500 and self.level < 1600 then - self.grid:drawInvisible(self.rollOpacityFunction1) - elseif self.level >= 1600 and self.level < 1700 then - self.grid:drawInvisible(self.rollOpacityFunction2) - elseif self.level >= 1700 and self.level < 1800 then - self.grid:drawInvisible(self.rollOpacityFunction3) - elseif self.level >= 1800 and self.level < 1900 then - self.grid:drawInvisible(self.rollOpacityFunction4) - elseif self.level >= 1900 and self.level < 2000 then - self.grid:drawInvisible(self.rollOpacityFunction5) + if not (self.completed or self.game_over) + if self.level >= 1500 and self.level < 1600 then + self.grid:drawInvisible(self.rollOpacityFunction1) + elseif self.level >= 1600 and self.level < 1700 then + self.grid:drawInvisible(self.rollOpacityFunction2) + elseif self.level >= 1700 and self.level < 1800 then + self.grid:drawInvisible(self.rollOpacityFunction3) + elseif self.level >= 1800 and self.level < 1900 then + self.grid:drawInvisible(self.rollOpacityFunction4) + elseif self.level >= 1900 and self.level < 2000 then + self.grid:drawInvisible(self.rollOpacityFunction5) else self.grid:draw() end