DTET + Joker updates

pull/4/head
Ishaan Bhardwaj 2021-01-09 11:21:14 -05:00
parent 0b620e212e
commit 8d77fd6400
2 changed files with 33 additions and 4 deletions

View File

@ -33,8 +33,13 @@ function JokerGame:getARE()
else return math.max(math.ceil(20 - (self.level - 200) / 7), 5) end
end
function JokerGame:getLineARE() return self:getARE() end
function JokerGame:getDasLimit() return 6 end
function JokerGame:getLineARE()
return self:getARE()
end
function JokerGame:getDasLimit()
return 6
end
function JokerGame:getARR()
return rush and 0 or 1
@ -65,6 +70,31 @@ function JokerGame:advanceOneFrame(inputs, ruleset)
return true
end
function JokerGame:onPieceEnter()
-- The Initial Movement System, pioneered by DTET
if self.grid:canPlacePiece(self.piece) then
if self.das.direction == "left" then
for i = 1, 10 do
local new_piece = self.piece:withOffset({x=-i, y=0})
if self.grid:canPlacePiece(new_piece) then
self.piece = new_piece
break
end
if not rush then break end
end
elseif self.das.direction == "right" then
for i = 1, 10 do
local new_piece = self.piece:withOffset({x=i, y=0})
if self.grid:canPlacePiece(new_piece) then
self.piece = new_piece
break
end
if not rush then break end
end
end
end
end
function JokerGame:onLineClear(cleared_row_count)
if cleared_row_count >= 4 and self.level < 200 then self.stock = self.stock + 1
elseif cleared_row_count < 4 and self.level >= 200 then self.stock = self.stock - 1 end
@ -112,7 +142,7 @@ function JokerGame:drawScoringInfo()
if (self.ready_frames ~= 0) then
love.graphics.printf(
"RUSH: " .. (rush and "ON" or "OFF"),
64, 110, 160, "center"
64, 100, 160, "center"
)
end

View File

@ -9,7 +9,6 @@ DTET.hash = "DTET"
DTET.softdrop_lock = false
DTET.harddrop_lock = true
DTET.are_cancel = true
DTET.enable_IRS_wallkicks = true
DTET.spawn_positions = {
I = { x=5, y=4 },