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

@ -136,20 +136,21 @@ function MarathonA2Game:onLineClear(cleared_row_count)
end
function MarathonA2Game:updateScore(level, drop_bonus, cleared_lines)
if self.grid:checkForBravo(cleared_lines) then self.bravo = 4 else self.bravo = 1 end
cleared_lines = cleared_lines / 2
self:updateGrade(cleared_lines)
if self.grid:checkForBravo(cleared_lines) then self.bravo = 4 else self.bravo = 1 end
cleared_lines = cleared_lines / 2
self:updateGrade(cleared_lines)
if cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
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
)
self.lines = self.lines + cleared_lines
self.combo = self.combo + 2 * (cleared_lines - 1)
self.lines = self.lines + cleared_lines
else
self.drop_bonus = 0
self.combo = 1
end
self.drop_bonus = 0
endd
end
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
else
self.drop_bonus = 0
self.combo = 1
end
self.drop_bonus = 0
end
function MarathonA1Game:checkGMRequirements(old_level, new_level)

View File

@ -141,19 +141,19 @@ function MarathonA2Game:onLineClear(cleared_row_count)
end
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 cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
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
)
self.lines = self.lines + cleared_lines
self.combo = self.combo + (cleared_lines - 1) * 2
self.lines = self.lines + cleared_lines
else
self.drop_bonus = 0
self.combo = 1
end
self.drop_bonus = 0
end
function MarathonA2Game:updateSectionTimes(old_level, new_level)

View File

@ -225,18 +225,18 @@ function MarathonA3Game:updateSectionTimes(old_level, new_level)
end
function MarathonA3Game:updateScore(level, drop_bonus, cleared_lines)
self:updateGrade(cleared_lines)
self:updateGrade(cleared_lines)
if cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
self.score = self.score + (
(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.combo = self.combo + cleared_lines - 1
self.lines = self.lines + cleared_lines
else
self.drop_bonus = 0
self.combo = 1
end
self.drop_bonus = 0
end
local grade_point_bonuses = {

View File

@ -123,16 +123,16 @@ function SurvivalA1Game:updateScore(level, drop_bonus, cleared_lines)
self.bravos = self.bravos + 1
else self.bravo = 1 end
if cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
self.score = self.score + (
(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.combo = self.combo + (cleared_lines - 1) * 2
self.lines = self.lines + cleared_lines
else
self.drop_bonus = 0
self.combo = 1
end
self.drop_bonus = 0
end
function SurvivalA1Game:checkGMRequirements(old_level, new_level)

View File

@ -110,16 +110,16 @@ end
function SurvivalA2Game:updateScore(level, drop_bonus, cleared_lines)
if self.grid:checkForBravo(cleared_lines) then self.bravo = 4 else self.bravo = 1 end
if cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
self.score = self.score + (
(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.combo = self.combo + (cleared_lines - 1) * 2
self.lines = self.lines + cleared_lines
else
self.drop_bonus = 0
self.combo = 1
end
self.drop_bonus = 0
end
function SurvivalA2Game:getLetterGrade()

View File

@ -169,16 +169,16 @@ end
function SurvivalA3Game:updateScore(level, drop_bonus, cleared_lines)
if cleared_lines > 0 then
self.combo = self.combo + (cleared_lines - 1) * 2
self.score = self.score + (
(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.combo = self.combo + cleared_lines - 1
self.lines = self.lines + cleared_lines
else
self.drop_bonus = 0
self.combo = 1
end
self.drop_bonus = 0
end
function SurvivalA3Game:updateSectionTimes(old_level, new_level)