mirror of
https://github.com/SashLilac/cambridge.git
synced 2025-04-19 21:12:55 -05:00
I realized that playing at 4/8 for 800 levels straight is probably too much, so I made it that only the first 10 sections count for advancing the delay curve faster than it would normally go. Now only the last 500 levels can be at delay level 20.
30 lines
689 B
Lua
30 lines
689 B
Lua
local Standard = require 'tetris.rulesets.standard'
|
|
|
|
local SRS = Standard:extend()
|
|
|
|
SRS.name = "Ti-SRS"
|
|
SRS.hash = "StandardTI"
|
|
|
|
function SRS:onPieceMove(piece, grid)
|
|
piece.lock_delay = 0 -- move reset
|
|
if piece:isDropBlocked(grid) then
|
|
piece.move_counter = piece.move_counter + 1
|
|
if piece.move_counter >= 10 then
|
|
piece.locked = true
|
|
end
|
|
end
|
|
end
|
|
|
|
function SRS:onPieceRotate(piece, grid)
|
|
piece.lock_delay = 0 -- rotate reset
|
|
if piece:isDropBlocked(grid) then
|
|
piece.rotate_counter = piece.rotate_counter + 1
|
|
if piece.rotate_counter >= 8 then
|
|
piece.locked = true
|
|
end
|
|
end
|
|
end
|
|
|
|
function SRS:get180RotationValue() return config["reverse_rotate"] and 1 or 3 end
|
|
|
|
return SRS |