From 5c538153ba1fe2fe8ad8121f0875c0d0dd1cb2d1 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj <59454579+SashLilac@users.noreply.github.com> Date: Thu, 12 Nov 2020 16:07:11 -0500 Subject: [PATCH] QoL changes to SegaTet --- tetris/modes/marathon_c88.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tetris/modes/marathon_c88.lua b/tetris/modes/marathon_c88.lua index db027fb..9f1ad24 100644 --- a/tetris/modes/marathon_c88.lua +++ b/tetris/modes/marathon_c88.lua @@ -17,6 +17,8 @@ function MarathonC88Game:new() self.level_timer = 0 self.level_lines = 0 self.last_cleared = 0 + self.tetrises = 0 + self.line_clears = 0 self.randomizer = SegaRandomizer() @@ -90,6 +92,8 @@ 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 == 4) then self.tetrises = self.tetrises + 1 if (cleared_lines == 0 and self.level_timer >= self:getLevelTimerLimit()) or (self.level_lines >= 4) then self.level = self.level + 1 self.level_lines = 0 @@ -118,6 +122,7 @@ function MarathonC88Game:drawScoringInfo() love.graphics.print( self.das.direction .. " " .. self.das.frames .. " " .. + math.floor(self.tetrises / self.line_clears) .. "% " .. strTrueValues(self.prev_inputs) ) love.graphics.printf("NEXT", 64, 40, 40, "left") @@ -126,7 +131,9 @@ function MarathonC88Game:drawScoringInfo() love.graphics.printf("LEVEL", 240, 280, 40, "left") love.graphics.setFont(font_3x5_3) + if self.score >= 999999 then love.graphics.setColor(1, 1, 0, 1) end love.graphics.printf(self.score, 240, 140, 90, "left") + love.graphics.setColor(1, 1, 1, 1) love.graphics.printf(self.lines, 240, 220, 90, "left") love.graphics.printf(self.level, 240, 300, 90, "left")