diff --git a/tetris/modes/beginner_a2.lua b/tetris/modes/beginner_a2.lua index 0f872d7..6a92ae3 100644 --- a/tetris/modes/beginner_a2.lua +++ b/tetris/modes/beginner_a2.lua @@ -24,6 +24,7 @@ function BeginnerA2Game:new() "GM" } + self.additive_gravity = false self.lock_drop = false self.lock_hard_drop = false self.enable_hold = false diff --git a/tetris/modes/marathon_c88.lua b/tetris/modes/marathon_c88.lua index de757dc..beb134e 100644 --- a/tetris/modes/marathon_c88.lua +++ b/tetris/modes/marathon_c88.lua @@ -31,6 +31,7 @@ function MarathonC88Game:new(secret_inputs) self.randomizer = SegaRandomizer() + self.additive_gravity = false self.lock_drop = false self.enable_hard_drop = false self.enable_hold = false diff --git a/tetris/modes/marathon_c99.lua b/tetris/modes/marathon_c99.lua index b6b16d6..f872bf2 100644 --- a/tetris/modes/marathon_c99.lua +++ b/tetris/modes/marathon_c99.lua @@ -51,6 +51,7 @@ function MarathonC99Game:new() self.super:new() self.grid = Grid(10, 22) + self.additive_gravity = false self.roll_frames = 0 self.lines_to_next_level = lines_to_next_level[self.level] self.slots = {} diff --git a/tetris/modes/marathon_st.lua b/tetris/modes/marathon_st.lua index 74978dc..d9d5602 100644 --- a/tetris/modes/marathon_st.lua +++ b/tetris/modes/marathon_st.lua @@ -117,8 +117,15 @@ end function MarathonSTGame:advanceOneFrame() if self.clear then self.roll_frames = self.roll_frames + 1 - if self.roll_frames < 0 then return false end + if self.roll_frames < 0 then + if self.roll_frames + 1 == 0 then + switchBGM("credit_roll", "gm3") + return true + end + return false + end if self.roll_frames > 3694 then + switchBGM(nil) self.completed = true end elseif self.ready_frames == 0 then @@ -142,6 +149,7 @@ function MarathonSTGame:onPieceLock(piece, cleared_row_count) self.clear = true self.grid:clear() self.roll_frames = -150 + switchBGM(nil) end end @@ -275,6 +283,24 @@ local function rollOpacityFunction(game, block, x, y, age) end end +function MarathonSTGame:swapMusic(level) + if self.ready_frames ~= 0 then return end + local bgm_table = { + 0, 480, 500, 680, + 700, 880, 900, 1080, + 1100, 1280, 1300, 1480 + } + for entry, lvl in ipairs(bgm_table) do + if (level >= lvl and self.bgm_progression < entry) then + if entry % 2 == 0 then + fadeoutBGM(0.5) + else + switchBGMLoop(0.5 * (entry - 1) + 1) + end + self.bgm_progression = entry + end + end +end function MarathonSTGame:drawGrid() if self.clear and not (self.game_over or self.completed) then diff --git a/tetris/modes/tgmplus.lua b/tetris/modes/tgmplus.lua index 8c43136..85e7410 100644 --- a/tetris/modes/tgmplus.lua +++ b/tetris/modes/tgmplus.lua @@ -25,6 +25,7 @@ function TGMPlusGame:new() self.randomizer = History6RollsRandomizer() + self.additive_gravity = false self.lock_drop = false self.lock_hard_drop = false self.enable_hold = false