Misc fixes

This commit is contained in:
Ishaan Bhardwaj 2021-02-24 17:58:50 -05:00
parent 253cd7bf93
commit 5eb310baf3
3 changed files with 11 additions and 3 deletions

View File

@ -8,6 +8,10 @@ BigMemeGame.name = "Big Survival A3"
BigMemeGame.hash = "BigA3" BigMemeGame.hash = "BigA3"
BigMemeGame.tagline = "The blocks are bigger and the speeds are faster!" BigMemeGame.tagline = "The blocks are bigger and the speeds are faster!"
function BigMemeGame:new()
SurvivalA3Game:new()
end
function BigMemeGame:initialize(ruleset) function BigMemeGame:initialize(ruleset)
self.super:initialize(ruleset) self.super:initialize(ruleset)
self.big_mode = true self.big_mode = true

View File

@ -217,9 +217,9 @@ function PAIRS:attemptWallkicks(piece, new_piece, rot_dir, grid)
for idx, offset in pairs(kicks) do for idx, offset in pairs(kicks) do
kicked_piece = new_piece:withOffset(offset) kicked_piece = new_piece:withOffset(offset)
if grid:canPlacePiece(kicked_piece) then if grid:canPlacePiece(kicked_piece) then
self:onPieceRotate(piece, grid)
piece:setRelativeRotation(rot_dir) piece:setRelativeRotation(rot_dir)
piece:setOffset(offset) piece:setOffset(offset)
self:onPieceRotate(piece, grid)
return return
end end
end end
@ -243,6 +243,10 @@ function PAIRS:onPieceDrop(piece, grid)
self:checkNewLow(piece) self:checkNewLow(piece)
end end
function PAIRS:onPieceRotate(piece, grid)
self:checkNewLow(piece)
end
function PAIRS:get180RotationValue() function PAIRS:get180RotationValue()
return 3 return 3
end end

View File

@ -77,9 +77,9 @@ function Tetra:attemptWallkicks(piece, new_piece, rot_dir, grid)
for idx, offset in pairs(kicks) do for idx, offset in pairs(kicks) do
kicked_piece = new_piece:withOffset(offset) kicked_piece = new_piece:withOffset(offset)
if grid:canPlacePiece(kicked_piece) then if grid:canPlacePiece(kicked_piece) then
self:onPieceRotate(piece, grid)
piece:setRelativeRotation(rot_dir) piece:setRelativeRotation(rot_dir)
piece:setOffset(offset) piece:setOffset(offset)
self:onPieceRotate(piece, grid)
return return
end end
end end
@ -99,7 +99,7 @@ end
function Tetra:onPieceCreate(piece) piece.lowest_y = -math.huge end function Tetra:onPieceCreate(piece) piece.lowest_y = -math.huge end
function Tetra:onPieceDrop(piece) self:checkNewLow(piece) end function Tetra:onPieceDrop(piece) self:checkNewLow(piece) end
function Tetra:onPieceMove() end function Tetra:onPieceMove() end
function Tetra:onPieceRotate() end function Tetra:onPieceRotate() self:checkNewLow(piece) end
function Tetra:canPieceRotate() return true end function Tetra:canPieceRotate() return true end
function Tetra:get180RotationValue() return 2 end function Tetra:get180RotationValue() return 2 end