cambridge/tetris/rulesets/standard_ti.lua
Joe Z 35f4aea67d Added Ti-SRS and modified delay curve behaviour on Marathon 2020.
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.
2019-06-21 23:44:58 -04:00

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