mirror of
https://github.com/SashLilac/cambridge-modpack.git
synced 2024-11-22 16:49:01 -06:00
WCB shuffles colors every 50 pieces
This commit is contained in:
parent
8d77fd6400
commit
f42f28f9f2
@ -11,12 +11,14 @@ MarathonWCBGame.name = "Marathon WCB"
|
|||||||
MarathonWCBGame.hash = "MarathonWCB"
|
MarathonWCBGame.hash = "MarathonWCB"
|
||||||
MarathonWCBGame.tagline = "When all the pieces slip right to their destinations... can you keep up?"
|
MarathonWCBGame.tagline = "When all the pieces slip right to their destinations... can you keep up?"
|
||||||
|
|
||||||
|
local slow = false
|
||||||
|
|
||||||
function MarathonWCBGame:new()
|
function MarathonWCBGame:new()
|
||||||
MarathonWCBGame.super:new()
|
MarathonWCBGame.super:new()
|
||||||
|
|
||||||
self.pieces = 0
|
self.pieces = 0
|
||||||
self.randomizer = History6RollsRandomizer()
|
self.randomizer = History6RollsRandomizer()
|
||||||
|
self.colour_changed = true
|
||||||
|
|
||||||
self.lock_drop = true
|
self.lock_drop = true
|
||||||
self.lock_hard_drop = true
|
self.lock_hard_drop = true
|
||||||
@ -40,7 +42,7 @@ function MarathonWCBGame:getDropSpeed()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function MarathonWCBGame:getARR()
|
function MarathonWCBGame:getARR()
|
||||||
return 0
|
return slow and 1 or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function MarathonWCBGame:getARE()
|
function MarathonWCBGame:getARE()
|
||||||
@ -52,7 +54,7 @@ function MarathonWCBGame:getLineARE()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function MarathonWCBGame:getDasLimit()
|
function MarathonWCBGame:getDasLimit()
|
||||||
return 0
|
return slow and 15 or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function MarathonWCBGame:getLineClearDelay()
|
function MarathonWCBGame:getLineClearDelay()
|
||||||
@ -67,9 +69,21 @@ function MarathonWCBGame:getGravity()
|
|||||||
return self.piece_is_active and 20 or 0
|
return self.piece_is_active and 20 or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function MarathonWCBGame:advanceOneFrame()
|
function MarathonWCBGame:advanceOneFrame(inputs, ruleset)
|
||||||
if self.ready_frames == 0 then
|
if self.ready_frames == 0 then
|
||||||
self.frames = self.frames + 1
|
self.frames = self.frames + 1
|
||||||
|
slow = inputs.hold
|
||||||
|
if self.pieces % 50 == 0 and not self.colour_changed then
|
||||||
|
local colours = copy(ruleset.colourscheme)
|
||||||
|
local pieces = {}
|
||||||
|
for k, v in pairs(ruleset.colourscheme) do
|
||||||
|
table.insert(pieces, k)
|
||||||
|
end
|
||||||
|
for k, v in pairs(ruleset.colourscheme) do
|
||||||
|
ruleset.colourscheme[k] = colours[table.remove(pieces, math.random(#pieces))]
|
||||||
|
end
|
||||||
|
self.colour_changed = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@ -89,6 +103,7 @@ end
|
|||||||
function MarathonWCBGame:onPieceLock()
|
function MarathonWCBGame:onPieceLock()
|
||||||
self.super:onPieceLock()
|
self.super:onPieceLock()
|
||||||
self.piece_is_active = false
|
self.piece_is_active = false
|
||||||
|
self.colour_changed = false
|
||||||
self.pieces = self.pieces + 1
|
self.pieces = self.pieces + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user