G/O line fix

This commit is contained in:
Ishaan Bhardwaj 2020-11-02 21:17:13 -05:00
parent 2dba120919
commit 9b89c4d1de

View File

@ -143,6 +143,16 @@ function MarathonA2Game:updateScore(level, drop_bonus, cleared_lines)
else self.lines = self.lines + cleared_lines end else self.lines = self.lines + cleared_lines end
end end
function MarathonA2Game:onLineClear(cleared_row_count)
self.level = math.min(self.level + cleared_row_count, 999)
if self.level == 999 and not self.clear then
self.clear = true
self.grid:clear()
if self:qualifiesForMRoll() then self.grade = 32 end
self.roll_frames = -150
end
end
function MarathonA2Game:updateSectionTimes(old_level, new_level) function MarathonA2Game:updateSectionTimes(old_level, new_level)
if self.clear then return end if self.clear then return end
if math.floor(old_level / 100) < math.floor(new_level / 100) or if math.floor(old_level / 100) < math.floor(new_level / 100) or
@ -267,7 +277,7 @@ function MarathonA2Game:qualifiesForMRoll()
return false return false
end end
end end
if self.grade < 17 or self.frames > frameTime(8,45) then if self.grade < 31 or self.frames > frameTime(8,45) then
return false return false
end end
return true return true