From 901f7f2d12b21f85477514730747c0a9d83b1d08 Mon Sep 17 00:00:00 2001 From: Joe Z Date: Fri, 21 Jun 2019 23:52:33 -0400 Subject: [PATCH] Fixed a bug in the "actual cleared row count" for Big Mode. --- docs/rulesets.md | 2 +- tetris/modes/gamemode.lua | 4 ++++ tetris/modes/phantom_mania2.lua | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/rulesets.md b/docs/rulesets.md index ef4a27e..9dee5f3 100644 --- a/docs/rulesets.md +++ b/docs/rulesets.md @@ -19,4 +19,4 @@ There are six rulesets currently supported: * ARS - the rotation system from the original Tetris the Grand Master. * Ti-ARS - ARS with floorkicks! From TGM3: Terror Instinct. -* Ace-ARS - ARS with floorkicks and move reset! \ No newline at end of file +* Ace-ARS - ARS with floorkicks and move reset! From TGM ACE. \ No newline at end of file diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 9b6ec38..ad73f75 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -152,6 +152,10 @@ function GameMode:update(inputs, ruleset) local cleared_row_count = self.grid:getClearedRowCount() + if self.big_mode then + cleared_row_count = cleared_row_count / 2 + end + self:onPieceLock(self.piece, cleared_row_count) self:updateScore(self.level, self.drop_bonus, cleared_row_count) diff --git a/tetris/modes/phantom_mania2.lua b/tetris/modes/phantom_mania2.lua index 2626250..2ceced8 100644 --- a/tetris/modes/phantom_mania2.lua +++ b/tetris/modes/phantom_mania2.lua @@ -156,7 +156,7 @@ function PhantomMania2Game:onLineClear(cleared_row_count) end self:advanceBottomRow(-cleared_row_count) else - self.roll_points = self.roll_points + cleared_row_points[cleared_row_count / 2] + self.roll_points = self.roll_points + cleared_row_points[cleared_row_count] if self.roll_points >= 100 then self.roll_points = self.roll_points - 100 self.grade = self.grade + 1 @@ -234,7 +234,7 @@ PhantomMania2Game.garbageOpacityFunction = function(age) end function PhantomMania2Game:drawGrid() - if not (self.game_over or (self.clear and self.level < 1300)) then + if not (self.game_over) then self.grid:drawInvisible(self.rollOpacityFunction, self.garbageOpacityFunction) else self.grid:draw()