diff --git a/tetris/modes/big_a2.lua b/tetris/modes/big_a2.lua index 86c5317..b0e2d91 100755 --- a/tetris/modes/big_a2.lua +++ b/tetris/modes/big_a2.lua @@ -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) diff --git a/tetris/modes/marathon_a1.lua b/tetris/modes/marathon_a1.lua index daa5086..8ae86bc 100644 --- a/tetris/modes/marathon_a1.lua +++ b/tetris/modes/marathon_a1.lua @@ -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) diff --git a/tetris/modes/marathon_a2.lua b/tetris/modes/marathon_a2.lua index 601dc2e..7b04622 100644 --- a/tetris/modes/marathon_a2.lua +++ b/tetris/modes/marathon_a2.lua @@ -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) diff --git a/tetris/modes/marathon_a3.lua b/tetris/modes/marathon_a3.lua index 88f8dae..d9bac3f 100644 --- a/tetris/modes/marathon_a3.lua +++ b/tetris/modes/marathon_a3.lua @@ -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 = { diff --git a/tetris/modes/survival_a1.lua b/tetris/modes/survival_a1.lua index 4b10d4b..74aa954 100644 --- a/tetris/modes/survival_a1.lua +++ b/tetris/modes/survival_a1.lua @@ -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) diff --git a/tetris/modes/survival_a2.lua b/tetris/modes/survival_a2.lua index c2995fe..002d096 100644 --- a/tetris/modes/survival_a2.lua +++ b/tetris/modes/survival_a2.lua @@ -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() diff --git a/tetris/modes/survival_a3.lua b/tetris/modes/survival_a3.lua index 6233782..6e31f05 100644 --- a/tetris/modes/survival_a3.lua +++ b/tetris/modes/survival_a3.lua @@ -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)