Task模块全部改用协程
This commit is contained in:
@@ -23,11 +23,14 @@ return{
|
||||
freshLimit=15,
|
||||
dropPiece=score,
|
||||
task=function(P)
|
||||
while true do
|
||||
coroutine.yield()
|
||||
if P.stat.frame>=53.5*60 then
|
||||
P.modeData.point=min(P.modeData.point+16,80)
|
||||
P.modeData.event=sectionName[int(P.modeData.point*.1)+1]
|
||||
P:win("finish")
|
||||
return true
|
||||
P.modeData.point=min(P.modeData.point+16,80)
|
||||
P.modeData.event=sectionName[int(P.modeData.point*.1)+1]
|
||||
P:win("finish")
|
||||
return
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="tunnel",bgm="far",
|
||||
|
||||
@@ -6,29 +6,31 @@ return{
|
||||
freshLimit=15,
|
||||
pushSpeed=2,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
if P.atkBuffer.sum==0 then
|
||||
local p=#P.atkBuffer+1
|
||||
local B,D=P.atkBuffer,P.modeData
|
||||
local t
|
||||
if D.event<20 then
|
||||
t=1500-30*D.event--1500~900
|
||||
B[p]= {pos=P:RND(4,7),amount=12,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
B[p+1]= {pos=P:RND(3,8),amount=10,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
else
|
||||
t=900-10*(D.event-20)--900~600
|
||||
B[p]= {pos=P:RND(10),amount=14,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
B[p+1]= {pos=P:RND(4,7),amount=8,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||
end
|
||||
B.sum=B.sum+22
|
||||
P.stat.recv=P.stat.recv+22
|
||||
D.event=D.event+1
|
||||
if D.event%10==0 then
|
||||
if D.event==20 then
|
||||
P:showTextF(text.great,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=3
|
||||
elseif D.event==50 then
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
while true do
|
||||
coroutine.yield()
|
||||
if P.control and SCN.cur=="play"and P.atkBuffer.sum==0 then
|
||||
local p=#P.atkBuffer+1
|
||||
local B,D=P.atkBuffer,P.modeData
|
||||
local t
|
||||
if D.event<20 then
|
||||
t=1500-30*D.event--1500~900
|
||||
B[p]= {pos=P:RND(4,7),amount=12,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
B[p+1]= {pos=P:RND(3,8),amount=10,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
else
|
||||
t=900-10*(D.event-20)--900~600
|
||||
B[p]= {pos=P:RND(10),amount=14,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
B[p+1]= {pos=P:RND(4,7),amount=8,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||
end
|
||||
B.sum=B.sum+22
|
||||
P.stat.recv=P.stat.recv+22
|
||||
D.event=D.event+1
|
||||
if D.event%10==0 then
|
||||
if D.event==20 then
|
||||
P:showTextF(text.great,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=3
|
||||
elseif D.event==50 then
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,37 +5,39 @@ return{
|
||||
fall=8,
|
||||
freshLimit=15,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
if P.atkBuffer.sum<4 then
|
||||
local p=#P.atkBuffer+1
|
||||
local B,D=P.atkBuffer,P.modeData
|
||||
local s
|
||||
local t=800-10*D.event--800~700~600~500
|
||||
if D.event<10 then
|
||||
B[p]= {pos=P:RND(5,6),amount=9,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
B[p+1]= {pos=P:RND(4,7),amount=11,countdown=t,cd0=t+62,time=0,sent=false,lv=4}
|
||||
s=20
|
||||
elseif D.event<20 then
|
||||
B[p]= {pos=P:RND(3,8),amount=11,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
B[p+1]= {pos=P:RND(4,7),amount=13,countdown=t,cd0=t+62,time=0,sent=false,lv=5}
|
||||
s=24
|
||||
else
|
||||
B[p]= {pos=P:RND(2)*9-8,amount=14,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||
B[p+1]= {pos=P:RND(3,8),amount=14,countdown=t+62,cd0=t,time=0,sent=false,lv=5}
|
||||
s=28
|
||||
end
|
||||
B.sum=B.sum+s
|
||||
P.stat.recv=P.stat.recv+s
|
||||
D.event=D.event+1
|
||||
if D.event%10==0 then
|
||||
if D.event==10 then
|
||||
P:showTextF(text.great,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=4
|
||||
elseif D.event==20 then
|
||||
P:showTextF(text.awesome,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=5
|
||||
elseif D.event==30 then
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
while true do
|
||||
coroutine.yield()
|
||||
if P.control and SCN.cur=="play"and P.atkBuffer.sum<4 then
|
||||
local p=#P.atkBuffer+1
|
||||
local B,D=P.atkBuffer,P.modeData
|
||||
local s
|
||||
local t=800-10*D.event--800~700~600~500
|
||||
if D.event<10 then
|
||||
B[p]= {pos=P:RND(5,6),amount=9,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
B[p+1]= {pos=P:RND(4,7),amount=11,countdown=t,cd0=t+62,time=0,sent=false,lv=4}
|
||||
s=20
|
||||
elseif D.event<20 then
|
||||
B[p]= {pos=P:RND(3,8),amount=11,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
B[p+1]= {pos=P:RND(4,7),amount=13,countdown=t,cd0=t+62,time=0,sent=false,lv=5}
|
||||
s=24
|
||||
else
|
||||
B[p]= {pos=P:RND(2)*9-8,amount=14,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||
B[p+1]= {pos=P:RND(3,8),amount=14,countdown=t+62,cd0=t,time=0,sent=false,lv=5}
|
||||
s=28
|
||||
end
|
||||
B.sum=B.sum+s
|
||||
P.stat.recv=P.stat.recv+s
|
||||
D.event=D.event+1
|
||||
if D.event%10==0 then
|
||||
if D.event==10 then
|
||||
P:showTextF(text.great,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=4
|
||||
elseif D.event==20 then
|
||||
P:showTextF(text.awesome,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=5
|
||||
elseif D.event==30 then
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,31 +8,35 @@ return{
|
||||
freshLimit=15,
|
||||
pushSpeed=2,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
local t=240-2*P.modeData.event
|
||||
if P.modeData.counter>=t then
|
||||
P.modeData.counter=0
|
||||
for _=1,4 do
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(10),amount=1,countdown=5*t,cd0=5*t,time=0,sent=false,lv=2}
|
||||
end
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+4
|
||||
P.stat.recv=P.stat.recv+4
|
||||
local D=P.modeData
|
||||
if D.event<75 then
|
||||
D.event=D.event+1
|
||||
D.point=int(144e3/(240-2*D.event))*.1
|
||||
if D.event==25 then
|
||||
P:showTextF(text.great,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=3
|
||||
P.dropDelay,P.gameEnv.drop=4,4
|
||||
elseif D.event==50 then
|
||||
P:showTextF(text.awesome,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=4
|
||||
P.dropDelay,P.gameEnv.drop=3,3
|
||||
elseif D.event==75 then
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
P.dropDelay,P.gameEnv.drop=2,2
|
||||
while true do
|
||||
coroutine.yield()
|
||||
if P.control and SCN.cur=="play"then
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
local t=240-2*P.modeData.event
|
||||
if P.modeData.counter>=t then
|
||||
P.modeData.counter=0
|
||||
for _=1,4 do
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(10),amount=1,countdown=5*t,cd0=5*t,time=0,sent=false,lv=2}
|
||||
end
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+4
|
||||
P.stat.recv=P.stat.recv+4
|
||||
local D=P.modeData
|
||||
if D.event<75 then
|
||||
D.event=D.event+1
|
||||
D.point=int(144e3/(240-2*D.event))*.1
|
||||
if D.event==25 then
|
||||
P:showTextF(text.great,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=3
|
||||
P.dropDelay,P.gameEnv.drop=4,4
|
||||
elseif D.event==50 then
|
||||
P:showTextF(text.awesome,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=4
|
||||
P.dropDelay,P.gameEnv.drop=3,3
|
||||
elseif D.event==75 then
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
P.dropDelay,P.gameEnv.drop=2,2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,33 +8,37 @@ return{
|
||||
freshLimit=15,
|
||||
pushSpeed=1,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
local t=360-P.modeData.event*2
|
||||
if P.modeData.counter>=t then
|
||||
P.modeData.counter=0
|
||||
for _=1,3 do
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(2,9),amount=1,countdown=2*t,cd0=2*t,time=0,sent=false,lv=1}
|
||||
end
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+3
|
||||
P.stat.recv=P.stat.recv+3
|
||||
local D=P.modeData
|
||||
if D.event<90 then
|
||||
D.event=D.event+1
|
||||
D.point=int(108e3/(360-D.event*2))*.1
|
||||
if D.event==25 then
|
||||
P:showTextF(text.great,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=2
|
||||
P.dropDelay,P.gameEnv.drop=20,20
|
||||
elseif D.event==50 then
|
||||
P:showTextF(text.awesome,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=3
|
||||
P.dropDelay,P.gameEnv.drop=10,10
|
||||
elseif D.event==90 then
|
||||
P.dropDelay,P.gameEnv.drop=5,5
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
while true do
|
||||
coroutine.yield()
|
||||
if P.control and SCN.cur=="play"then
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
local t=360-P.modeData.event*2
|
||||
if P.modeData.counter>=t then
|
||||
P.modeData.counter=0
|
||||
for _=1,3 do
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(2,9),amount=1,countdown=2*t,cd0=2*t,time=0,sent=false,lv=1}
|
||||
end
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+3
|
||||
P.stat.recv=P.stat.recv+3
|
||||
local D=P.modeData
|
||||
if D.event<90 then
|
||||
D.event=D.event+1
|
||||
D.point=int(108e3/(360-D.event*2))*.1
|
||||
if D.event==25 then
|
||||
P:showTextF(text.great,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=2
|
||||
P.dropDelay,P.gameEnv.drop=20,20
|
||||
elseif D.event==50 then
|
||||
P:showTextF(text.awesome,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=3
|
||||
P.dropDelay,P.gameEnv.drop=10,10
|
||||
elseif D.event==90 then
|
||||
P.dropDelay,P.gameEnv.drop=5,5
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="rainbow2",bgm="storm",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
@@ -6,14 +5,18 @@ return{
|
||||
fall=20,
|
||||
freshLimit=15,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
local D=P.modeData
|
||||
D.counter=D.counter+1
|
||||
if D.counter>=max(90,180-D.event)then
|
||||
P:garbageRise(21,1,P:getHolePos())
|
||||
P.stat.recv=P.stat.recv+1
|
||||
D.counter=0
|
||||
D.event=D.event+1
|
||||
while true do
|
||||
coroutine.yield()
|
||||
if P.control and SCN.cur=="play"then
|
||||
local D=P.modeData
|
||||
D.counter=D.counter+1
|
||||
if D.counter>=math.max(90,180-D.event)then
|
||||
P:garbageRise(21,1,P:getHolePos())
|
||||
P.stat.recv=P.stat.recv+1
|
||||
D.counter=0
|
||||
D.event=D.event+1
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="bg2",bgm="down",
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.lYellow,
|
||||
env={
|
||||
drop=10,lock=30,
|
||||
freshLimit=15,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
local D=P.modeData
|
||||
D.counter=D.counter+1
|
||||
if D.counter>=max(30,80-.3*D.event)then
|
||||
P:garbageRise(20+D.event%5,1,P:getHolePos())
|
||||
P.stat.recv=P.stat.recv+1
|
||||
D.counter=0
|
||||
D.event=D.event+1
|
||||
while true do
|
||||
coroutine.yield()
|
||||
if P.control and SCN.cur=="play"then
|
||||
local D=P.modeData
|
||||
D.counter=D.counter+1
|
||||
if D.counter>=math.max(30,80-.3*D.event)then
|
||||
P:garbageRise(20+D.event%5,1,P:getHolePos())
|
||||
P.stat.recv=P.stat.recv+1
|
||||
D.counter=0
|
||||
D.event=D.event+1
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="bg2",bgm="down",
|
||||
|
||||
@@ -7,14 +7,17 @@ local PClist=require"parts/modes/PClist"
|
||||
local PCtype={[0]=1,2,3,2,3}
|
||||
|
||||
local function task_PC(P)
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter==26 then
|
||||
local base=PCbase[P.modeData.type]
|
||||
P:pushLineList(base[P:RND(#base)],P.modeData.symmetry)
|
||||
return true
|
||||
local D=P.modeData
|
||||
while true do
|
||||
coroutine.yield()
|
||||
D.counter=D.counter+1
|
||||
if D.counter==26 then
|
||||
local base=PCbase[D.type]
|
||||
P:pushLineList(base[P:RND(#base)],D.symmetry)
|
||||
end
|
||||
end
|
||||
end
|
||||
local function newPC(P)
|
||||
local function check(P)
|
||||
local r=P.field
|
||||
if r[1]then
|
||||
r=r[#r]
|
||||
@@ -55,7 +58,7 @@ return{
|
||||
fall=20,
|
||||
sequence="none",
|
||||
freshLimit=15,
|
||||
dropPiece=newPC,
|
||||
dropPiece=check,
|
||||
RS="SRS",
|
||||
ospin=false,
|
||||
bg="rgb",bgm="oxygen",
|
||||
@@ -63,7 +66,7 @@ return{
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
newPC(PLAYERS[1])
|
||||
check(PLAYERS[1])
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
|
||||
@@ -13,14 +13,17 @@ local PCtype={
|
||||
3,
|
||||
}
|
||||
local function task_PC(P)
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter==26 then
|
||||
local base=PCbase[P.modeData.type]
|
||||
P:pushLineList(base[P:RND(#base)],P.modeData.symmetry)
|
||||
return true
|
||||
local D=P.modeData
|
||||
while true do
|
||||
D.counter=D.counter+1
|
||||
if D.counter==26 then
|
||||
local base=PCbase[D.type]
|
||||
P:pushLineList(base[P:RND(#base)],D.symmetry)
|
||||
end
|
||||
coroutine.yield()
|
||||
end
|
||||
end
|
||||
local function newPC(P)
|
||||
local function check(P)
|
||||
local r=P.field
|
||||
if r[1]then
|
||||
r=r[#r]
|
||||
@@ -47,7 +50,7 @@ return{
|
||||
drop=120,lock=180,
|
||||
fall=20,
|
||||
sequence="none",
|
||||
dropPiece=newPC,
|
||||
dropPiece=check,
|
||||
RS="SRS",
|
||||
ospin=false,
|
||||
bg="rgb",bgm="oxygen",
|
||||
@@ -55,7 +58,7 @@ return{
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
newPC(PLAYERS[1])
|
||||
check(PLAYERS[1])
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.cyan,
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
freshLimit=10,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=max(60,150-2*P.modeData.event)and P.atkBuffer.sum<4 then
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+1
|
||||
P.stat.recv=P.stat.recv+1
|
||||
if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
while true do
|
||||
coroutine.yield()
|
||||
if P.control and SCN.cur=="play"then
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=math.max(60,150-2*P.modeData.event)and P.atkBuffer.sum<4 then
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+1
|
||||
P.stat.recv=P.stat.recv+1
|
||||
if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="glow",bgm="new era",
|
||||
|
||||
@@ -1,25 +1,28 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
freshLimit=10,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
local B=P.atkBuffer
|
||||
if P.modeData.counter>=max(60,180-2*P.modeData.event)and B.sum<15 then
|
||||
B[#B+1]=
|
||||
P.modeData.event%3<2 and
|
||||
{pos=P:RND(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1}
|
||||
or
|
||||
{pos=P:RND(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2}
|
||||
local R=(P.modeData.event%3<2 and 1 or 3)
|
||||
B.sum=B.sum+R
|
||||
P.stat.recv=P.stat.recv+R
|
||||
if P.modeData.event==60 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
while true do
|
||||
coroutine.yield()
|
||||
if P.control and SCN.cur=="play"then
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
local B=P.atkBuffer
|
||||
if P.modeData.counter>=math.max(60,180-2*P.modeData.event)and B.sum<15 then
|
||||
B[#B+1]=
|
||||
P.modeData.event%3<2 and
|
||||
{pos=P:RND(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1}
|
||||
or
|
||||
{pos=P:RND(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2}
|
||||
local R=(P.modeData.event%3<2 and 1 or 3)
|
||||
B.sum=B.sum+R
|
||||
P.stat.recv=P.stat.recv+R
|
||||
if P.modeData.event==60 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="glow",bgm="secret7th",
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
freshLimit=10,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=max(60,150-P.modeData.event)and P.atkBuffer.sum<20 then
|
||||
local t=max(60,90-P.modeData.event)
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+4
|
||||
P.stat.recv=P.stat.recv+4
|
||||
if P.modeData.event==60 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
while true do
|
||||
coroutine.yield()
|
||||
if P.control and SCN.cur=="play"then
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=math.max(60,150-P.modeData.event)and P.atkBuffer.sum<20 then
|
||||
local t=math.max(60,90-P.modeData.event)
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+4
|
||||
P.stat.recv=P.stat.recv+4
|
||||
if P.modeData.event==60 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="glow",bgm="storm",
|
||||
|
||||
@@ -1,24 +1,27 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
freshLimit=10,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=max(90,180-2*P.modeData.event)and P.atkBuffer.sum<8 then
|
||||
local d=P.modeData.event+1
|
||||
P.atkBuffer[#P.atkBuffer+1]=
|
||||
d%4==0 and{pos=P:RND(10),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1}or
|
||||
d%4==1 and{pos=P:RND(10),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1}or
|
||||
d%4==2 and{pos=P:RND(10),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2}or
|
||||
d%4==3 and{pos=P:RND(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+d%4+1
|
||||
P.stat.recv=P.stat.recv+d%4+1
|
||||
if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=d
|
||||
while true do
|
||||
coroutine.yield()
|
||||
if P.control and SCN.cur=="play"then
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=math.max(90,180-2*P.modeData.event)and P.atkBuffer.sum<8 then
|
||||
local d=P.modeData.event+1
|
||||
P.atkBuffer[#P.atkBuffer+1]=
|
||||
d%4==0 and{pos=P:RND(10),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1}or
|
||||
d%4==1 and{pos=P:RND(10),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1}or
|
||||
d%4==2 and{pos=P:RND(10),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2}or
|
||||
d%4==3 and{pos=P:RND(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+d%4+1
|
||||
P.stat.recv=P.stat.recv+d%4+1
|
||||
if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=d
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="glow",bgm="secret8th",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.lYellow,
|
||||
env={
|
||||
@@ -7,20 +6,24 @@ return{
|
||||
freshLimit=15,
|
||||
pushSpeed=2,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=max(300,600-10*P.modeData.event)and P.atkBuffer.sum<20 then
|
||||
local t=max(300,480-12*P.modeData.event)
|
||||
local p=#P.atkBuffer+1
|
||||
P.atkBuffer[p] ={pos=P:RND(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=2}
|
||||
P.atkBuffer[p+1]={pos=P:RND(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
P.atkBuffer[p+2]={pos=P:RND(10),amount=6,countdown=1.2*t,cd0=1.2*t,time=0,sent=false,lv=4}
|
||||
P.atkBuffer[p+3]={pos=P:RND(10),amount=6,countdown=1.5*t,cd0=1.5*t,time=0,sent=false,lv=5}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+20
|
||||
P.stat.recv=P.stat.recv+20
|
||||
if P.modeData.event==31 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
while true do
|
||||
coroutine.yield()
|
||||
if P.control and SCN.cur=="play"then
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=math.max(300,600-10*P.modeData.event)and P.atkBuffer.sum<20 then
|
||||
local t=math.max(300,480-12*P.modeData.event)
|
||||
local p=#P.atkBuffer+1
|
||||
P.atkBuffer[p] ={pos=P:RND(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=2}
|
||||
P.atkBuffer[p+1]={pos=P:RND(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
P.atkBuffer[p+2]={pos=P:RND(10),amount=6,countdown=1.2*t,cd0=1.2*t,time=0,sent=false,lv=4}
|
||||
P.atkBuffer[p+3]={pos=P:RND(10),amount=6,countdown=1.5*t,cd0=1.5*t,time=0,sent=false,lv=5}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+20
|
||||
P.stat.recv=P.stat.recv+20
|
||||
if P.modeData.event==31 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="welcome",bgm="storm",
|
||||
|
||||
@@ -8,15 +8,18 @@ return{
|
||||
drop=60,lock=60,
|
||||
fall=20,
|
||||
task=function(P)
|
||||
local _=P.modeData.counter+1
|
||||
if P.stat.frame>=warnTime[_]*60 then
|
||||
if _<9 then
|
||||
P.modeData.counter=_
|
||||
SFX.play("ready",.7+_*.03)
|
||||
else
|
||||
SFX.play("start")
|
||||
P:win("finish")
|
||||
return true
|
||||
while true do
|
||||
coroutine.yield()
|
||||
local _=P.modeData.counter+1
|
||||
if P.stat.frame>=warnTime[_]*60 then
|
||||
if _<9 then
|
||||
P.modeData.counter=_
|
||||
SFX.play("ready",.7+_*.03)
|
||||
else
|
||||
SFX.play("start")
|
||||
P:win("finish")
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user