From 1d73916b7c6bf7d7b7d4ee964e6e6d863889e568 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Wed, 17 Feb 2021 18:29:14 -0500 Subject: [PATCH] Arika-SRS rulesets no longer lock immediately --- tetris/rulesets/arika_srs.lua | 2 +- tetris/rulesets/standard_exp.lua | 2 +- tetris/rulesets/ti_srs.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tetris/rulesets/arika_srs.lua b/tetris/rulesets/arika_srs.lua index 80b5d01..784c23d 100755 --- a/tetris/rulesets/arika_srs.lua +++ b/tetris/rulesets/arika_srs.lua @@ -25,7 +25,7 @@ function SRS:onPieceRotate(piece, grid, upward) piece.lock_delay = 0 -- rotate reset if upward or piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 - if piece:isDropBlocked(grid) then + if piece.manipulations >= self.MANIPULATIONS_MAX and piece:isDropBlocked(grid) then piece.locked = true end end diff --git a/tetris/rulesets/standard_exp.lua b/tetris/rulesets/standard_exp.lua index a466884..b36192a 100755 --- a/tetris/rulesets/standard_exp.lua +++ b/tetris/rulesets/standard_exp.lua @@ -93,7 +93,7 @@ function SRS:onPieceRotate(piece, grid, upward) piece.lock_delay = 0 -- rotate reset if upward or piece:isDropBlocked(grid) then piece.rotations = piece.rotations + 1 - if piece:isDropBlocked(grid) then + if piece.rotations >= self.ROTATIONS_MAX and piece:isDropBlocked(grid) then piece.locked = true end end diff --git a/tetris/rulesets/ti_srs.lua b/tetris/rulesets/ti_srs.lua index 328bba6..425ad2b 100644 --- a/tetris/rulesets/ti_srs.lua +++ b/tetris/rulesets/ti_srs.lua @@ -186,7 +186,7 @@ function SRS:onPieceRotate(piece, grid, upward) piece.lock_delay = 0 -- rotate reset if upward or piece:isDropBlocked(grid) then piece.rotations = piece.rotations + 1 - if piece:isDropBlocked(grid) then + if piece.rotations >= self.ROTATIONS_MAX and piece:isDropBlocked(grid) then piece.locked = true end end