整理代码

This commit is contained in:
MrZ626
2020-09-10 11:11:29 +08:00
parent aa9dca918d
commit 50963fbd59
8 changed files with 48 additions and 32 deletions

View File

@@ -4,27 +4,32 @@ local death_lock={12,11,10,9,8}
local death_wait={10,9,8,7,6}
local death_fall={10,9,8,7,6}
local function score(P)
local MD=P.modeData
local c=#P.clearedRow
if c==0 and P.modeData.point%100==99 then return end
if c==0 and MD.point%100==99 then return end
local s=c<3 and c+1 or c==3 and 5 or 7
if P.combo>7 then s=s+2
elseif P.combo>3 then s=s+1
end
P.modeData.point=P.modeData.point+s
if P.modeData.point%100==99 then
MD.point=MD.point+s
if MD.point%100==99 then
SFX.play("blip_1")
elseif P.modeData.point>=100*(P.modeData.event+1)then
elseif MD.point>=100*(MD.event+1)then
--Level up!
local s=P.modeData.event+1;P.modeData.event=s
local s=MD.event+1;MD.event=s
local E=P.gameEnv
BG.set(s==1 and"rainbow"or s==2 and"rainbow2"or s==3 and"lightning"or s==4 and"lightning2"or"lightning")
E.lock=death_lock[s]
E.wait=death_wait[s]
E.fall=death_fall[s]
E.das=int(6.9-s*.4)
if s==3 then P.gameEnv.bone=true end
if s==3 then
P.gameEnv.bone=true
end
if s==5 then
P.modeData.point,P.modeData.event=500,4
MD.point,MD.event=500,4
P:win("finish")
else
P:showTextF(text.stage(s),0,-120,80,"fly")