mirror of
https://github.com/SashLilac/cambridge.git
synced 2025-05-13 20:21:25 -05:00
Compare commits
2 Commits
dcde2a380d
...
v0.3-april
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
323c457809 | ||
|
|
decc1f563f |
@@ -202,13 +202,13 @@ end
|
|||||||
local cool_cutoffs = {
|
local cool_cutoffs = {
|
||||||
frameTime(0,36), frameTime(0,36), frameTime(0,36), frameTime(0,36), frameTime(0,36),
|
frameTime(0,36), frameTime(0,36), frameTime(0,36), frameTime(0,36), frameTime(0,36),
|
||||||
frameTime(0,30), frameTime(0,30), frameTime(0,30), frameTime(0,30), frameTime(0,30),
|
frameTime(0,30), frameTime(0,30), frameTime(0,30), frameTime(0,30), frameTime(0,30),
|
||||||
frameTime(0,27), frameTime(0,27), frameTime(0,27),
|
frameTime(0,30), frameTime(0,30), frameTime(0,30),
|
||||||
}
|
}
|
||||||
|
|
||||||
local regret_cutoffs = {
|
local regret_cutoffs = {
|
||||||
frameTime(0,50), frameTime(0,50), frameTime(0,50), frameTime(0,50), frameTime(0,50),
|
frameTime(0,50), frameTime(0,50), frameTime(0,50), frameTime(0,50), frameTime(0,50),
|
||||||
frameTime(0,40), frameTime(0,40), frameTime(0,40), frameTime(0,40), frameTime(0,40),
|
frameTime(0,42), frameTime(0,42), frameTime(0,42), frameTime(0,42), frameTime(0,42),
|
||||||
frameTime(0,35), frameTime(0,35), frameTime(0,35),
|
frameTime(0,42), frameTime(0,42), frameTime(0,42),
|
||||||
}
|
}
|
||||||
|
|
||||||
function PhantomMania2Game:updateSectionTimes(old_level, new_level)
|
function PhantomMania2Game:updateSectionTimes(old_level, new_level)
|
||||||
|
|||||||
49
tetris/rulesets/arika_exp.lua
Normal file
49
tetris/rulesets/arika_exp.lua
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
local Piece = require 'tetris.components.piece'
|
||||||
|
local Ruleset = require 'tetris.rulesets.arika_ace2'
|
||||||
|
|
||||||
|
local ARS = Ruleset:extend()
|
||||||
|
|
||||||
|
ARS.name = "ARS-X"
|
||||||
|
ARS.hash = "ArikaEXP"
|
||||||
|
|
||||||
|
ARS.MANIPULATIONS_MAX = 24
|
||||||
|
ARS.ROTATIONS_MAX = 12
|
||||||
|
|
||||||
|
function ARS:onPieceCreate(piece, grid)
|
||||||
|
piece.manipulations = 0
|
||||||
|
piece.rotations = 0
|
||||||
|
piece.lowest_y = -math.huge
|
||||||
|
end
|
||||||
|
|
||||||
|
function ARS:checkNewLow(piece)
|
||||||
|
for _, block in pairs(piece:getBlockOffsets()) do
|
||||||
|
local y = piece.position.y + block.y
|
||||||
|
if y > piece.lowest_y then
|
||||||
|
piece.manipulations = 0
|
||||||
|
piece.rotations = 0
|
||||||
|
piece.lowest_y = y
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function ARS:onPieceMove(piece, grid)
|
||||||
|
piece.lock_delay = 0 -- move reset
|
||||||
|
if piece:isDropBlocked(grid) then
|
||||||
|
piece.manipulations = piece.manipulations + 1
|
||||||
|
if piece.manipulations >= ARS.MANIPULATIONS_MAX then
|
||||||
|
piece.locked = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function ARS:onPieceRotate(piece, grid, upward)
|
||||||
|
piece.lock_delay = 0 -- rotate reset
|
||||||
|
if upward or piece:isDropBlocked(grid) then
|
||||||
|
piece.rotations = piece.rotations + 1
|
||||||
|
if piece.rotations >= ARS.ROTATIONS_MAX and piece:isDropBlocked(grid) then
|
||||||
|
piece.locked = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return ARS
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
local Piece = require 'tetris.components.piece'
|
local Piece = require 'tetris.components.piece'
|
||||||
local Ruleset = require 'tetris.rulesets.standard_exp'
|
local Ruleset = require 'tetris.rulesets.standard_ace'
|
||||||
|
|
||||||
local SRS = Ruleset:extend()
|
local SRS = Ruleset:extend()
|
||||||
|
|
||||||
@@ -33,8 +33,8 @@ SRS.wallkicks_line = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function SRS:attemptWallkicks(piece, new_piece, rot_dir, grid)
|
|
||||||
|
|
||||||
|
function SRS:attemptWallkicks(piece, new_piece, rot_dir, grid)
|
||||||
local kicks
|
local kicks
|
||||||
if piece.shape == "O" then
|
if piece.shape == "O" then
|
||||||
return
|
return
|
||||||
@@ -69,6 +69,12 @@ function SRS:checkNewLow(piece)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function SRS:onPieceCreate(piece, grid)
|
||||||
|
piece.manipulations = 0
|
||||||
|
piece.rotations = 0
|
||||||
|
piece.lowest_y = -math.huge
|
||||||
|
end
|
||||||
|
|
||||||
function SRS:onPieceDrop(piece, grid)
|
function SRS:onPieceDrop(piece, grid)
|
||||||
self:checkNewLow(piece)
|
self:checkNewLow(piece)
|
||||||
if piece.manipulations >= self.MANIPULATIONS_MAX and piece:isDropBlocked(grid) then
|
if piece.manipulations >= self.MANIPULATIONS_MAX and piece:isDropBlocked(grid) then
|
||||||
|
|||||||
2
tetris/rulesets/arika_srs.lua → tetris/rulesets/standard_ace.lua
Executable file → Normal file
2
tetris/rulesets/arika_srs.lua → tetris/rulesets/standard_ace.lua
Executable file → Normal file
@@ -1,5 +1,5 @@
|
|||||||
local Piece = require 'tetris.components.piece'
|
local Piece = require 'tetris.components.piece'
|
||||||
local Ruleset = require 'tetris.rulesets.ti_srs'
|
local Ruleset = require 'tetris.rulesets.standard_ti'
|
||||||
|
|
||||||
local SRS = Ruleset:extend()
|
local SRS = Ruleset:extend()
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
local Piece = require 'tetris.components.piece'
|
local Piece = require 'tetris.components.piece'
|
||||||
local Ruleset = require 'tetris.rulesets.arika_srs'
|
local Ruleset = require 'tetris.rulesets.standard_ti'
|
||||||
|
|
||||||
local SRS = Ruleset:extend()
|
local SRS = Ruleset:extend()
|
||||||
|
|
||||||
@@ -27,8 +27,6 @@ function SRS:checkNewLow(piece)
|
|||||||
for _, block in pairs(piece:getBlockOffsets()) do
|
for _, block in pairs(piece:getBlockOffsets()) do
|
||||||
local y = piece.position.y + block.y
|
local y = piece.position.y + block.y
|
||||||
if y > piece.lowest_y then
|
if y > piece.lowest_y then
|
||||||
--piece.manipulations = 0
|
|
||||||
--piece.rotations = 0
|
|
||||||
piece.lowest_y = y
|
piece.lowest_y = y
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user