Some score fixes for core TGM modes

This commit is contained in:
Ishaan Bhardwaj 2020-10-29 23:03:54 -04:00
parent 2aafd30253
commit f2862b4d93
7 changed files with 31 additions and 30 deletions

View File

@ -140,16 +140,17 @@ function MarathonA2Game:updateScore(level, drop_bonus, cleared_lines)
cleared_lines = cleared_lines / 2 cleared_lines = cleared_lines / 2
self:updateGrade(cleared_lines) self:updateGrade(cleared_lines)
if cleared_lines > 0 then if cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
self.score = self.score + ( self.score = self.score + (
(math.ceil((level + cleared_lines) / 4) + 2 * drop_bonus) * (math.ceil((level + cleared_lines) / 4) + drop_bonus) *
cleared_lines * self.combo * self.bravo cleared_lines * self.combo * self.bravo
) )
self.lines = self.lines + cleared_lines self.lines = self.lines + cleared_lines
self.combo = self.combo + 2 * (cleared_lines - 1)
else else
self.drop_bonus = 0
self.combo = 1 self.combo = 1
end end
self.drop_bonus = 0
endd
end end
function MarathonA2Game:updateSectionTimes(old_level, new_level) function MarathonA2Game:updateSectionTimes(old_level, new_level)

View File

@ -158,9 +158,9 @@ function MarathonA1Game:updateScore(level, drop_bonus, cleared_lines)
) )
self.lines = self.lines + cleared_lines self.lines = self.lines + cleared_lines
else else
self.drop_bonus = 0
self.combo = 1 self.combo = 1
end end
self.drop_bonus = 0
end end
function MarathonA1Game:checkGMRequirements(old_level, new_level) function MarathonA1Game:checkGMRequirements(old_level, new_level)

View File

@ -144,16 +144,16 @@ function MarathonA2Game:updateScore(level, drop_bonus, cleared_lines)
self:updateGrade(cleared_lines) self:updateGrade(cleared_lines)
if self.grid:checkForBravo(cleared_lines) then self.bravo = 4 else self.bravo = 1 end if self.grid:checkForBravo(cleared_lines) then self.bravo = 4 else self.bravo = 1 end
if cleared_lines > 0 then if cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
self.score = self.score + ( self.score = self.score + (
(math.ceil((level + cleared_lines) / 4) + 2 * drop_bonus) * (math.ceil((level + cleared_lines) / 4) + drop_bonus) *
cleared_lines * self.combo * self.bravo cleared_lines * self.combo * self.bravo
) )
self.lines = self.lines + cleared_lines self.lines = self.lines + cleared_lines
self.combo = self.combo + (cleared_lines - 1) * 2
else else
self.drop_bonus = 0
self.combo = 1 self.combo = 1
end end
self.drop_bonus = 0
end end
function MarathonA2Game:updateSectionTimes(old_level, new_level) function MarathonA2Game:updateSectionTimes(old_level, new_level)

View File

@ -227,16 +227,16 @@ end
function MarathonA3Game:updateScore(level, drop_bonus, cleared_lines) function MarathonA3Game:updateScore(level, drop_bonus, cleared_lines)
self:updateGrade(cleared_lines) self:updateGrade(cleared_lines)
if cleared_lines > 0 then if cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
self.score = self.score + ( self.score = self.score + (
(math.ceil((level + cleared_lines) / 4) + drop_bonus) * (math.ceil((level + cleared_lines) / 4) + drop_bonus) *
cleared_lines * (cleared_lines * 2 - 1) * (self.combo * 2 - 1) cleared_lines * self.combo
) )
self.lines = self.lines + cleared_lines self.lines = self.lines + cleared_lines
self.combo = self.combo + cleared_lines - 1
else else
self.drop_bonus = 0
self.combo = 1 self.combo = 1
end end
self.drop_bonus = 0
end end
local grade_point_bonuses = { local grade_point_bonuses = {

View File

@ -123,16 +123,16 @@ function SurvivalA1Game:updateScore(level, drop_bonus, cleared_lines)
self.bravos = self.bravos + 1 self.bravos = self.bravos + 1
else self.bravo = 1 end else self.bravo = 1 end
if cleared_lines > 0 then if cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
self.score = self.score + ( self.score = self.score + (
(math.ceil((level + cleared_lines) / 4) + drop_bonus) * (math.ceil((level + cleared_lines) / 4) + drop_bonus) *
cleared_lines * self.bravo * self.combo cleared_lines * self.combo * self.bravo
) )
self.lines = self.lines + cleared_lines self.lines = self.lines + cleared_lines
self.combo = self.combo + (cleared_lines - 1) * 2
else else
self.drop_bonus = 0
self.combo = 1 self.combo = 1
end end
self.drop_bonus = 0
end end
function SurvivalA1Game:checkGMRequirements(old_level, new_level) function SurvivalA1Game:checkGMRequirements(old_level, new_level)

View File

@ -110,16 +110,16 @@ end
function SurvivalA2Game:updateScore(level, drop_bonus, cleared_lines) function SurvivalA2Game:updateScore(level, drop_bonus, cleared_lines)
if self.grid:checkForBravo(cleared_lines) then self.bravo = 4 else self.bravo = 1 end if self.grid:checkForBravo(cleared_lines) then self.bravo = 4 else self.bravo = 1 end
if cleared_lines > 0 then if cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
self.score = self.score + ( self.score = self.score + (
(math.ceil((level + cleared_lines) / 4) + drop_bonus) * (math.ceil((level + cleared_lines) / 4) + drop_bonus) *
cleared_lines * self.bravo * self.combo cleared_lines * self.combo * self.bravo
) )
self.lines = self.lines + cleared_lines self.lines = self.lines + cleared_lines
self.combo = self.combo + (cleared_lines - 1) * 2
else else
self.drop_bonus = 0
self.combo = 1 self.combo = 1
end end
self.drop_bonus = 0
end end
function SurvivalA2Game:getLetterGrade() function SurvivalA2Game:getLetterGrade()

View File

@ -169,16 +169,16 @@ end
function SurvivalA3Game:updateScore(level, drop_bonus, cleared_lines) function SurvivalA3Game:updateScore(level, drop_bonus, cleared_lines)
if cleared_lines > 0 then if cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
self.score = self.score + ( self.score = self.score + (
(math.ceil((level + cleared_lines) / 4) + drop_bonus) * (math.ceil((level + cleared_lines) / 4) + drop_bonus) *
cleared_lines * (cleared_lines * 2 - 1) * (self.combo * 2 - 1) cleared_lines * self.combo
) )
self.lines = self.lines + cleared_lines self.lines = self.lines + cleared_lines
self.combo = self.combo + cleared_lines - 1
else else
self.drop_bonus = 0
self.combo = 1 self.combo = 1
end end
self.drop_bonus = 0
end end
function SurvivalA3Game:updateSectionTimes(old_level, new_level) function SurvivalA3Game:updateSectionTimes(old_level, new_level)