防守模式改为缓冲超过一定数量后就不再生成新的攻击

This commit is contained in:
MrZ_26
2023-04-06 15:55:19 +08:00
parent ee4dfa7f51
commit 95a1b03cc5
2 changed files with 58 additions and 54 deletions

View File

@@ -13,34 +13,36 @@ return {
coroutine.yield()
if P.control then
local D=P.modeData
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
30
if D.counter>=t then
D.counter=0
for _=1,4 do
table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=5*t,cd0=5*t,time=0,sent=false,lv=2})
D.timer=D.timer+1
if P.atkBufferSum<30 then
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
30
if D.timer>=t then
D.timer=0
for _=1,4 do
table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=5*t,cd0=5*t,time=0,sent=false,lv=2})
end
P.atkBufferSum=P.atkBufferSum+4
P.stat.recv=P.stat.recv+4
D.wave=D.wave+1
D.rpm=math.floor(144e3/t)*.1
if D.wave==60 then
P:_showText(text.great,0,-140,100,'appear',.6)
P.gameEnv.pushSpeed=3
P.dropDelay,P.gameEnv.drop=4,4
elseif D.wave==120 then
P:_showText(text.awesome,0,-140,100,'appear',.6)
P.gameEnv.pushSpeed=4
P.dropDelay,P.gameEnv.drop=3,3
elseif D.wave==180 then
P:_showText(text.maxspeed,0,-140,100,'appear',.6)
P.dropDelay,P.gameEnv.drop=2,2
end
P:shakeField(3)
end
P.atkBufferSum=P.atkBufferSum+4
P.stat.recv=P.stat.recv+4
D.wave=D.wave+1
D.rpm=math.floor(144e3/t)*.1
if D.wave==60 then
P:_showText(text.great,0,-140,100,'appear',.6)
P.gameEnv.pushSpeed=3
P.dropDelay,P.gameEnv.drop=4,4
elseif D.wave==120 then
P:_showText(text.awesome,0,-140,100,'appear',.6)
P.gameEnv.pushSpeed=4
P.dropDelay,P.gameEnv.drop=3,3
elseif D.wave==180 then
P:_showText(text.maxspeed,0,-140,100,'appear',.6)
P.dropDelay,P.gameEnv.drop=2,2
end
P:shakeField(3)
end
end
end

View File

@@ -13,34 +13,36 @@ return {
coroutine.yield()
if P.control then
local D=P.modeData
D.counter=D.counter+1
local t=
D.wave<=40 and 360-D.wave*4 or
D.wave<=80 and 200-(D.wave-40)*2 or
D.wave<=140 and 120-(D.wave-80) or
60
if D.counter>=t then
D.counter=0
for _=1,3 do
table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=2*t,cd0=2*t,time=0,sent=false,lv=1})
D.timer=D.timer+1
if P.atkBufferSum<20 then
local t=
D.wave<=40 and 360-D.wave*4 or
D.wave<=80 and 200-(D.wave-40)*2 or
D.wave<=140 and 120-(D.wave-80) or
60
if D.timer>=t then
D.timer=0
for _=1,3 do
table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=2*t,cd0=2*t,time=0,sent=false,lv=1})
end
P.atkBufferSum=P.atkBufferSum+3
P.stat.recv=P.stat.recv+3
D.wave=D.wave+1
D.rpm=math.floor(108e3/t)*.1
if D.wave==60 then
P:_showText(text.great,0,-140,100,'appear',.6)
P.gameEnv.pushSpeed=2
P.dropDelay,P.gameEnv.drop=20,20
elseif D.wave==120 then
P:_showText(text.awesome,0,-140,100,'appear',.6)
P.gameEnv.pushSpeed=3
P.dropDelay,P.gameEnv.drop=10,10
elseif D.wave==180 then
P.dropDelay,P.gameEnv.drop=5,5
P:_showText(text.maxspeed,0,-140,100,'appear',.6)
end
P:shakeField(3)
end
P.atkBufferSum=P.atkBufferSum+3
P.stat.recv=P.stat.recv+3
D.wave=D.wave+1
D.rpm=math.floor(108e3/t)*.1
if D.wave==60 then
P:_showText(text.great,0,-140,100,'appear',.6)
P.gameEnv.pushSpeed=2
P.dropDelay,P.gameEnv.drop=20,20
elseif D.wave==120 then
P:_showText(text.awesome,0,-140,100,'appear',.6)
P.gameEnv.pushSpeed=3
P.dropDelay,P.gameEnv.drop=10,10
elseif D.wave==180 then
P.dropDelay,P.gameEnv.drop=5,5
P:_showText(text.maxspeed,0,-140,100,'appear',.6)
end
P:shakeField(3)
end
end
end