mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 20:59:03 -06:00
Merge branch 'HEAD' of https://github.com/SashLilac/cambridge.git
This commit is contained in:
commit
1f78bb9e99
@ -5,6 +5,8 @@ Welcome to Cambridge, the next open-source falling-block game engine!
|
|||||||
|
|
||||||
This fork is written and maintained exclusively by [SashLilac](https://github.com/SashLilac) and [Oshisaure](https://github.com/oshisaure)!
|
This fork is written and maintained exclusively by [SashLilac](https://github.com/SashLilac) and [Oshisaure](https://github.com/oshisaure)!
|
||||||
|
|
||||||
|
Join our Discord server for help and a welcoming community! https://discord.gg/mteMJw4
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@ -142,13 +142,14 @@ end
|
|||||||
|
|
||||||
function MarathonA2Game:updateScore(level, drop_bonus, cleared_lines)
|
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
|
if cleared_lines > 0 then
|
||||||
self.score = self.score + (
|
self.score = self.score + (
|
||||||
(math.ceil((level + cleared_lines) / 4) + drop_bonus) *
|
(math.ceil((level + cleared_lines) / 4) + 2 * drop_bonus) *
|
||||||
cleared_lines * (cleared_lines * 2 - 1) * (self.combo * 2 - 1)
|
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
|
self.combo = self.combo + (cleared_lines - 1) * 2
|
||||||
else
|
else
|
||||||
self.drop_bonus = 0
|
self.drop_bonus = 0
|
||||||
self.combo = 1
|
self.combo = 1
|
||||||
|
@ -161,12 +161,12 @@ function PhantomManiaGame:drawScoringInfo()
|
|||||||
local text_x = config["side_next"] and 320 or 240
|
local text_x = config["side_next"] and 320 or 240
|
||||||
|
|
||||||
love.graphics.setFont(font_3x5_2)
|
love.graphics.setFont(font_3x5_2)
|
||||||
love.graphics.printf("GRADE", text_x, 120, 40, "left")
|
if getLetterGrade(self.level, self.clear) ~= "" then love.graphics.printf("GRADE", text_x, 120, 40, "left") end
|
||||||
love.graphics.printf("SCORE", text_x, 200, 40, "left")
|
love.graphics.printf("SCORE", text_x, 200, 40, "left")
|
||||||
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
|
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
|
||||||
|
|
||||||
love.graphics.setFont(font_3x5_3)
|
love.graphics.setFont(font_3x5_3)
|
||||||
love.graphics.printf(getLetterGrade(self.level, self.clear), text_x, 140, 90, "left")
|
if getLetterGrade(self.level, self.clear) ~= "" then love.graphics.printf(getLetterGrade(self.level, self.clear), text_x, 140, 90, "left") end
|
||||||
love.graphics.printf(self.score, text_x, 220, 90, "left")
|
love.graphics.printf(self.score, text_x, 220, 90, "left")
|
||||||
love.graphics.printf(self.level, text_x, 340, 40, "right")
|
love.graphics.printf(self.level, text_x, 340, 40, "right")
|
||||||
if self.clear then
|
if self.clear then
|
||||||
|
@ -19,6 +19,8 @@ function SurvivalA1Game:new()
|
|||||||
|
|
||||||
self.roll_frames = 0
|
self.roll_frames = 0
|
||||||
self.combo = 1
|
self.combo = 1
|
||||||
|
self.bravos = 0
|
||||||
|
|
||||||
self.gm_conditions = {
|
self.gm_conditions = {
|
||||||
level300 = false,
|
level300 = false,
|
||||||
level500 = false,
|
level500 = false,
|
||||||
@ -116,10 +118,14 @@ 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 self.grid:checkForBravo(cleared_lines) then
|
||||||
|
self.bravo = 4
|
||||||
|
self.bravos = self.bravos + 1
|
||||||
|
else self.bravo = 1 end
|
||||||
if cleared_lines > 0 then
|
if cleared_lines > 0 then
|
||||||
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
|
cleared_lines * self.bravo * self.combo
|
||||||
)
|
)
|
||||||
self.lines = self.lines + cleared_lines
|
self.lines = self.lines + cleared_lines
|
||||||
self.combo = self.combo + (cleared_lines - 1) * 2
|
self.combo = self.combo + (cleared_lines - 1) * 2
|
||||||
@ -169,6 +175,8 @@ function SurvivalA1Game:drawScoringInfo()
|
|||||||
love.graphics.printf("SECRET GRADE", 240, 430, 180, "left")
|
love.graphics.printf("SECRET GRADE", 240, 430, 180, "left")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.bravos > 0 then love.graphics.printf("BRAVO", 300, 120, 40, "left") end
|
||||||
|
|
||||||
love.graphics.setFont(font_3x5_3)
|
love.graphics.setFont(font_3x5_3)
|
||||||
love.graphics.printf(self.score, 240, 220, 90, "left")
|
love.graphics.printf(self.score, 240, 220, 90, "left")
|
||||||
if self.gm_conditions["level300"] and self.gm_conditions["level500"] and self.gm_conditions["level900"] then
|
if self.gm_conditions["level300"] and self.gm_conditions["level500"] and self.gm_conditions["level900"] then
|
||||||
@ -182,6 +190,7 @@ function SurvivalA1Game:drawScoringInfo()
|
|||||||
if sg >= 5 then
|
if sg >= 5 then
|
||||||
love.graphics.printf(self.SGnames[sg], 240, 450, 180, "left")
|
love.graphics.printf(self.SGnames[sg], 240, 450, 180, "left")
|
||||||
end
|
end
|
||||||
|
if self.bravos > 0 then love.graphics.printf(self.bravos, 300, 140, 40, "left") end
|
||||||
|
|
||||||
love.graphics.setFont(font_8x11)
|
love.graphics.setFont(font_8x11)
|
||||||
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")
|
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")
|
||||||
|
@ -105,10 +105,11 @@ 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 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.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
|
cleared_lines * self.bravo * self.combo
|
||||||
)
|
)
|
||||||
self.lines = self.lines + cleared_lines
|
self.lines = self.lines + cleared_lines
|
||||||
self.combo = self.combo + (cleared_lines - 1) * 2
|
self.combo = self.combo + (cleared_lines - 1) * 2
|
||||||
@ -141,7 +142,7 @@ function SurvivalA2Game:drawScoringInfo()
|
|||||||
strTrueValues(self.prev_inputs)
|
strTrueValues(self.prev_inputs)
|
||||||
)
|
)
|
||||||
love.graphics.printf("NEXT", 64, 40, 40, "left")
|
love.graphics.printf("NEXT", 64, 40, 40, "left")
|
||||||
love.graphics.printf("GRADE", text_x, 120, 40, "left")
|
if self:getLetterGrade() ~= "" then love.graphics.printf("GRADE", text_x, 120, 40, "left") end
|
||||||
love.graphics.printf("SCORE", text_x, 200, 40, "left")
|
love.graphics.printf("SCORE", text_x, 200, 40, "left")
|
||||||
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
|
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
|
||||||
local sg = self.grid:checkSecretGrade()
|
local sg = self.grid:checkSecretGrade()
|
||||||
@ -151,7 +152,7 @@ function SurvivalA2Game:drawScoringInfo()
|
|||||||
|
|
||||||
love.graphics.setFont(font_3x5_3)
|
love.graphics.setFont(font_3x5_3)
|
||||||
love.graphics.printf(self.score, text_x, 220, 90, "left")
|
love.graphics.printf(self.score, text_x, 220, 90, "left")
|
||||||
love.graphics.printf(self:getLetterGrade(), text_x, 140, 90, "left")
|
if self:getLetterGrade() ~= "" then love.graphics.printf(self:getLetterGrade(), text_x, 140, 90, "left") end
|
||||||
love.graphics.printf(self.level, text_x, 340, 40, "right")
|
love.graphics.printf(self.level, text_x, 340, 40, "right")
|
||||||
love.graphics.printf(self:getSectionEndLevel(), text_x, 370, 40, "right")
|
love.graphics.printf(self:getSectionEndLevel(), text_x, 370, 40, "right")
|
||||||
if sg >= 5 then
|
if sg >= 5 then
|
||||||
|
Loading…
Reference in New Issue
Block a user