From 7b496d9412c51a1e997fcd4f19c540defe5c1b6b Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Sat, 21 Nov 2020 21:48:45 -0500 Subject: [PATCH] Ti and ACE floorkick fix --- tetris/rulesets/arika_ace.lua | 10 ++++++++-- tetris/rulesets/arika_ace2.lua | 10 ++++++++-- tetris/rulesets/arika_ti.lua | 9 +++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/tetris/rulesets/arika_ace.lua b/tetris/rulesets/arika_ace.lua index 11fd106..d564221 100755 --- a/tetris/rulesets/arika_ace.lua +++ b/tetris/rulesets/arika_ace.lua @@ -163,13 +163,16 @@ end function ARS:onPieceDrop(piece, grid) piece.lock_delay = 0 -- step reset + if piece.floorkick >= 2 and piece:isDropBlocked(grid) then + piece.locked = true + end end function ARS:onPieceMove(piece, grid) piece.lock_delay = 0 -- move reset if piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 - if piece.manipulations >= 127 then + if piece.manipulations >= 128 then piece.locked = true end end @@ -179,10 +182,13 @@ function ARS:onPieceRotate(piece, grid) piece.lock_delay = 0 -- rotate reset if piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 - if piece.manipulations >= 127 then + if piece.manipulations >= 128 then piece.locked = true end end + if piece.floorkick >= 1 then + piece.floorkick = piece.floorkick + 1 + end end function ARS:get180RotationValue() diff --git a/tetris/rulesets/arika_ace2.lua b/tetris/rulesets/arika_ace2.lua index 1214adc..6339a8a 100644 --- a/tetris/rulesets/arika_ace2.lua +++ b/tetris/rulesets/arika_ace2.lua @@ -150,13 +150,16 @@ end function ARS:onPieceDrop(piece, grid) piece.lock_delay = 0 -- step reset + if piece.floorkick >= 2 and piece:isDropBlocked(grid) then + piece.locked = true + end end function ARS:onPieceMove(piece, grid) piece.lock_delay = 0 -- move reset if piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 - if piece.manipulations >= 127 then + if piece.manipulations >= 128 then piece.locked = true end end @@ -166,10 +169,13 @@ function ARS:onPieceRotate(piece, grid) piece.lock_delay = 0 -- rotate reset if piece:isDropBlocked(grid) then piece.manipulations = piece.manipulations + 1 - if piece.manipulations >= 127 then + if piece.manipulations >= 128 then piece.locked = true end end + if piece.floorkick >= 1 then + piece.floorkick = piece.floorkick + 1 + end end function ARS:get180RotationValue() diff --git a/tetris/rulesets/arika_ti.lua b/tetris/rulesets/arika_ti.lua index b9ee192..6244ebf 100644 --- a/tetris/rulesets/arika_ti.lua +++ b/tetris/rulesets/arika_ti.lua @@ -149,6 +149,15 @@ end function ARS:onPieceDrop(piece, grid) piece.lock_delay = 0 -- step reset + if piece.floorkick >= 2 and piece:isDropBlocked(grid) then + piece.locked = true + end +end + +function ARS:onPieceRotate(piece, grid) + if piece.floorkick >= 1 then + piece.floorkick = piece.floorkick + 1 + end end function ARS:get180RotationValue()