From bade67bef7f7f047f5f2c68fd878d13dce0a3e1d Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj <59454579+SashLilac@users.noreply.github.com> Date: Thu, 12 Nov 2020 16:26:50 -0500 Subject: [PATCH] Hopefully last fix to C88 --- tetris/modes/marathon_c88.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tetris/modes/marathon_c88.lua b/tetris/modes/marathon_c88.lua index a12377c..f1f141e 100644 --- a/tetris/modes/marathon_c88.lua +++ b/tetris/modes/marathon_c88.lua @@ -92,7 +92,7 @@ function MarathonC88Game:updateScore(level, drop_bonus, cleared_lines) self.score = self.score + score_table[cleared_lines] * 100 * self:getScoreMultiplier() * bravo self.level_lines = self.level_lines + cleared_lines self.lines = self.lines + cleared_lines - self.line_clears = self.line_clears + 1 + if (cleared_lines >= 1) then self.line_clears = self.line_clears + 1 end if (cleared_lines == 4) then self.tetrises = self.tetrises + 1 end if (cleared_lines == 0 and self.level_timer >= self:getLevelTimerLimit()) or (self.level_lines >= 4) then self.level = self.level + 1 @@ -115,14 +115,13 @@ function MarathonC88Game:drawGrid() end function MarathonC88Game:drawScoringInfo() - MarathonC88Game.super.drawScoringInfo(self) love.graphics.setColor(1, 1, 1, 1) love.graphics.setFont(font_3x5_2) love.graphics.print( self.das.direction .. " " .. self.das.frames .. " " .. - math.floor(self.tetrises / self.line_clears) .. "% " .. + (self.line_clears ~= 0 and math.floor(self.tetrises * 100 / self.line_clears) or 0) .. "% " .. strTrueValues(self.prev_inputs) ) love.graphics.printf("NEXT", 64, 40, 40, "left")