垃圾行计时速度从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
elseif GAME.stage==3 then
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
elseif GAME.stage==4 then
spd=10
local _=PLAYERS.alive
for i=1,#_ do
_[i].gameEnv.pushSpeed=3
for _,P in next,#PLAYERS.alive do
P.gameEnv.pushSpeed=3
end
elseif GAME.stage==5 then
spd=5
GAME.garbageSpeed=1
for _,P in next,#PLAYERS.alive do
P.gameEnv.garbageSpeed=1
end
elseif GAME.stage==6 then
spd=3
if PLAYERS[1].alive then BGM.play("final")end
end
for i=1,#PLAYERS.alive do
PLAYERS.alive[i].gameEnv.drop=spd
for _,P in next,#PLAYERS.alive do
P.gameEnv.drop=spd
end
if GAME.curMode.name:find("ultimate")then
for i=1,#PLAYERS.alive do
@@ -539,7 +542,6 @@ function resetGameData(replaying)
end
GAME.result=false
GAME.garbageSpeed=1
GAME.warnLVL0=0
GAME.warnLVL=0
if replaying then
@@ -582,7 +584,6 @@ function resetGameData(replaying)
GAME.mostDangerous=nil
GAME.secDangerous=nil
GAME.stage=1
GAME.garbageSpeed=.3
end
STAT.game=STAT.game+1
FREEROW.reset(30*#PLAYERS)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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