Alpha V0.7.13+

This commit is contained in:
MrZ_26
2020-02-04 19:33:03 +08:00
parent 72dcb84662
commit c9a3e3ce1b
16 changed files with 1255 additions and 1141 deletions

View File

@@ -1,3 +1,6 @@
local gc=love.graphics
local setFont=setFont
local PCbase={
{3,3,3,0,0,0,0,0,2,2},
{3,6,6,0,0,0,0,2,2,5},
@@ -8,7 +11,7 @@ local PCbase={
{5,5,2,2,0,0,0,6,6,4},
{5,2,2,0,0,0,0,4,4,4},
}
local PClist={
PClist={
{7,7,4,5},{7,7,6,4},{7,7,2,4},{7,7,1,3},{7,7,5,6},{7,7,5,2},{7,7,5,4},{7,7,5,3},
{7,4,1,2},{7,3,5,7},{7,5,4,3},{7,5,1,2},{7,1,4,2},{7,4,2,5},{7,6,4,5},{7,5,4,2},
{7,5,6,4},{7,5,3,6},{7,2,5,6},{7,2,6,4},{7,2,1,3},{7,5,2,7},{7,5,7,2},{7,5,2,3},
@@ -23,70 +26,265 @@ local marathon_drop={[0]=60,48,40,30,24,18,15,12,10,8,7,6,5,4,3,2,1,1,0,0}
local rush_lock={20,18,16,15,14}
local rush_wait={12,10,9,8,7}
local rush_fall={18,16,14,13,12}
local death_lock={12,10,9,8,7}
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 pc_drop={50,45,40,35,30,26,22,18,15,12}
local pc_lock={55,50,45,40,36,32,30}
local pc_fall={18,16,14,12,10,9,8,7,6}
freshMethod={
bag7=function()
if #P.nextID<6 then
local bag={1,2,3,4,5,6,7}
for i=1,7 do
newNext(rem(bag,rnd(#bag)))
end
loadmode={
sprint=function()
createPlayer(1,340,15)
end,
marathon=function()
createPlayer(1,340,15)
end,
master=function()
createPlayer(1,340,15)
end,
classic=function()
createPlayer(1,340,15)
end,
zen=function()
createPlayer(1,340,15)
end,
infinite=function()
createPlayer(1,340,15)
end,
solo=function()
createPlayer(1,340,15)
createPlayer(2,965,360,.5,customRange.opponent[3*curMode.lv])
end,
tsd=function()
createPlayer(1,340,15)
end,
blind=function()
createPlayer(1,340,15)
end,
dig=function()
createPlayer(1,340,15)
newTask(Event_task[curMode.lv==1 and"dig_normal"or curMode.lv==2 and"dig_lunatic"],P)
pushSpeed=1
end,
survivor=function()
createPlayer(1,340,15)
newTask(Event_task[curMode.lv==1 and"survivor_easy"or curMode.lv==2 and"survivor_normal"or curMode.lv==3 and"survivor_hard"or curMode.lv==4 and"survivor_lunatic"or curMode.lv==5 and"survivor_ultimate"],P)
pushSpeed=curMode.lv>2 and 2 or 1
end,
tech=function()
createPlayer(1,340,15)
end,
pctrain=function()
createPlayer(1,340,15)
P=players[1]
Event.newPC()
P.freshNext()
end,
pcchallenge=function()
createPlayer(1,340,15)
end,
techmino41=function()
createPlayer(1,340,15)--Player
if curMode.lv==5 then players[1].gameEnv.drop=15 end
local n,min,max=2
if curMode.lv==1 then min,max=5,30
elseif curMode.lv==2 then min,max=3,25
elseif curMode.lv==3 then min,max=2,20
elseif curMode.lv==4 then min,max=2,10
elseif curMode.lv==5 then min,max=1,6
end
for i=1,4 do for j=1,5 do
createPlayer(n,77*i-55,140*j-125,.2,rnd(min,max))
n=n+1
end end
for i=9,12 do for j=1,5 do
createPlayer(n,77*i+275,140*j-125,.2,rnd(min,max))
n=n+1
end end
--AIs
end,
techmino99=function()
createPlayer(1,340,15)--Player
if curMode.lv==5 then players[1].gameEnv.drop=15 end
local n,min,max=2
if curMode.lv==1 then min,max=5,32
elseif curMode.lv==2 then min,max=3,25
elseif curMode.lv==3 then min,max=2,18
elseif curMode.lv==4 then min,max=2,12
elseif curMode.lv==5 then min,max=1,12
end
for i=1,7 do for j=1,7 do
createPlayer(n,46*i-36,97*j-72,.135,rnd(min,max))
n=n+1
end end
for i=15,21 do for j=1,7 do
createPlayer(n,46*i+264,97*j-72,.135,rnd(min,max))
n=n+1
end end
--AIs
end,
drought=function()
createPlayer(1,340,15)
end,
hotseat=function()
if curMode.lv==1 then
createPlayer(1,20,15)
createPlayer(2,650,15)
elseif curMode.lv==2 then
createPlayer(1,20,100,.65)
createPlayer(2,435,100,.65)
createPlayer(3,850,100,.65)
elseif curMode.lv==3 then
createPlayer(1,25,160,.5)
createPlayer(2,335,160,.5)
createPlayer(3,645,160,.5)
createPlayer(4,955,160,.5)
end
end,
his4=function()
if #P.nextID<6 then
local j,i=0
::L::
i,j=rnd(7),j+1
if(i==P.his[1]or i==P.his[2]or i==P.his[3]or i==P.his[4])then goto L end
newNext(i)
rem(P.his,1)ins(P.his,i)
custom=function()
for i=1,#customID do
local k=customID[i]
modeEnv[k]=customRange[k][customSel[k]]
end
modeEnv._20G=modeEnv.drop==-1
if modeEnv.opponent==0 then
createPlayer(1,340,15)
else
modeEnv.target=nil
createPlayer(1,340,15)
createPlayer(2,965,360,.5,modeEnv.opponent)
end
end,
rnd=function()
local i
::L::
i=rnd(7)
if i==P.nextID[5]then goto L end
newNext(i)
end,--random
pc=function()
if P.cstat.piece%4==0 then
local r=rnd(#PClist)
local f=P.cstat.event==1
for i=1,4 do
local b=PClist[r][i]
if f then
if b<3 then b=3-b
elseif b<5 then b=7-b
end
end
newNext(b)
end
P.cstat.event=(P.cstat.event+1)%2
}
mesDisp={
--Default:font=35,white
sprint=function()
setFont(70)
local r=max(P.gameEnv.target-P.cstat.row,0)
mStr(r,-82,260)
if r<21 and r>0 then
gc.setLineWidth(3)
gc.setColor(1,.5,.5)
gc.line(0,600-30*r,300,600-30*r)
end
end,
drought1=function()
if #P.nextID<6 then
local bag={1,2,3,4,5,6}
for i=1,6 do
newNext(rem(bag,rnd(#bag)))
end
marathon=function()
setFont(50)
mStr(P.cstat.row,-82,320)
mStr(P.gameEnv.target,-82,370)
gc.rectangle("fill",-128,376,90,4)
end,
master=function()
setFont(50)
mStr(P.cstat.point,-82,320)
mStr((P.cstat.event+1)*100,-82,370)
gc.rectangle("fill",-128,376,90,4)
end,
classic=function()
setFont(80)
local r=P.gameEnv.target*.1
mStr(r<11 and 19+r or r==11 and"00"or r==12 and"0a"or format("%x",r*10-110),-82,210)
setFont(20)
mStr("speed level",-82,290)
setFont(50)
mStr(P.cstat.row,-82,320)
mStr(P.gameEnv.target,-82,370)
gc.rectangle("fill",-128,376,90,4)
end,
zen=function()
setFont(75)
mStr(max(200-P.cstat.row,0),-82,280)
end,
infinite=function()
setFont(50)
mStr(P.cstat.atk,-82,310)
mStr(format("%.2f",2.5*P.cstat.atk/P.cstat.piece),-82,420)
setFont(20)
mStr("Attack",-82,363)
mStr("Efficiency",-82,475)
end,
tsd=function()
setFont(35)
mStr("TSD",-82,407)
setFont(80)
mStr(P.cstat.event,-82,330)
end,
blind=function()
setFont(25)
mStr("Rows",-82,300)
mStr("Techrash",-82,420)
setFont(80)
mStr(P.cstat.row,-82,220)
mStr(P.cstat.techrash,-82,340)
end,
dig=function()
setFont(70)
mStr(P.cstat.event,-82,310)
setFont(30)
mStr("Wave",-82,375)
end,
survivor=function()
setFont(70)
mStr(P.cstat.event,-82,310)
setFont(30)
mStr("Wave",-82,375)
end,
pctrain=function()
setFont(22)
mStr("Perfect Clear",-82,412)
setFont(80)
mStr(P.cstat.pc,-82,330)
end,
pcchallenge=function()
setFont(22)
mStr("Perfect Clear",-82,432)
setFont(80)
mStr(P.cstat.pc,-82,350)
setFont(50)
mStr(max(100-P.cstat.row,0),-82,250)
end,
techmino41=function()
setFont(40)
mStr(#players.alive.."/41",-82,175)
mStr(P.ko,-70,215)
setFont(25)
gc.print("KO",-127,225)
gc.setColor(1,.5,0,.6)
gc.print(P.badge,-47,227)
gc.setColor(1,1,1)
setFont(30)
gc.print(up0to4[P.strength],-132,290)
for i=1,P.strength do
gc.draw(badgeIcon,16*i-142,260)
end
end,
drought2=function()
if #P.nextID<6 then
local bag={1,1,1,2,2,2,3,3,3,4,4,4,6,6,6,5,7}
::L::
newNext(rem(bag,rnd(#bag)))
if bag[1]then goto L end
techmino99=function()
setFont(40)
mStr(#players.alive.."/99",-82,175)
mStr(P.ko,-70,215)
setFont(25)
gc.print("KO",-127,225)
gc.setColor(1,.5,0,.6)
gc.print(P.badge,-47,227)
gc.setColor(1,1,1)
setFont(30)
gc.print(up0to4[P.strength],-132,290)
for i=1,P.strength do
gc.draw(badgeIcon,16*i-142,260)
end
end,
drought=function()
setFont(75)
mStr(max(100-P.cstat.row,0),-82,280)
end,
custom=function()
if P.gameEnv.target<1e4 then
setFont(75)
mStr(max(P.gameEnv.target-P.cstat.row,0),-82,280)
end
end
}
Event={
marathon_reach=function()
@@ -103,8 +301,9 @@ Event={
end,
master_reach_lunatic=function()
local t=P.cstat.point
if t%100==99 and #P.clearing==0 then goto L end
t=t+clearPoint[#P.clearing]
local c=#P.clearing
if t%100==99 and c==0 then goto L end
t=t+(c<3 and c+1 or c==3 and 5 or 7)
if int(t*.01)>P.cstat.event then
P.cstat.event=P.cstat.event+1
if P.cstat.event==5 then
@@ -130,8 +329,9 @@ Event={
end,
master_reach_ultimate=function()
local t=P.cstat.point
if t%100==99 and #P.clearing==0 then goto L end
t=t+clearPoint[#P.clearing]
local c=#P.clearing
if t%100==99 and c==0 then goto L end
t=t+(c<3 and c+1 or c==3 and 5 or 7)
if int(t*.01)>P.cstat.event then
P.cstat.event=P.cstat.event+1
if P.cstat.event==5 then
@@ -220,6 +420,7 @@ Event_gameover={
P.result="WIN"
showText(P,1,"appear",60,120,nil,true)
changeAtk(P)
BGM("end")
end
for i=1,#P.atkBuffer do
P.atkBuffer[i].sent=true
@@ -253,25 +454,27 @@ Event_gameover={
P.rank=#players.alive+1
showText(P,P.rank,"appear",60,120,nil,true)
P.strength=0
local A,i=P,0
::L::
A,i=A.lastRecv,i+1
if A and not A.alive and A~=P and i<3 then goto L end
if A and A~=P then
if P.id==1 or A.id==1 then
P.killMark=A.id==1
end
A.ko,A.badge=A.ko+1,A.badge+P.badge+1
for i=A.strength+1,4 do
if A.badge>=modeEnv.royalePowerup[i]then
A.strength=i
if P.lastRecv then
local A,i=P,0
::L::
A,i=A.lastRecv,i+1
if A and not A.alive and A~=P and i<3 then goto L end
if A and A~=P then
if P.id==1 or A.id==1 then
P.killMark=A.id==1
end
A.ko,A.badge=A.ko+1,A.badge+P.badge+1
for i=A.strength+1,4 do
if A.badge>=modeEnv.royalePowerup[i]then
A.strength=i
end
end
P.lastRecv=A
if P.id==1 or A.id==1 then
newTask(Event_task.throwBadge,nil,{P,max(3,P.badge)*4})
end
freshMostBadge()
end
P.lastRecv=A
if P.id==1 or A.id==1 then
newTask(Event_task.throwBadge,nil,{P,max(3,P.badge)*4})
end
freshMostBadge()
else
P.badge=-1
end
@@ -294,11 +497,12 @@ Event_gameover={
P.visTime[i][j]=min(P.visTime[i][j],20)
end
end
P.gameEnv.keepVisible=P.gameEnv.visible~="show"
showText(P,text.lose,"appear",90,nil,nil,true)
if P.id==1 then
SFX("fail")
if modeEnv.royaleMode then
BGM("sores")
BGM("end")
end
end
newTask(Event_task.lose,P)
@@ -371,11 +575,7 @@ Event_task={
if not P.control then return end
P.counter=P.counter+1
if #P.clearing==0 and P.counter>=max(90,180-2*P.cstat.event)then
ins(P.field,1,getNewRow(10))
ins(P.visTime,1,getNewRow(1e99))
P.field[1][rnd(10)]=0
P.fieldBeneath=P.fieldBeneath+30
P.curY,P.y_img=P.curY+1,P.y_img+1
garbageRise(10,1,rnd(10))
P.counter=0
P.cstat.event=P.cstat.event+1
end
@@ -384,11 +584,7 @@ Event_task={
if not P.control then return end
P.counter=P.counter+1
if #P.clearing==0 and P.counter>=max(45,80-.4*P.cstat.event)then
ins(P.field,1,getNewRow(11+P.cstat.event%3))
ins(P.visTime,1,getNewRow(1e99))
P.field[1][rnd(10)]=0
P.fieldBeneath=P.fieldBeneath+30
P.curY,P.y_img=P.curY+1,P.y_img+1
garbageRise(11+P.cstat.event%3,1,rnd(10))
P.counter=0
P.cstat.event=P.cstat.event+1
end
@@ -396,25 +592,27 @@ Event_task={
survivor_easy=function(P)
if not P.control then return end
P.counter=P.counter+1
if P.counter==max(60,180-2*P.cstat.event)then
ins(P.atkBuffer,{rnd(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1})
if P.counter==max(60,150-2*P.cstat.event)then
ins(P.atkBuffer,{pos=rnd(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1})
P.counter=0
if P.cstat.event==60 then showText(P,text.maxspeed,"appear",80,-140)end
if P.cstat.event==45 then showText(P,text.maxspeed,"appear",80,-140)end
P.cstat.event=P.cstat.event+1
end
end,
survivor_normal=function(P)
if not P.control then return end
P.counter=P.counter+1
if P.counter==max(60,180-2*P.cstat.event)then
if P.counter==max(90,180-2*P.cstat.event)then
local d=P.cstat.event+1
if d%4==0 then ins (P.atkBuffer,{rnd(10),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1})
elseif d%4==1 then ins(P.atkBuffer,{rnd(10),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1})
elseif d%4==2 then ins(P.atkBuffer,{rnd(10),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2})
elseif d%4==3 then ins(P.atkBuffer,{rnd(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3})
if d%4==0 then ins(P.atkBuffer,{pos=rnd(10),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1})
elseif d%4==1 then ins(P.atkBuffer,{pos=rnd(10),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1})
elseif d%4==2 then ins(P.atkBuffer,{pos=rnd(10),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2})
elseif d%4==3 then ins(P.atkBuffer,{pos=rnd(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3})
end
P.atkBuffer.sum=P.atkBuffer.sum+d%4+1
if P.atkBuffer.sum>20 then garbageRelease()end
P.counter=0
if P.cstat.event==60 then showText(P,text.maxspeed,"appear",80,-140)end
if P.cstat.event==45 then showText(P,text.maxspeed,"appear",80,-140)end
P.cstat.event=P.cstat.event+1
end
end,
@@ -423,10 +621,12 @@ Event_task={
P.counter=P.counter+1
if P.counter==max(60,180-2*P.cstat.event)then
if P.cstat.event%3<2 then
ins(P.atkBuffer,{rnd(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1})
ins(P.atkBuffer,{pos=rnd(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1})
else
ins(P.atkBuffer,{rnd(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2})
ins(P.atkBuffer,{pos=rnd(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2})
end
P.atkBuffer.sum=P.atkBuffer.sum+(P.cstat.event%3<2 and 1 or 3)
if P.atkBuffer.sum>20 then garbageRelease()end
P.counter=0
if P.cstat.event==45 then showText(P,text.maxspeed,"appear",80,-140)end
P.cstat.event=P.cstat.event+1
@@ -435,11 +635,29 @@ Event_task={
survivor_lunatic=function(P)
if not P.control then return end
P.counter=P.counter+1
if P.counter==max(90,150-P.cstat.event)then
if P.counter==max(60,150-P.cstat.event)then
local t=max(60,90-P.cstat.event)
ins(P.atkBuffer,{rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3})
ins(P.atkBuffer,{pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3})
P.atkBuffer.sum=P.atkBuffer.sum+4
if P.atkBuffer.sum>20 then garbageRelease()end
P.counter=0
if P.cstat.event==30 then showText(P,text.maxspeed,"appear",80,-140)end
if P.cstat.event==60 then showText(P,text.maxspeed,"appear",80,-140)end
P.cstat.event=P.cstat.event+1
end
end,
survivor_ultimate=function(P)
if not P.control then return end
P.counter=P.counter+1
if P.counter==max(300,600-10*P.cstat.event)then
local t=max(300,480-12*P.cstat.event)
ins(P.atkBuffer,{pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=2})
ins(P.atkBuffer,{pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3})
ins(P.atkBuffer,{pos=rnd(10),amount=6,countdown=1.2*t,cd0=1.2*t,time=0,sent=false,lv=4})
ins(P.atkBuffer,{pos=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
if P.atkBuffer.sum>30 then garbageRelease()end
P.counter=0
if P.cstat.event==31 then showText(P,text.maxspeed,"appear",80,-140)end
P.cstat.event=P.cstat.event+1
end
end,
@@ -561,7 +779,7 @@ defaultModeEnv={
bg="game2",
bgm="secret8th",
},
{
{
_20G=true,
drop=0,
lock=death_lock[1],
@@ -646,7 +864,6 @@ defaultModeEnv={
drop=30,
lock=60,
freshLimit=15,
ghost=false,
visible="time",
bg="glow",
bgm="newera",
@@ -670,6 +887,15 @@ defaultModeEnv={
bg="rgb",
bgm="secret7th",
},
{
fall=5,
lock=60,
center=false,
visible="none",
freshLimit=15,
bg="rgb",
bgm="secret8th",
},
{
fall=5,
lock=60,
@@ -744,6 +970,14 @@ defaultModeEnv={
bg="game3",
bgm="secret7th",
},
{
drop=5,
lock=60,
fall=10,
freshLimit=15,
bg="rgb",
bgm="secret7th",
},
},
tech={
{