mirror of
https://github.com/SashLilac/cambridge-modpack.git
synced 2024-11-21 15:19:01 -06:00
Simplified Big Survival A3 code
This commit is contained in:
parent
7e19dc6670
commit
c3150b282b
@ -9,46 +9,11 @@ BigMemeGame.hash = "BigA3"
|
|||||||
BigMemeGame.tagline = "The blocks are bigger and the speeds are faster!"
|
BigMemeGame.tagline = "The blocks are bigger and the speeds are faster!"
|
||||||
|
|
||||||
function BigMemeGame:new()
|
function BigMemeGame:new()
|
||||||
SurvivalA3Game:new()
|
BigMemeGame.super:new()
|
||||||
end
|
self.big_mode = true
|
||||||
|
local getClearedRowCount = self.grid.getClearedRowCount
|
||||||
function BigMemeGame:initialize(ruleset)
|
self.grid.getClearedRowCount = function(self)
|
||||||
self.super:initialize(ruleset)
|
return getClearedRowCount(self) / 2
|
||||||
self.big_mode = true
|
|
||||||
end
|
|
||||||
|
|
||||||
local cleared_row_levels = {1, 2, 4, 6}
|
|
||||||
|
|
||||||
function BigMemeGame:onLineClear(cleared_row_count)
|
|
||||||
cleared_row_count = cleared_row_count / 2
|
|
||||||
if not self.clear then
|
|
||||||
local new_level = self.level + cleared_row_levels[cleared_row_count]
|
|
||||||
self:updateSectionTimes(self.level, new_level)
|
|
||||||
if new_level >= 1300 or self:hitTorikan(self.level, new_level) then
|
|
||||||
self.clear = true
|
|
||||||
if new_level >= 1300 then
|
|
||||||
self.level = 1300
|
|
||||||
self.grid:clear()
|
|
||||||
self.big_mode = true
|
|
||||||
self.roll_frames = -150
|
|
||||||
else
|
|
||||||
self.game_over = true
|
|
||||||
end
|
|
||||||
else
|
|
||||||
self.level = math.min(new_level, 1300)
|
|
||||||
end
|
|
||||||
self:advanceBottomRow(-cleared_row_count)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function BigMemeGame:advanceBottomRow(dx)
|
|
||||||
if self.level >= 500 and self.level < 1000 then
|
|
||||||
self.garbage = math.max(self.garbage + dx, 0)
|
|
||||||
if self.garbage >= self:getGarbageLimit() then
|
|
||||||
self.grid:copyBottomRow()
|
|
||||||
self.grid:copyBottomRow()
|
|
||||||
self.garbage = 0
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user