整 理 代 码

(应该没有改到字符串里面的东西吧…)起码不直接影响运行
This commit is contained in:
MrZ_26
2022-10-01 11:32:11 +08:00
parent 6e00ff96ec
commit 06f4bb4e1a
236 changed files with 2087 additions and 2114 deletions

View File

@@ -3,7 +3,7 @@ return{
if P.garbageBeneath==0 then
local D=P.modeData
D.finished=D.finished+1
if FIELD[D.finished+1]then
if FIELD[D.finished+1] then
P.waiting=26
for i=#P.field,1,-1 do
P.field[i],P.visTime[i]=nil

View File

@@ -13,7 +13,7 @@ return{
end
end
for i=1,#PLY_ALIVE do
if PLY_ALIVE[i].sid==(minMaxID==1e99 and minID or minMaxID)then
if PLY_ALIVE[i].sid==(minMaxID==1e99 and minID or minMaxID) then
PLY_ALIVE[i].control=true
return
end

View File

@@ -13,7 +13,7 @@ return{
end
end
for i=1,#PLY_ALIVE do
if PLY_ALIVE[i].sid==(minMaxID==1e99 and minID or minMaxID)then
if PLY_ALIVE[i].sid==(minMaxID==1e99 and minID or minMaxID) then
PLY_ALIVE[i].control=true
return
end

View File

@@ -16,8 +16,8 @@ return{
D.counter=D.counter+1
local t=
D.wave<=60 and 240-2*D.wave or
D.wave<=120 and 120-(D.wave-60)or
D.wave<=180 and math.floor(60-(D.wave-120)*.5)or
D.wave<=120 and 120-(D.wave-60) or
D.wave<=180 and math.floor(60-(D.wave-120)*.5) or
30
if D.counter>=t then
D.counter=0

View File

@@ -10,7 +10,7 @@ return{
if P.control then
local D=P.modeData
D.timer=D.timer+1
if D.timer>=math.max(90,180-D.wave)then
if D.timer>=math.max(90,180-D.wave) then
P:garbageRise(21,1,P:getHolePos())
P.stat.recv=P.stat.recv+1
D.timer=0

View File

@@ -10,7 +10,7 @@ return{
if P.control then
local D=P.modeData
D.timer=D.timer+1
if D.timer>=math.max(30,80-.3*D.wave)then
if D.timer>=math.max(30,80-.3*D.wave) then
P:garbageRise(20+D.wave%5,1,P:getHolePos())
P.stat.recv=P.stat.recv+1
D.timer=0

View File

@@ -14,11 +14,11 @@ return{
hook_drop=function(P)
local flag
local l=P.lastPiece
if P.combo>1 then flag=true;P:showText("2x",0,-220,40,'flicker',.3)end
if l.spin then flag=true;P:showText("spin",0,-180,40,'flicker',.3)end
if l.row>1 then flag=true;P:showText("1+",0,-140,40,'flicker',.3)end
if l.hpc then flag=true;P:showText("HPC",0,-100,40,'flicker',.3)end
if l.pc then P:showText("PC",0,-90,100,'beat',.5)end
if P.combo>1 then flag=true;P:showText("2x",0,-220,40,'flicker',.3) end
if l.spin then flag=true;P:showText("spin",0,-180,40,'flicker',.3) end
if l.row>1 then flag=true;P:showText("1+",0,-140,40,'flicker',.3) end
if l.hpc then flag=true;P:showText("HPC",0,-100,40,'flicker',.3) end
if l.pc then P:showText("PC",0,-90,100,'beat',.5) end
if flag then
P:lose()
else

View File

@@ -32,7 +32,7 @@ return{
if s~=3 then E.fall=E.fall-1 end
D.target=D.target+100
elseif s<10 then
if s==5 then BGM.play('distortion')end
if s==5 then BGM.play('distortion') end
P:stageComplete(s)
if s==4 or s==7 then E.das=E.das-1 end
if s%3==0 then E.lock=E.lock-1

View File

@@ -204,7 +204,7 @@ return{
P.gameEnv.drop=getGrav(spd_lvl)
if(P.gameEnv.drop==0) then
if (P.gameEnv.drop==0) then
P:set20G(true)
end

View File

@@ -23,7 +23,7 @@ return{
if c==0 and D.pt%100==99 then
if D.pt<1000 then
hidetimer=0-inv_wait[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1]
if c>0 then hidetimer=hidetimer-inv_fall[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1]end
if c>0 then hidetimer=hidetimer-inv_fall[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1] end
end
return
end
@@ -35,7 +35,7 @@ return{
held=false
if D.pt<1000 then
hidetimer=0-inv_wait[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1]
if c>0 then hidetimer=hidetimer-inv_fall[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1]end
if c>0 then hidetimer=hidetimer-inv_fall[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1] end
end
if D.pt%100==99 then
@@ -78,7 +78,7 @@ return{
held=true
end
hidetimer=hidetimer+1
if hidetimer>inv_hide[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1]then
if hidetimer>inv_hide[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1] then
P.gameEnv.block=false
else
P.gameEnv.block=true

View File

@@ -36,7 +36,7 @@ return
SFX.play('reach')
elseif T==26 then--Stage 3: dig to bottom
P:stageComplete(3)
if not P.holdQueue[1]then--1 up if ban hold
if not P.holdQueue[1] then--1 up if ban hold
P.life=P.life+1
end
P.waiting=45
@@ -44,7 +44,7 @@ return
ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3]
for i=1,10 do
if P.field[i]then
if P.field[i] then
for j=1,10 do
if P.field[i][j]>0 then
P.field[i][j]=17
@@ -137,7 +137,7 @@ return
elseif T==259 then--Stage 9: ending
P:stageComplete(9)
P.life=P.life+1
for i=1,7 do ENV.skin[i]=P.holeRND:random(16)end
for i=1,7 do ENV.skin[i]=P.holeRND:random(16) end
P:setInvisible(40)
ENV.lock=15

View File

@@ -11,7 +11,7 @@ local function task_PC(P)
P:pushNextList(L,symmetry)
P.control=false
if P.frameRun>180 then for _=1,26 do coroutine.yield()end end
if P.frameRun>180 then for _=1,26 do coroutine.yield() end end
P.control=true
local base=PCbase[difficulty]
@@ -31,9 +31,9 @@ local function _check(P)
if P.stat.pc%4==0 and P.stat.pc>0 and P.stat.pc<=40 then
local s=P.stat.pc/4
P.gameEnv.drop=pc_drop[s]or 10
P.gameEnv.lock=pc_lock[s]or 25
P.gameEnv.fall=pc_fall[s]or 4
P.gameEnv.drop=pc_drop[s] or 10
P.gameEnv.lock=pc_lock[s] or 25
P.gameEnv.fall=pc_fall[s] or 4
if s==10 then
P:_showText(text.maxspeed,0,-140,100,'appear',.6)
end

View File

@@ -8,13 +8,13 @@ local PCtype={
1,2,3,
}
local function task_PC(P)
local difficulty=PCtype[P.stat.pc+1]or 3
local difficulty=PCtype[P.stat.pc+1] or 3
local L=PClist[difficulty][P.holeRND:random(#PClist[difficulty])]
local symmetry=P.holeRND:random()>.5
P:pushNextList(L,symmetry)
P.control=false
if P.frameRun>180 then for _=1,26 do coroutine.yield()end end
if P.frameRun>180 then for _=1,26 do coroutine.yield() end end
P.control=true
local base=PCbase[difficulty]

View File

@@ -46,7 +46,7 @@ local function generateGuide(num)
end
return{
fkey1=function(P)P.modeData.showGuide=not P.modeData.showGuide end,
fkey1=function(P) P.modeData.showGuide=not P.modeData.showGuide end,
mesDisp=function(P)
mText(TEXTOBJ.grade,63,190)
mText(TEXTOBJ.line,63,310)

View File

@@ -9,16 +9,16 @@ return{
task=function(P)
coroutine.yield()
while true do
for _=1,P.holeRND:random(40,200)do coroutine.yield()end
for _=1,P.holeRND:random(40,200) do coroutine.yield() end
local r=P.holeRND:random(7)
if r==1 then
if P.cur and not P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then
if P.cur and not P:ifoverlap(P.cur.bk,P.curX-1,P.curY) then
P:createMoveFX('left')
P.curX=P.curX-1
P:freshBlock('move')
end
elseif r==2 then
if P.cur and not P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then
if P.cur and not P:ifoverlap(P.cur.bk,P.curX-1,P.curY) then
P:createMoveFX('left')
P.curX=P.curX-1
P:freshBlock('move')

View File

@@ -19,7 +19,7 @@ return{
for y=1,#F do
local l=F[y]
for x=1,5 do
if l[x]>0 and l[11-x]>0 and oppo[l[x]]~=l[11-x]then
if l[x]>0 and l[11-x]>0 and oppo[l[x]]~=l[11-x] then
P:lose()
return
end

View File

@@ -10,7 +10,7 @@ return{
if P.control then
local D=P.modeData
D.timer=D.timer+1
if D.timer>=math.max(60,150-2*D.wave)and P.atkBufferSum<4 then
if D.timer>=math.max(60,150-2*D.wave) and P.atkBufferSum<4 then
if D.wave==100 then
P:win('finish')
else

View File

@@ -10,7 +10,7 @@ return{
if P.control then
local D=P.modeData
D.timer=D.timer+1
if D.timer>=math.max(60,180-2*D.wave)and P.atkBufferSum<15 then
if D.timer>=math.max(60,180-2*D.wave) and P.atkBufferSum<15 then
if D.wave==90 then
P:win('finish')
else

View File

@@ -10,7 +10,7 @@ return{
if P.control then
local D=P.modeData
D.timer=D.timer+1
if D.timer>=math.max(60,150-D.wave)and P.atkBufferSum<20 then
if D.timer>=math.max(60,150-D.wave) and P.atkBufferSum<20 then
if D.wave==110 then
P:win('finish')
else

View File

@@ -10,15 +10,15 @@ return{
if P.control then
local D=P.modeData
D.timer=D.timer+1
if D.timer>=math.max(90,180-2*D.wave)and P.atkBufferSum<8 then
if D.timer>=math.max(90,180-2*D.wave) and P.atkBufferSum<8 then
if D.wave==80 then
P:win('finish')
else
local d=D.wave+1
table.insert(P.atkBuffer,
d%4==0 and{line=generateLine(P.holeRND:random(10)),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1}or
d%4==1 and{line=generateLine(P.holeRND:random(10)),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1}or
d%4==2 and{line=generateLine(P.holeRND:random(10)),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2}or
d%4==0 and{line=generateLine(P.holeRND:random(10)),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1} or
d%4==1 and{line=generateLine(P.holeRND:random(10)),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1} or
d%4==2 and{line=generateLine(P.holeRND:random(10)),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2} or
d%4==3 and{line=generateLine(P.holeRND:random(10)),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3}
)
P.atkBufferSum=P.atkBufferSum+d%4+1

View File

@@ -10,7 +10,7 @@ return{
if P.control then
local D=P.modeData
D.timer=D.timer+1
if D.timer>=math.max(300,600-10*D.wave)and P.atkBufferSum<20 then
if D.timer>=math.max(300,600-10*D.wave) and P.atkBufferSum<20 then
if D.wave==35 then
P:win('finish')
else

View File

@@ -15,7 +15,7 @@ return{
local C=P.lastPiece
if C.row>0 then
if C.row==4 then
if TABLE.find(P.modeData.history,C.curX)then
if TABLE.find(P.modeData.history,C.curX) then
P:showText("STACK",0,-140,40,'flicker',.3)
P:lose()
else

View File

@@ -4,7 +4,7 @@ return{
GC.mStr(P.modeData.tsd,63,250)
mText(TEXTOBJ.tsd,63,315)
local L=P.modeData.history
if L[1]and L[1]==L[2]and L[1]==L[3]then
if L[1] and L[1]==L[2] and L[1]==L[3] then
PLY.draw.applyField(P)
GC.setColor(1,.3,.3,.2)
GC.rectangle('fill',30*L[1]-30,0,30,600)
@@ -16,7 +16,7 @@ return{
if C.row>0 then
if C.id==5 and C.row==2 and C.spin then
local L=P.modeData.history
if L[1]==C.centX and L[1]==L[2]and L[1]==L[3]then
if L[1]==C.centX and L[1]==L[2] and L[1]==L[3] then
P:showText("STACK",0,-140,40,'flicker',.3)
P:lose()
else

View File

@@ -15,7 +15,7 @@ return{
local C=P.lastPiece
if C.row>0 then
if C.id==5 and C.row==2 and C.spin then
if TABLE.find(P.modeData.history,C.centX)then
if TABLE.find(P.modeData.history,C.centX) then
P:showText("STACK",0,-140,40,'flicker',.3)
P:lose()
else

View File

@@ -22,7 +22,7 @@ return{
P.modeData.section=1
while true do
coroutine.yield()
while P.stat.frame>=warnTime[P.modeData.section]do
while P.stat.frame>=warnTime[P.modeData.section] do
if P.modeData.section<9 then
P.modeData.section=P.modeData.section+1
playReadySFX(3,.7+P.modeData.section*.03)