diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index aa38125..bd63f6a 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -627,6 +627,7 @@ function GameMode:sectionColourFunction(section) end function GameMode:drawSectionTimesWithSecondary(current_section, section_limit) + section_limit = section_limit or math.huge local section_x = 530 local section_secondary_x = 440 diff --git a/tetris/modes/marathon_2020.lua b/tetris/modes/marathon_2020.lua index f192f6f..4ebeba3 100644 --- a/tetris/modes/marathon_2020.lua +++ b/tetris/modes/marathon_2020.lua @@ -256,8 +256,10 @@ end local function getSectionForLevel(level) if level < 2001 then return math.floor(level / 100) + 1 - else + elseif level < 2020 then return 20 + else + return 21 end end @@ -442,7 +444,7 @@ function Marathon2020Game:drawScoringInfo() love.graphics.printf("GRADE PTS.", text_x, 200, 90, "left") love.graphics.printf("LEVEL", text_x, 320, 40, "left") - self:drawSectionTimesWithSecondary(current_section) + self:drawSectionTimesWithSecondary(current_section, 20) if (self.cool_timer > 0) then love.graphics.printf("COOL!!", 64, 400, 160, "center") diff --git a/tetris/modes/marathon_a2.lua b/tetris/modes/marathon_a2.lua index 5b9a30b..29115fd 100644 --- a/tetris/modes/marathon_a2.lua +++ b/tetris/modes/marathon_a2.lua @@ -122,14 +122,6 @@ function MarathonA2Game:advanceOneFrame() return true end -function MarathonA2Game:whilePieceActive() - self.grade_point_decay_counter = self.grade_point_decay_counter + 1 - if self.grade_point_decay_counter >= grade_point_decays[self.grade + 1] then - self.grade_point_decay_counter = 0 - self.grade_points = math.max(0, self.grade_points - 1) - end -end - function MarathonA2Game:onPieceEnter() if (self.level % 100 ~= 99 and self.level ~= 998) and not self.clear and self.frames ~= 0 then self.level = self.level + 1 @@ -247,6 +239,14 @@ local grade_conversion = { 17, 18, 19 } +function MarathonA2Game:whilePieceActive() + self.grade_point_decay_counter = self.grade_point_decay_counter + 1 + if self.grade_point_decay_counter >= grade_point_decays[self.grade + 1] then + self.grade_point_decay_counter = 0 + self.grade_points = math.max(0, self.grade_points - 1) + end +end + function MarathonA2Game:updateGrade(cleared_lines) if self.clear or cleared_lines == 0 then return else diff --git a/tetris/modes/marathon_a3.lua b/tetris/modes/marathon_a3.lua index e1dd85c..dffde93 100644 --- a/tetris/modes/marathon_a3.lua +++ b/tetris/modes/marathon_a3.lua @@ -147,14 +147,6 @@ function MarathonA3Game:advanceOneFrame() return true end -function MarathonA3Game:whilePieceActive() - self.grade_point_decay_counter = self.grade_point_decay_counter + 1 - if self.grade_point_decay_counter >= grade_point_decays[self.grade + 1] then - self.grade_point_decay_counter = 0 - self.grade_points = math.max(0, self.grade_points - 1) - end -end - function MarathonA3Game:onPieceEnter() if (self.level % 100 ~= 99) and self.level ~= 998 and self.frames ~= 0 then self:updateSectionTimes(self.level, self.level + 1) @@ -321,6 +313,14 @@ local grade_conversion = { 17 } +function MarathonA3Game:whilePieceActive() + self.grade_point_decay_counter = self.grade_point_decay_counter + 1 + if self.grade_point_decay_counter >= grade_point_decays[self.grade + 1] then + self.grade_point_decay_counter = 0 + self.grade_points = math.max(0, self.grade_points - 1) + end +end + function MarathonA3Game:updateGrade(cleared_lines) if cleared_lines == 0 then return else