From a4b7a41a1556685bf7bd7f8764fcffedd40f0a24 Mon Sep 17 00:00:00 2001 From: Joe Zeng Date: Tue, 11 Apr 2023 12:18:11 -0400 Subject: [PATCH] Changed the Phantom Mania non-N requirement back to automatic GM at 999. (Only N should have the 31-tetris rule.) --- load/version.lua | 2 +- tetris/modes/phantom_mania.lua | 12 +++++------- tetris/modes/phantom_mania_n.lua | 10 ++++++++++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/load/version.lua b/load/version.lua index 0328391..8812b23 100644 --- a/load/version.lua +++ b/load/version.lua @@ -1 +1 @@ -version = "v0.3.1" \ No newline at end of file +version = "v0.3.2" \ No newline at end of file diff --git a/tetris/modes/phantom_mania.lua b/tetris/modes/phantom_mania.lua index 5bab937..72ba5b2 100644 --- a/tetris/modes/phantom_mania.lua +++ b/tetris/modes/phantom_mania.lua @@ -28,7 +28,6 @@ function PhantomManiaGame:new() self.combo = 1 self.tetrises = 0 self.section_tetrises = {[0] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - self.section_req = true self.randomizer = History6RollsRandomizer() end @@ -120,11 +119,6 @@ function PhantomManiaGame:onLineClear(cleared_row_count) self.level = 999 end self.clear = true - for i = 0, 9 do - if self.section_tetrises[i] < (i == 9 and 1 or 2) then - self.section_req = false - end - end else self.level = new_level end @@ -175,6 +169,10 @@ local function getLetterGrade(level, clear) end end +function PhantomManiaGame:qualifiesForGM() + return true +end + function PhantomManiaGame:drawScoringInfo() PhantomManiaGame.super.drawScoringInfo(self) @@ -195,7 +193,7 @@ function PhantomManiaGame:drawScoringInfo() if getLetterGrade(self.level, self.clear) ~= "" then if self.roll_frames > 1982 then love.graphics.setColor(1, 0.5, 0, 1) elseif self.level == 999 and self.clear then love.graphics.setColor(0, 1, 0, 1) end - if self.level == 999 and self.section_req and self.tetrises >= 31 then + if self.level == 999 and self:qualifiesForGM() then love.graphics.printf("GM", text_x, 140, 90, "left") else love.graphics.printf(getLetterGrade(self.level, self.clear), text_x, 140, 90, "left") diff --git a/tetris/modes/phantom_mania_n.lua b/tetris/modes/phantom_mania_n.lua index c063745..74b026a 100644 --- a/tetris/modes/phantom_mania_n.lua +++ b/tetris/modes/phantom_mania_n.lua @@ -13,4 +13,14 @@ function PhantomManiaNGame:new() self.enable_hold = true end +function PhantomManiaNGame:qualifiesForGM() + if self.tetrises < 31 then return false end + for i = 0, 9 do + if self.section_tetrises[i] < (i == 9 and 1 or 2) then + return false + end + end + return true +end + return PhantomManiaNGame