Compare commits

...

16 Commits

Author SHA1 Message Date
Ishaan Bhardwaj
52d4aeb3d0 Merge branch 'Tetro48-replay-qol' 2023-07-10 20:51:02 -04:00
Ishaan Bhardwaj
91279c9f38 Merge branch 'replay-qol' of https://github.com/Tetro48/cambridge into Tetro48-replay-qol 2023-07-10 20:50:44 -04:00
Ishaan Bhardwaj
0572803627 Fixed a slight indentation error 2023-07-09 22:35:07 -04:00
Tetro48
1fef7b4880 Added replay fast-forwarding 2023-07-10 08:58:09 +07:00
Ishaan Bhardwaj
e09b044de4 Merge pull request #71 from Kirby703/patch-13
fix lategame levelling bug
2023-07-09 20:45:35 -04:00
Kirby703
7d6f783c40 fix lategame levelling bug 2023-07-09 20:06:27 -04:00
Ishaan Bhardwaj
9d365f61a7 Merge pull request #70 from Kirby703/patch-12
fix duplicate cool at 2000
2023-07-09 15:44:04 -04:00
Kirby703
082697c3cd fix duplicate cool at 2000
now you have to survive the roll for gm! terrifying
2023-07-09 15:41:19 -04:00
Ishaan Bhardwaj
788aa11470 Bump version to v0.3.3.2 2023-07-07 18:16:34 -04:00
Ishaan Bhardwaj
a303e82b90 Merge branch 'master' of https://github.com/millabasset/cambridge 2023-07-07 18:14:20 -04:00
Ishaan Bhardwaj
b06d03c4e6 Fix bravo detection 2023-07-07 18:14:17 -04:00
Ishaan Bhardwaj
a6b8abff6d Merge pull request #69 from Kirby703/patch-11
hotfix cool logic
2023-07-07 17:19:24 -04:00
Kirby703
bdc317c3c5 hotfix cool logic 2023-07-07 17:10:24 -04:00
Ishaan Bhardwaj
71c9147a2c Merge pull request #68 from Kirby703/patch-10
re-add 180s and IRS wallkicks after inheritance change
2023-07-04 02:38:52 -04:00
Kirby703
79d706a415 re-add 180s and IRS wallkicks after inheritance change
fixes results of 323c457809
2023-07-04 02:27:04 -04:00
Ishaan Bhardwaj
5fa144f146 Fix Marathon 2020 section cool highlighting 2023-07-02 19:47:39 -04:00
7 changed files with 55 additions and 24 deletions

View File

@@ -1 +1 @@
version = "v0.3.3.1"
version = "v0.3.3.2"

View File

@@ -36,6 +36,7 @@ function ReplayScene:new(replay, game_mode, ruleset)
self.game.pause_time = replay["pause_time"]
self.replay = deepcopy(replay)
self.replay_index = 1
self.replay_speed = 1
DiscordRPC:update({
details = "Viewing a replay",
state = self.game.name,
@@ -44,7 +45,10 @@ function ReplayScene:new(replay, game_mode, ruleset)
end
function ReplayScene:update()
local frames_left = self.replay_speed
if not self.paused then
while frames_left > 0 do
frames_left = frames_left - 1
self.inputs = self.replay["inputs"][self.replay_index]["inputs"]
self.replay["inputs"][self.replay_index]["frames"] = self.replay["inputs"][self.replay_index]["frames"] - 1
if self.replay["inputs"][self.replay_index]["frames"] == 0 and self.replay_index < table.getn(self.replay["inputs"]) then
@@ -56,6 +60,7 @@ function ReplayScene:update()
end
self.game:update(input_copy, self.ruleset)
self.game.grid:update()
end
DiscordRPC:update({
details = "Viewing a replay",
state = self.game.name,
@@ -69,6 +74,11 @@ function ReplayScene:render()
love.graphics.setColor(1, 1, 1, 1)
love.graphics.setFont(font_3x5_3)
love.graphics.printf("REPLAY", 0, 0, 635, "right")
local pauses_y_coordinate = 23
if self.replay_speed > 1 then
pauses_y_coordinate = pauses_y_coordinate + 20
love.graphics.printf(self.replay_speed.."X", 0, 20, 635, "right")
end
love.graphics.setFont(font_3x5_2)
if self.game.pause_time and self.game.pause_count then
if self.game.pause_time > 0 or self.game.pause_count > 0 then
@@ -77,10 +87,10 @@ function ReplayScene:render()
self.game.pause_count,
self.game.pause_count == 1 and "" or "S",
formatTime(self.game.pause_time)
), 0, 23, 635, "right")
), 0, pauses_y_coordinate, 635, "right")
end
else
love.graphics.printf("?? PAUSES (--:--.--)", 0, 23, 635, "right")
love.graphics.printf("?? PAUSES (--:--.--)", 0, pauses_y_coordinate, 635, "right")
end
end
@@ -104,6 +114,16 @@ function ReplayScene:onInputPress(e)
self.paused = not self.paused
if self.paused then pauseBGM()
else resumeBGM() end
elseif e.input == "left" then
self.replay_speed = self.replay_speed - 1
if self.replay_speed < 1 then
self.replay_speed = 1
end
elseif e.input == "right" then
self.replay_speed = self.replay_speed + 1
if self.replay_speed > 99 then
self.replay_speed = 99
end
end
end

View File

@@ -231,12 +231,15 @@ function Grid:applyBigPiece(piece)
end
end
function Grid:checkForBravo(cleared_row_count)
for i = 0, self.height - 1 - cleared_row_count do
-- places where you see this take an argument used the old, buggy method
function Grid:checkForBravo()
for i = 0, self.height - 1 do
if not self:isRowFull(i+1) then
for j = 0, self.width - 1 do
if self:isOccupied(j, i) then return false end
end
end
end
return true
end

View File

@@ -283,7 +283,7 @@ function Marathon2020Game:sectionPassed(old_level, new_level)
)
else
return (
(new_level < 2001 and math.floor(old_level / 100) < math.floor(new_level / 100)) or
(new_level < 2000 and math.floor(old_level / 100) < math.floor(new_level / 100)) or
(new_level >= 2020)
)
end
@@ -352,9 +352,13 @@ function Marathon2020Game:updateSectionTimes(old_level, new_level)
table.insert(self.section_times, section_time)
self.section_start_time = self.frames
if self.secondary_section_times[section] < cool_cutoffs[self.delay_level] and
(section == 1 or self.secondary_section_times[section] <= self.secondary_section_times[section - 1] + 120) then
if (
(self.secondary_section_times[section] < cool_cutoffs[self.delay_level]) and
(section == 1 or self.secondary_section_times[section] <= self.secondary_section_times[section - 1] + 120)
) then
sectionCool(section)
else
table.insert(self.section_status, "none")
end
if section > 5 then

View File

@@ -143,7 +143,7 @@ end
function Survival2020Game:onPieceEnter()
if not self.clear and (
(self.level < 1900 and self.level % 100 ~= 99) or
self.level == 2019
(1900 <= self.level and self.level < 2019)
) then
self.level = self.level + 1
end
@@ -249,7 +249,7 @@ function Survival2020Game:drawScoringInfo()
end
function Survival2020Game:getBackground()
return math.floor(self.level / 100)
return math.min(19, math.floor(self.level / 100))
end
function Survival2020Game:getHighscoreData()

View File

@@ -8,6 +8,8 @@ SRS.hash = "Standard"
SRS.softdrop_lock = false
SRS.harddrop_lock = true
SRS.enable_IRS_wallkicks = true
SRS.MANIPULATIONS_MAX = 15
SRS.wallkicks_line = {
@@ -108,4 +110,6 @@ end
function SRS:canPieceRotate() return true end
function SRS:get180RotationValue() return 2 end
return SRS