From 23b58951cb83720f47fafc5d647cba174a80c2a4 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Wed, 17 Feb 2021 22:46:33 -0500 Subject: [PATCH] World rule Survival A2 has a lenient torikan time --- tetris/modes/survival_a2.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tetris/modes/survival_a2.lua b/tetris/modes/survival_a2.lua index 6e4cff3..e491fb9 100644 --- a/tetris/modes/survival_a2.lua +++ b/tetris/modes/survival_a2.lua @@ -30,6 +30,11 @@ function SurvivalA2Game:new() self.lock_hard_drop = true end +function SurvivalA2Game:initialize(ruleset) + SurvivalA2Game.super.initialize(self, ruleset) + self.world = ruleset.world +end + function SurvivalA2Game:getARE() if self.level < 100 then return 18 elseif self.level < 300 then return 14 @@ -69,7 +74,8 @@ function SurvivalA2Game:getGravity() end function SurvivalA2Game:hitTorikan(old_level, new_level) - if old_level < 500 and new_level >= 500 and self.frames > frameTime(3,25) then + local torikan_time = self.world and frameTime(3,55) or frameTime(3,25) + if old_level < 500 and new_level >= 500 and self.frames > torikan_time then self.level = 500 return true end