垃圾行计时速度从GAME移至gameEnv

This commit is contained in:
MrZ626
2020-12-14 16:49:11 +08:00
parent a12df840a4
commit 020c87158c
15 changed files with 24 additions and 16 deletions

View File

@@ -402,23 +402,26 @@ function royaleLevelup()
spd=30 spd=30
elseif GAME.stage==3 then elseif GAME.stage==3 then
spd=15 spd=15
GAME.garbageSpeed=.6 for _,P in next,#PLAYERS.alive do
P.gameEnv.garbageSpeed=.6
end
if PLAYERS[1].alive then BGM.play("cruelty")end if PLAYERS[1].alive then BGM.play("cruelty")end
elseif GAME.stage==4 then elseif GAME.stage==4 then
spd=10 spd=10
local _=PLAYERS.alive for _,P in next,#PLAYERS.alive do
for i=1,#_ do P.gameEnv.pushSpeed=3
_[i].gameEnv.pushSpeed=3
end end
elseif GAME.stage==5 then elseif GAME.stage==5 then
spd=5 spd=5
GAME.garbageSpeed=1 for _,P in next,#PLAYERS.alive do
P.gameEnv.garbageSpeed=1
end
elseif GAME.stage==6 then elseif GAME.stage==6 then
spd=3 spd=3
if PLAYERS[1].alive then BGM.play("final")end if PLAYERS[1].alive then BGM.play("final")end
end end
for i=1,#PLAYERS.alive do for _,P in next,#PLAYERS.alive do
PLAYERS.alive[i].gameEnv.drop=spd P.gameEnv.drop=spd
end end
if GAME.curMode.name:find("ultimate")then if GAME.curMode.name:find("ultimate")then
for i=1,#PLAYERS.alive do for i=1,#PLAYERS.alive do
@@ -539,7 +542,6 @@ function resetGameData(replaying)
end end
GAME.result=false GAME.result=false
GAME.garbageSpeed=1
GAME.warnLVL0=0 GAME.warnLVL0=0
GAME.warnLVL=0 GAME.warnLVL=0
if replaying then if replaying then
@@ -582,7 +584,6 @@ function resetGameData(replaying)
GAME.mostDangerous=nil GAME.mostDangerous=nil
GAME.secDangerous=nil GAME.secDangerous=nil
GAME.stage=1 GAME.stage=1
GAME.garbageSpeed=.3
end end
STAT.game=STAT.game+1 STAT.game=STAT.game+1
FREEROW.reset(30*#PLAYERS) FREEROW.reset(30*#PLAYERS)

View File

@@ -191,6 +191,7 @@ CUSTOMENV={--gameEnv for cutsom game
freshLimit=1e99, freshLimit=1e99,
opponent=0, opponent=0,
life=0, life=0,
garbageSpeed=1,
pushSpeed=3, pushSpeed=3,
--Else --Else
@@ -205,7 +206,6 @@ GAME={--Global game data
result=false, --Game result (string) result=false, --Game result (string)
pauseTime=0, --Time paused pauseTime=0, --Time paused
pauseCount=0, --Pausing count pauseCount=0, --Pausing count
garbageSpeed=1, --Garbage timing speed
warnLVL0=0, --Warning level warnLVL0=0, --Warning level
warnLVL=0, --Warning level (show) warnLVL=0, --Warning level (show)

View File

@@ -16,12 +16,12 @@ return{
drop=300,lock=300, drop=300,lock=300,
infHold=true, infHold=true,
dropPiece=update_round, dropPiece=update_round,
garbageSpeed=1e99,
bg="rainbow",bgm="push", bg="rainbow",bgm="push",
}, },
load=function() load=function()
PLY.newPlayer(1) PLY.newPlayer(1)
PLY.newAIPlayer(2,AIBUILDER("CC",10,1,true,10000)) PLY.newAIPlayer(2,AIBUILDER("CC",10,1,true,10000))
GAME.garbageSpeed=1e99
end, end,
score=function(P)return{P.stat.piece,P.stat.frame/60}end, score=function(P)return{P.stat.piece,P.stat.frame/60}end,
scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end, scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end,

View File

@@ -16,12 +16,12 @@ return{
drop=300,lock=300, drop=300,lock=300,
infHold=true, infHold=true,
dropPiece=update_round, dropPiece=update_round,
garbageSpeed=1e99,
bg="rainbow",bgm="push", bg="rainbow",bgm="push",
}, },
load=function() load=function()
PLY.newPlayer(1) PLY.newPlayer(1)
PLY.newAIPlayer(2,AIBUILDER("CC",10,1,true,13000)) PLY.newAIPlayer(2,AIBUILDER("CC",10,1,true,13000))
GAME.garbageSpeed=1e99
end, end,
score=function(P)return{P.stat.piece,P.stat.frame/60}end, score=function(P)return{P.stat.piece,P.stat.frame/60}end,
scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end, scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end,

View File

@@ -16,12 +16,12 @@ return{
drop=300,lock=300, drop=300,lock=300,
infHold=true, infHold=true,
dropPiece=update_round, dropPiece=update_round,
garbageSpeed=1e99,
bg="rainbow",bgm="push", bg="rainbow",bgm="push",
}, },
load=function() load=function()
PLY.newPlayer(1) PLY.newPlayer(1)
PLY.newAIPlayer(2,AIBUILDER("CC",10,2,true,16000)) PLY.newAIPlayer(2,AIBUILDER("CC",10,2,true,16000))
GAME.garbageSpeed=1e99
end, end,
score=function(P)return{P.stat.piece,P.stat.frame/60}end, score=function(P)return{P.stat.piece,P.stat.frame/60}end,
scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end, scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end,

View File

@@ -16,12 +16,12 @@ return{
drop=300,lock=300, drop=300,lock=300,
infHold=true, infHold=true,
dropPiece=update_round, dropPiece=update_round,
garbageSpeed=1e99,
bg="rainbow",bgm="push", bg="rainbow",bgm="push",
}, },
load=function() load=function()
PLY.newPlayer(1) PLY.newPlayer(1)
PLY.newAIPlayer(2,AIBUILDER("CC",10,3,true,26000)) PLY.newAIPlayer(2,AIBUILDER("CC",10,3,true,26000))
GAME.garbageSpeed=1e99
end, end,
score=function(P)return{P.stat.piece,P.stat.frame/60}end, score=function(P)return{P.stat.piece,P.stat.frame/60}end,
scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end, scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end,

View File

@@ -16,12 +16,12 @@ return{
drop=300,lock=300, drop=300,lock=300,
infHold=true, infHold=true,
dropPiece=update_round, dropPiece=update_round,
garbageSpeed=1e99,
bg="rainbow",bgm="push", bg="rainbow",bgm="push",
}, },
load=function() load=function()
PLY.newPlayer(1) PLY.newPlayer(1)
PLY.newAIPlayer(2,AIBUILDER("CC",10,3,true,40000)) PLY.newAIPlayer(2,AIBUILDER("CC",10,3,true,40000))
GAME.garbageSpeed=1e99
end, end,
score=function(P)return{P.stat.piece,P.stat.frame/60}end, score=function(P)return{P.stat.piece,P.stat.frame/60}end,
scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end, scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end,

View File

@@ -22,6 +22,7 @@ return{
fall=20, fall=20,
royaleMode=true, royaleMode=true,
Fkey=selectTarget, Fkey=selectTarget,
garbageSpeed=.3,
pushSpeed=2, pushSpeed=2,
freshLimit=15, freshLimit=15,
bg="rainbow",bgm="rockblock", bg="rainbow",bgm="rockblock",

View File

@@ -22,6 +22,7 @@ return{
fall=20, fall=20,
royaleMode=true, royaleMode=true,
Fkey=selectTarget, Fkey=selectTarget,
garbageSpeed=.3,
pushSpeed=2, pushSpeed=2,
freshLimit=15, freshLimit=15,
bg="rainbow",bgm="rockblock", bg="rainbow",bgm="rockblock",

View File

@@ -22,6 +22,7 @@ return{
fall=20, fall=20,
royaleMode=true, royaleMode=true,
Fkey=selectTarget, Fkey=selectTarget,
garbageSpeed=.3,
pushSpeed=2, pushSpeed=2,
freshLimit=15, freshLimit=15,
bg="rainbow",bgm="rockblock", bg="rainbow",bgm="rockblock",

View File

@@ -22,6 +22,7 @@ return{
fall=20, fall=20,
royaleMode=true, royaleMode=true,
Fkey=selectTarget, Fkey=selectTarget,
garbageSpeed=.3,
pushSpeed=2, pushSpeed=2,
freshLimit=15, freshLimit=15,
bg="rainbow",bgm="rockblock", bg="rainbow",bgm="rockblock",

View File

@@ -22,6 +22,7 @@ return{
fall=20, fall=20,
royaleMode=true, royaleMode=true,
Fkey=selectTarget, Fkey=selectTarget,
garbageSpeed=.3,
pushSpeed=2, pushSpeed=2,
freshLimit=15, freshLimit=15,
bg="rainbow",bgm="rockblock", bg="rainbow",bgm="rockblock",

View File

@@ -22,6 +22,7 @@ return{
fall=20, fall=20,
royaleMode=true, royaleMode=true,
Fkey=selectTarget, Fkey=selectTarget,
garbageSpeed=.3,
pushSpeed=2, pushSpeed=2,
freshLimit=15, freshLimit=15,
bg="rainbow",bgm="rockblock", bg="rainbow",bgm="rockblock",

View File

@@ -39,6 +39,7 @@ return{
mission=NULL, mission=NULL,
life=0, life=0,
garbageSpeed=1,
pushSpeed=3, pushSpeed=3,
block=true, block=true,
noTele=false, noTele=false,

View File

@@ -10,7 +10,7 @@ local function updateLine(P)--Attacks, line pushing, cam moving
A.time=A.time+1 A.time=A.time+1
if not A.sent then if not A.sent then
if A.countdown>0 then if A.countdown>0 then
A.countdown=max(A.countdown-GAME.garbageSpeed,0) A.countdown=max(A.countdown-P.gameEnv.garbageSpeed,0)
end end
else else
if A.time>20 then if A.time>20 then