New lock delay curve for Square

This commit is contained in:
Ishaan Bhardwaj 2021-02-04 10:38:00 -05:00 committed by GitHub
parent a820798e13
commit 44d0605fb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,8 +38,7 @@ function SquareMode:getGravity()
end end
function SquareMode:getLockDelay() function SquareMode:getLockDelay()
if self:getGravity() <= 20 then return 30 return math.ceil(30 * 0.9998 ^ self.lines)
else return 30 - math.log(self:getGravity() - 20) end
end end
function SquareMode:advanceOneFrame() function SquareMode:advanceOneFrame()
@ -97,4 +96,4 @@ function SquareMode:getBackground()
return math.floor(self.lines / 100) % 20 return math.floor(self.lines / 100) % 20
end end
return SquareMode return SquareMode