From 9d315d9763110116f6faa1be7cfccde560ed67a7 Mon Sep 17 00:00:00 2001 From: Tetro48 <76738929+Tetro48@users.noreply.github.com> Date: Sat, 5 Mar 2022 09:53:24 +0700 Subject: [PATCH] Replay tunings and ruleset accuracies. In Ti-World and Ti-ARS specifically. --- scene/replay.lua | 3 +++ tetris/modes/gamemode.lua | 3 +++ tetris/rulesets/arika_ti.lua | 1 + tetris/rulesets/ruleset.lua | 2 +- tetris/rulesets/ti_srs.lua | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/scene/replay.lua b/scene/replay.lua index f1ca2c0..470b584 100644 --- a/scene/replay.lua +++ b/scene/replay.lua @@ -6,6 +6,9 @@ ReplayScene.title = "Replay" function ReplayScene:new(replay, game_mode, ruleset) config.gamesettings = replay["gamesettings"] + config.das = replay["delayed_auto_shift"] + config.arr = replay["auto_repeat_rate"] + config.dcd = replay["das_cut_delay"] love.math.setRandomSeed(replay["random_low"], replay["random_high"]) love.math.setRandomState(replay["random_state"]) self.retry_replay = replay diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 2734806..f0b7d5d 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -135,6 +135,9 @@ function GameMode:saveReplay() replay["lines"] = self.lines replay["gamesettings"] = config.gamesettings replay["secret_inputs"] = self.secret_inputs + replay["delayed_auto_shift"] = config.das + replay["auto_repeat_rate"] = config.arr + replay["das_cut_delay"] = config.dcd replay["timestamp"] = os.time() if love.filesystem.getInfo("replays") == nil then love.filesystem.createDirectory("replays") diff --git a/tetris/rulesets/arika_ti.lua b/tetris/rulesets/arika_ti.lua index 02db8b7..0ca3d4c 100644 --- a/tetris/rulesets/arika_ti.lua +++ b/tetris/rulesets/arika_ti.lua @@ -6,6 +6,7 @@ local ARS = Ruleset:extend() ARS.name = "Ti-ARS" ARS.hash = "ArikaTI" +ARS.synchroes = true -- Component functions. function ARS:attemptWallkicks(piece, new_piece, rot_dir, grid) diff --git a/tetris/rulesets/ruleset.lua b/tetris/rulesets/ruleset.lua index ca8e1e3..9d42f63 100644 --- a/tetris/rulesets/ruleset.lua +++ b/tetris/rulesets/ruleset.lua @@ -255,7 +255,7 @@ function Ruleset:processPiece( drop_locked, hard_drop_locked, hard_drop_enabled, additive_gravity, classic_lock ) - local synchroes_allowed = ({not self.world, true, false})[config.gamesettings.synchroes_allowed] + local synchroes_allowed = ({not self.world or self.synchroes, true, false})[config.gamesettings.synchroes_allowed] if synchroes_allowed then self:rotatePiece(inputs, piece, grid, prev_inputs, false) diff --git a/tetris/rulesets/ti_srs.lua b/tetris/rulesets/ti_srs.lua index 425ad2b..70d4043 100644 --- a/tetris/rulesets/ti_srs.lua +++ b/tetris/rulesets/ti_srs.lua @@ -6,6 +6,7 @@ local SRS = Ruleset:extend() SRS.name = "Ti-World" SRS.hash = "StandardTI" SRS.world = true +SRS.synchroes = true SRS.colourscheme = { I = "C", L = "O",