From 12a6f421986b506ddbc8ea858cf1015f746f0666 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Sun, 11 Oct 2020 15:46:34 -0400 Subject: [PATCH] Revert "Fixing step reset" - didn't realize infinite floorkicks This reverts commit 0c317d9ce1cc4cddc2bb2e7de6067aebe15aa7a4. --- tetris/rulesets/arika_ace.lua | 1 - tetris/rulesets/arika_srs.lua | 1 - tetris/rulesets/standard_exp.lua | 12 ++++++------ tetris/rulesets/ti_srs.lua | 1 - 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/tetris/rulesets/arika_ace.lua b/tetris/rulesets/arika_ace.lua index a87a83b..3c2801f 100755 --- a/tetris/rulesets/arika_ace.lua +++ b/tetris/rulesets/arika_ace.lua @@ -150,7 +150,6 @@ end function ARS:onPieceDrop(piece, grid) piece.lock_delay = 0 -- step reset - piece.manipulations = 0 end function ARS:onPieceMove(piece, grid) diff --git a/tetris/rulesets/arika_srs.lua b/tetris/rulesets/arika_srs.lua index d9cec49..0c99113 100755 --- a/tetris/rulesets/arika_srs.lua +++ b/tetris/rulesets/arika_srs.lua @@ -164,7 +164,6 @@ end function SRS:onPieceDrop(piece, grid) piece.lock_delay = 0 -- step reset - piece.manipulations = 0 end function SRS:onPieceMove(piece, grid) diff --git a/tetris/rulesets/standard_exp.lua b/tetris/rulesets/standard_exp.lua index 9d6afb3..98fea77 100755 --- a/tetris/rulesets/standard_exp.lua +++ b/tetris/rulesets/standard_exp.lua @@ -159,19 +159,19 @@ function SRS:attemptWallkicks(piece, new_piece, rot_dir, grid) end function SRS:onPieceCreate(piece, grid) - piece.manipulations = 0 + piece.rotate_counter = 0 + piece.move_counter = 0 end function SRS:onPieceDrop(piece, grid) piece.lock_delay = 0 -- step reset - piece.manipulations = 0 end function SRS:onPieceMove(piece, grid) piece.lock_delay = 0 -- move reset if piece:isDropBlocked(grid) then - piece.manipulations = piece.manipulations + 1 - if piece.manipulations >= 15 then + piece.move_counter = piece.move_counter + 1 + if piece.move_counter >= 24 then piece.locked = true end end @@ -180,8 +180,8 @@ end function SRS:onPieceRotate(piece, grid) piece.lock_delay = 0 -- rotate reset if piece:isDropBlocked(grid) then - piece.manipulations = piece.manipulations + 1 - if piece.manipulations >= 15 then + piece.rotate_counter = piece.rotate_counter + 1 + if piece.rotate_counter >= 12 then piece.locked = true end end diff --git a/tetris/rulesets/ti_srs.lua b/tetris/rulesets/ti_srs.lua index 61f965c..4caff19 100644 --- a/tetris/rulesets/ti_srs.lua +++ b/tetris/rulesets/ti_srs.lua @@ -164,7 +164,6 @@ end function SRS:onPieceDrop(piece, grid) piece.lock_delay = 0 -- step reset - piece.manipulations = 0 end function SRS:onPieceMove(piece, grid)