Survival A3 torikan now switches to 03:03:00 when playing with World-type rulesets

This commit is contained in:
Oshisaure 2020-10-17 02:51:29 +01:00
parent 36c568feaf
commit c2d1c1183c

View File

@ -39,6 +39,15 @@ function SurvivalA3Game:new()
self.coolregret_timer = 0 self.coolregret_timer = 0
end end
function SurvivalA3Game:initialize(ruleset)
self.torikan_time = frameTime(2,28)
if ruleset.world then self.torikan_time = frameTime(3,03) end
print(ruleset.name, ruleset.world, formatTime(self.torikan_time))
self.super.initialize(self, ruleset)
-- ^ notice the . here instead of the :
end
function SurvivalA3Game:getARE() function SurvivalA3Game:getARE()
if self.level < 300 then return 12 if self.level < 300 then return 12
else return 6 end else return 6 end
@ -95,11 +104,11 @@ function SurvivalA3Game:getNextPiece(ruleset)
end end
function SurvivalA3Game:hitTorikan(old_level, new_level) function SurvivalA3Game:hitTorikan(old_level, new_level)
if old_level < 500 and new_level >= 500 and self.frames > frameTime(2,28) then if old_level < 500 and new_level >= 500 and self.frames > self.torikan_time then
self.level = 500 self.level = 500
return true return true
end end
if old_level < 1000 and new_level >= 1000 and self.frames > frameTime(4,56) then if old_level < 1000 and new_level >= 1000 and self.frames > self.torikan_time*2 then
self.level = 1000 self.level = 1000
return true return true
end end
@ -138,6 +147,7 @@ function SurvivalA3Game:onLineClear(cleared_row_count)
if not self.clear then if not self.clear then
local new_level = self.level + cleared_row_levels[cleared_row_count] local new_level = self.level + cleared_row_levels[cleared_row_count]
self:updateSectionTimes(self.level, new_level) self:updateSectionTimes(self.level, new_level)
print(formatTime(self.torikan_time))
if new_level >= 1300 or self:hitTorikan(self.level, new_level) then if new_level >= 1300 or self:hitTorikan(self.level, new_level) then
if new_level >= 1300 then if new_level >= 1300 then
self.level = 1300 self.level = 1300