From 21f87692288062f74449dc79da034956dc26882a Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Fri, 20 Nov 2020 11:29:46 -0500 Subject: [PATCH] Made ARE canceling also cancel LCD --- tetris/modes/gamemode.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index b6ef5ae..230e866 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -270,6 +270,18 @@ function GameMode:processDelays(inputs, ruleset, drop_speed) end elseif self.lcd > 0 then self.lcd = self.lcd - 1 + if ruleset.are_cancel and + (self.move == "none" and + not self.prev_inputs["rotate_left"] and not self.prev_inputs["rotate_left2"] and + not self.prev_inputs["rotate_right"] and not self.prev_inputs["rotate_right2"] and + not self.prev_inputs["rotate_180"]) and + (inputs["left"] or inputs["right"] or + inputs["rotate_left"] or inputs["rotate_left2"] or + inputs["rotate_right"] or inputs["rotate_right2"] or + inputs["rotate_180"]) then + self.lcd = 0 + self.are = 0 + end if self.lcd == 0 then self.grid:clearClearedRows() playSE("fall")