mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 18:59:03 -06:00
Score overhauls
This commit is contained in:
parent
c6482c423e
commit
febb5d546c
@ -127,20 +127,21 @@ function MarathonA2Game:onLineClear(cleared_row_count)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function MarathonA2Game:updateScore(level, drop_bonus, cleared_lines)
|
function MarathonA2Game:updateScore(level, drop_bonus, cleared_lines)
|
||||||
if self.grid:checkForBravo(cleared_lines) then self.bravo = 4 else self.bravo = 1 end
|
if not self.clear then
|
||||||
cleared_lines = cleared_lines / 2
|
cleared_lines = cleared_lines / 2
|
||||||
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
|
if cleared_lines > 0 then
|
||||||
self.combo = self.combo + (cleared_lines - 1) * 2
|
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.combo * self.bravo
|
cleared_lines * self.combo * self.bravo
|
||||||
)
|
)
|
||||||
self.lines = self.lines + cleared_lines
|
|
||||||
else
|
else
|
||||||
self.combo = 1
|
self.combo = 1
|
||||||
end
|
end
|
||||||
self.drop_bonus = 0
|
self.drop_bonus = 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local grade_point_bonuses = {
|
local grade_point_bonuses = {
|
||||||
|
@ -172,17 +172,18 @@ function SurvivalCKGame:onPieceLock(piece, cleared_row_count)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function SurvivalCKGame:updateScore(level, drop_bonus, cleared_lines)
|
function SurvivalCKGame:updateScore(level, drop_bonus, cleared_lines)
|
||||||
|
if not self.clear then
|
||||||
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.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
|
end
|
||||||
|
|
||||||
function SurvivalCKGame:updateSectionTimes(old_level, new_level)
|
function SurvivalCKGame:updateSectionTimes(old_level, new_level)
|
||||||
|
@ -187,17 +187,18 @@ function DemonModeGame:updateSectionTimes(old_level, new_level)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function DemonModeGame:updateScore(level, drop_bonus, cleared_lines)
|
function DemonModeGame:updateScore(level, drop_bonus, cleared_lines)
|
||||||
|
if not self.clear then
|
||||||
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.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
|
end
|
||||||
|
|
||||||
local letter_grades = {
|
local letter_grades = {
|
||||||
|
@ -137,15 +137,15 @@ function MarathonA1Game:onLineClear(cleared_row_count)
|
|||||||
self:checkGMRequirements(self.level, self.level + cleared_row_count)
|
self:checkGMRequirements(self.level, self.level + cleared_row_count)
|
||||||
if not self.clear then
|
if not self.clear then
|
||||||
local new_level = math.min(self.level + cleared_row_count, 999)
|
local new_level = math.min(self.level + cleared_row_count, 999)
|
||||||
if self.level == 999 then
|
if new_level == 999 then
|
||||||
self.clear = true
|
self.clear = true
|
||||||
else
|
else
|
||||||
self.level = new_level
|
self.level = new_level
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function MarathonA1Game:updateScore(level, drop_bonus, cleared_lines)
|
function MarathonA1Game:updateScore(level, drop_bonus, cleared_lines)
|
||||||
|
if not self.clear then
|
||||||
if self.grid:checkForBravo(cleared_lines) then
|
if self.grid:checkForBravo(cleared_lines) then
|
||||||
self.bravo = 4
|
self.bravo = 4
|
||||||
self.bravos = self.bravos + 1
|
self.bravos = self.bravos + 1
|
||||||
@ -156,11 +156,11 @@ function MarathonA1Game:updateScore(level, drop_bonus, cleared_lines)
|
|||||||
(math.ceil((level + cleared_lines) / 4) + 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
|
|
||||||
else
|
else
|
||||||
self.combo = 1
|
self.combo = 1
|
||||||
end
|
end
|
||||||
self.drop_bonus = 0
|
self.drop_bonus = 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function MarathonA1Game:checkGMRequirements(old_level, new_level)
|
function MarathonA1Game:checkGMRequirements(old_level, new_level)
|
||||||
|
@ -126,16 +126,20 @@ function MarathonA2Game:onPieceEnter()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function MarathonA2Game:onLineClear(cleared_row_count)
|
function MarathonA2Game:updateScore(level, drop_bonus, cleared_lines)
|
||||||
self:updateSectionTimes(self.level, self.level + cleared_row_count)
|
if not self.clear then
|
||||||
self.level = math.min(self.level + cleared_row_count, 999)
|
self:updateGrade(cleared_lines)
|
||||||
if self.level == 999 and not self.clear then
|
if self.grid:checkForBravo(cleared_lines) then self.bravo = 4 else self.bravo = 1 end
|
||||||
self.clear = true
|
if cleared_lines > 0 then
|
||||||
if self:qualifiesForMRoll() then
|
self.combo = self.combo + (cleared_lines - 1) * 2
|
||||||
self.grade = 32
|
self.score = self.score + (
|
||||||
|
(math.ceil((level + cleared_lines) / 4) + drop_bonus) *
|
||||||
|
cleared_lines * self.combo * self.bravo
|
||||||
|
)
|
||||||
|
else
|
||||||
|
self.combo = 1
|
||||||
end
|
end
|
||||||
self.grid:clear()
|
self.drop_bonus = 0
|
||||||
self.roll_frames = -150
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -225,6 +225,7 @@ function MarathonA3Game:updateSectionTimes(old_level, new_level)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function MarathonA3Game:updateScore(level, drop_bonus, cleared_lines)
|
function MarathonA3Game:updateScore(level, drop_bonus, cleared_lines)
|
||||||
|
if not self.clear then
|
||||||
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.combo = self.combo + (cleared_lines - 1) * 2
|
||||||
@ -232,11 +233,11 @@ function MarathonA3Game:updateScore(level, drop_bonus, cleared_lines)
|
|||||||
(math.ceil((level + cleared_lines) / 4) + drop_bonus) *
|
(math.ceil((level + cleared_lines) / 4) + drop_bonus) *
|
||||||
cleared_lines * self.combo
|
cleared_lines * self.combo
|
||||||
)
|
)
|
||||||
self.lines = self.lines + cleared_lines
|
|
||||||
else
|
else
|
||||||
self.combo = 1
|
self.combo = 1
|
||||||
end
|
end
|
||||||
self.drop_bonus = 0
|
self.drop_bonus = 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local grade_point_bonuses = {
|
local grade_point_bonuses = {
|
||||||
|
@ -117,17 +117,18 @@ function PhantomManiaGame:onLineClear(cleared_row_count)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function PhantomManiaGame:updateScore(level, drop_bonus, cleared_lines)
|
function PhantomManiaGame:updateScore(level, drop_bonus, cleared_lines)
|
||||||
|
if not self.clear then
|
||||||
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.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
|
end
|
||||||
|
|
||||||
PhantomManiaGame.rollOpacityFunction = function(age)
|
PhantomManiaGame.rollOpacityFunction = function(age)
|
||||||
|
@ -181,17 +181,18 @@ function PhantomMania2Game:onHold()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function PhantomMania2Game:updateScore(level, drop_bonus, cleared_lines)
|
function PhantomMania2Game:updateScore(level, drop_bonus, cleared_lines)
|
||||||
|
if not self.clear then
|
||||||
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.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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,17 +99,18 @@ function StrategyGame:onLineClear(cleared_row_count)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function StrategyGame:updateScore(level, drop_bonus, cleared_lines)
|
function StrategyGame:updateScore(level, drop_bonus, cleared_lines)
|
||||||
|
if not self.clear then
|
||||||
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.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
|
end
|
||||||
|
|
||||||
function StrategyGame:setNextOpacity(i)
|
function StrategyGame:setNextOpacity(i)
|
||||||
|
@ -174,17 +174,18 @@ function Survival2020Game:onLineClear(cleared_row_count)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Survival2020Game:updateScore(level, drop_bonus, cleared_lines)
|
function Survival2020Game:updateScore(level, drop_bonus, cleared_lines)
|
||||||
|
if not self.clear then
|
||||||
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.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
|
end
|
||||||
|
|
||||||
function Survival2020Game:updateSectionTimes(old_level, new_level)
|
function Survival2020Game:updateSectionTimes(old_level, new_level)
|
||||||
|
@ -109,7 +109,7 @@ function SurvivalA1Game:onLineClear(cleared_row_count)
|
|||||||
self:checkGMRequirements(self.level, self.level + cleared_row_count)
|
self:checkGMRequirements(self.level, self.level + cleared_row_count)
|
||||||
if not self.clear then
|
if not self.clear then
|
||||||
local new_level = math.min(self.level + cleared_row_count, 999)
|
local new_level = math.min(self.level + cleared_row_count, 999)
|
||||||
if self.level == 999 then
|
if new_level == 999 then
|
||||||
self.clear = true
|
self.clear = true
|
||||||
else
|
else
|
||||||
self.level = new_level
|
self.level = new_level
|
||||||
@ -118,6 +118,7 @@ function SurvivalA1Game:onLineClear(cleared_row_count)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function SurvivalA1Game:updateScore(level, drop_bonus, cleared_lines)
|
function SurvivalA1Game:updateScore(level, drop_bonus, cleared_lines)
|
||||||
|
if not self.clear then
|
||||||
if self.grid:checkForBravo(cleared_lines) then
|
if self.grid:checkForBravo(cleared_lines) then
|
||||||
self.bravo = 4
|
self.bravo = 4
|
||||||
self.bravos = self.bravos + 1
|
self.bravos = self.bravos + 1
|
||||||
@ -128,11 +129,11 @@ function SurvivalA1Game:updateScore(level, drop_bonus, cleared_lines)
|
|||||||
(math.ceil((level + cleared_lines) / 4) + 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
|
|
||||||
else
|
else
|
||||||
self.combo = 1
|
self.combo = 1
|
||||||
end
|
end
|
||||||
self.drop_bonus = 0
|
self.drop_bonus = 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function SurvivalA1Game:checkGMRequirements(old_level, new_level)
|
function SurvivalA1Game:checkGMRequirements(old_level, new_level)
|
||||||
|
@ -108,6 +108,7 @@ function SurvivalA2Game:onLineClear(cleared_row_count)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function SurvivalA2Game:updateScore(level, drop_bonus, cleared_lines)
|
function SurvivalA2Game:updateScore(level, drop_bonus, cleared_lines)
|
||||||
|
if not self.clear then
|
||||||
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.combo = self.combo + (cleared_lines - 1) * 2
|
||||||
@ -115,11 +116,11 @@ function SurvivalA2Game:updateScore(level, drop_bonus, cleared_lines)
|
|||||||
(math.ceil((level + cleared_lines) / 4) + 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
|
|
||||||
else
|
else
|
||||||
self.combo = 1
|
self.combo = 1
|
||||||
end
|
end
|
||||||
self.drop_bonus = 0
|
self.drop_bonus = 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function SurvivalA2Game:getLetterGrade()
|
function SurvivalA2Game:getLetterGrade()
|
||||||
|
@ -166,17 +166,18 @@ function SurvivalA3Game:onPieceLock(piece, cleared_row_count)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function SurvivalA3Game:updateScore(level, drop_bonus, cleared_lines)
|
function SurvivalA3Game:updateScore(level, drop_bonus, cleared_lines)
|
||||||
|
if not self.clear then
|
||||||
if cleared_lines > 0 then
|
if cleared_lines > 0 then
|
||||||
self.combo = self.combo + (cleared_lines - 1) * 2
|
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.combo
|
cleared_lines * self.combo
|
||||||
)
|
)
|
||||||
self.lines = self.lines + cleared_lines
|
|
||||||
else
|
else
|
||||||
self.combo = 1
|
self.combo = 1
|
||||||
end
|
end
|
||||||
self.drop_bonus = 0
|
self.drop_bonus = 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function SurvivalA3Game:updateSectionTimes(old_level, new_level)
|
function SurvivalA3Game:updateSectionTimes(old_level, new_level)
|
||||||
|
@ -137,6 +137,7 @@ function TGMPlusGame:advanceBottomRow()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function TGMPlusGame:updateScore(level, drop_bonus, cleared_lines)
|
function TGMPlusGame:updateScore(level, drop_bonus, cleared_lines)
|
||||||
|
if not self.clear then
|
||||||
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.combo = self.combo + (cleared_lines - 1) * 2
|
||||||
@ -144,11 +145,11 @@ function TGMPlusGame:updateScore(level, drop_bonus, cleared_lines)
|
|||||||
(math.ceil((level + cleared_lines) / 4) + 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
|
|
||||||
else
|
else
|
||||||
self.combo = 1
|
self.combo = 1
|
||||||
end
|
end
|
||||||
self.drop_bonus = 0
|
self.drop_bonus = 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TGMPlusGame:drawGrid(ruleset)
|
function TGMPlusGame:drawGrid(ruleset)
|
||||||
|
Loading…
Reference in New Issue
Block a user