From d3b647ca71e95770d4ac0f83156dbe951cf62a07 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Fri, 18 Dec 2020 21:24:10 -0500 Subject: [PATCH] Fixed certain rulesets locking in midair --- tetris/rulesets/arika_ace.lua | 2 ++ tetris/rulesets/arika_ace2.lua | 2 ++ tetris/rulesets/arika_srs.lua | 2 ++ tetris/rulesets/standard_exp.lua | 2 ++ tetris/rulesets/ti_srs.lua | 2 ++ 5 files changed, 10 insertions(+) diff --git a/tetris/rulesets/arika_ace.lua b/tetris/rulesets/arika_ace.lua index ee5e602..a83d258 100755 --- a/tetris/rulesets/arika_ace.lua +++ b/tetris/rulesets/arika_ace.lua @@ -49,6 +49,7 @@ function ARS:onPieceMove(piece, grid) if piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 if piece.manipulations >= 128 then + piece:dropToBottom(grid) piece.locked = true end end @@ -59,6 +60,7 @@ function ARS:onPieceRotate(piece, grid) if piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 if piece.manipulations >= 128 then + piece:dropToBottom(grid) piece.locked = true end end diff --git a/tetris/rulesets/arika_ace2.lua b/tetris/rulesets/arika_ace2.lua index fb797ae..3f7da85 100644 --- a/tetris/rulesets/arika_ace2.lua +++ b/tetris/rulesets/arika_ace2.lua @@ -36,6 +36,7 @@ function ARS:onPieceMove(piece, grid) if piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 if piece.manipulations >= 128 then + piece:dropToBottom(grid) piece.locked = true end end @@ -46,6 +47,7 @@ function ARS:onPieceRotate(piece, grid) if piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 if piece.manipulations >= 128 then + piece:dropToBottom(grid) piece.locked = true end end diff --git a/tetris/rulesets/arika_srs.lua b/tetris/rulesets/arika_srs.lua index 323bc3c..062e335 100755 --- a/tetris/rulesets/arika_srs.lua +++ b/tetris/rulesets/arika_srs.lua @@ -31,6 +31,7 @@ function SRS:onPieceMove(piece, grid) if piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 if piece.manipulations >= 128 then + piece:dropToBottom(grid) piece.locked = true end end @@ -41,6 +42,7 @@ function SRS:onPieceRotate(piece, grid) if piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 if piece.manipulations >= 128 then + piece:dropToBottom(grid) piece.locked = true end end diff --git a/tetris/rulesets/standard_exp.lua b/tetris/rulesets/standard_exp.lua index e07b4f3..ff62db8 100755 --- a/tetris/rulesets/standard_exp.lua +++ b/tetris/rulesets/standard_exp.lua @@ -87,6 +87,7 @@ function SRS:onPieceMove(piece, grid) if piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 if piece.manipulations >= 15 then + piece:dropToBottom(grid) piece.locked = true end end @@ -98,6 +99,7 @@ function SRS:onPieceRotate(piece, grid) piece.manipulations = piece.manipulations + 1 if piece:isDropBlocked(grid) then if piece.manipulations >= 15 then + piece:dropToBottom(grid) piece.locked = true end end diff --git a/tetris/rulesets/ti_srs.lua b/tetris/rulesets/ti_srs.lua index 130d8fa..2fbe90b 100644 --- a/tetris/rulesets/ti_srs.lua +++ b/tetris/rulesets/ti_srs.lua @@ -170,6 +170,7 @@ function SRS:onPieceMove(piece, grid) if piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 if piece.manipulations >= 10 then + piece:dropToBottom(grid) piece.locked = true end end @@ -180,6 +181,7 @@ function SRS:onPieceRotate(piece, grid) if piece:isDropBlocked(grid) then piece.rotations = piece.rotations + 1 if piece.rotations >= 8 then + piece:dropToBottom(grid) piece.locked = true end end