Fixed certain rulesets locking in midair

This commit is contained in:
Ishaan Bhardwaj 2020-12-18 21:24:10 -05:00
parent 1101aa467d
commit d3b647ca71
5 changed files with 10 additions and 0 deletions

View File

@ -49,6 +49,7 @@ function ARS:onPieceMove(piece, grid)
if piece:isDropBlocked(grid) then if piece:isDropBlocked(grid) then
piece.manipulations = piece.manipulations + 1 piece.manipulations = piece.manipulations + 1
if piece.manipulations >= 128 then if piece.manipulations >= 128 then
piece:dropToBottom(grid)
piece.locked = true piece.locked = true
end end
end end
@ -59,6 +60,7 @@ function ARS:onPieceRotate(piece, grid)
if piece:isDropBlocked(grid) then if piece:isDropBlocked(grid) then
piece.manipulations = piece.manipulations + 1 piece.manipulations = piece.manipulations + 1
if piece.manipulations >= 128 then if piece.manipulations >= 128 then
piece:dropToBottom(grid)
piece.locked = true piece.locked = true
end end
end end

View File

@ -36,6 +36,7 @@ function ARS:onPieceMove(piece, grid)
if piece:isDropBlocked(grid) then if piece:isDropBlocked(grid) then
piece.manipulations = piece.manipulations + 1 piece.manipulations = piece.manipulations + 1
if piece.manipulations >= 128 then if piece.manipulations >= 128 then
piece:dropToBottom(grid)
piece.locked = true piece.locked = true
end end
end end
@ -46,6 +47,7 @@ function ARS:onPieceRotate(piece, grid)
if piece:isDropBlocked(grid) then if piece:isDropBlocked(grid) then
piece.manipulations = piece.manipulations + 1 piece.manipulations = piece.manipulations + 1
if piece.manipulations >= 128 then if piece.manipulations >= 128 then
piece:dropToBottom(grid)
piece.locked = true piece.locked = true
end end
end end

View File

@ -31,6 +31,7 @@ function SRS:onPieceMove(piece, grid)
if piece:isDropBlocked(grid) then if piece:isDropBlocked(grid) then
piece.manipulations = piece.manipulations + 1 piece.manipulations = piece.manipulations + 1
if piece.manipulations >= 128 then if piece.manipulations >= 128 then
piece:dropToBottom(grid)
piece.locked = true piece.locked = true
end end
end end
@ -41,6 +42,7 @@ function SRS:onPieceRotate(piece, grid)
if piece:isDropBlocked(grid) then if piece:isDropBlocked(grid) then
piece.manipulations = piece.manipulations + 1 piece.manipulations = piece.manipulations + 1
if piece.manipulations >= 128 then if piece.manipulations >= 128 then
piece:dropToBottom(grid)
piece.locked = true piece.locked = true
end end
end end

View File

@ -87,6 +87,7 @@ function SRS:onPieceMove(piece, grid)
if piece:isDropBlocked(grid) then if piece:isDropBlocked(grid) then
piece.manipulations = piece.manipulations + 1 piece.manipulations = piece.manipulations + 1
if piece.manipulations >= 15 then if piece.manipulations >= 15 then
piece:dropToBottom(grid)
piece.locked = true piece.locked = true
end end
end end
@ -98,6 +99,7 @@ function SRS:onPieceRotate(piece, grid)
piece.manipulations = piece.manipulations + 1 piece.manipulations = piece.manipulations + 1
if piece:isDropBlocked(grid) then if piece:isDropBlocked(grid) then
if piece.manipulations >= 15 then if piece.manipulations >= 15 then
piece:dropToBottom(grid)
piece.locked = true piece.locked = true
end end
end end

View File

@ -170,6 +170,7 @@ function SRS:onPieceMove(piece, grid)
if piece:isDropBlocked(grid) then if piece:isDropBlocked(grid) then
piece.manipulations = piece.manipulations + 1 piece.manipulations = piece.manipulations + 1
if piece.manipulations >= 10 then if piece.manipulations >= 10 then
piece:dropToBottom(grid)
piece.locked = true piece.locked = true
end end
end end
@ -180,6 +181,7 @@ function SRS:onPieceRotate(piece, grid)
if piece:isDropBlocked(grid) then if piece:isDropBlocked(grid) then
piece.rotations = piece.rotations + 1 piece.rotations = piece.rotations + 1
if piece.rotations >= 8 then if piece.rotations >= 8 then
piece:dropToBottom(grid)
piece.locked = true piece.locked = true
end end
end end