Compare commits

...

2 Commits

Author SHA1 Message Date
MrZ_26
b354604c77 Alpha V0.7.21 2020-02-04 19:35:09 +08:00
MrZ_26
5eea97dd8b Alpha V0.7.20 2020-02-04 19:34:54 +08:00
16 changed files with 568 additions and 394 deletions

View File

@@ -22,8 +22,13 @@ local sceneInit={
BGM("blank")
end,
main=function()
BGM("blank")
collectgarbage()
end,
music=function()
sel=1
BGM()
end,
mode=function()
curBG="none"
saveData()
@@ -33,8 +38,8 @@ local sceneInit={
end,
custom=function()
optSel=optSel or 1
curBG="matrix"
BGM("blank")
curBG=customRange.bg[customSel[12]]
BGM(customRange.bgm[customSel[13]])
end,
draw=function()
curBG="none"
@@ -137,7 +142,10 @@ function buttonControl_gamepad(i)
end
end
mouseDown={}
local mouseDown,mouseMove,mouseUp,wheelmoved={},{},{},{}
local touchDown,touchUp,touchMove={},{},{}
local keyDown,keyUp={},{}
local gamepadDown,gamepadUp={},{}
function mouseDown.intro(x,y,k)
if k==2 then
back()
@@ -145,126 +153,9 @@ function mouseDown.intro(x,y,k)
gotoScene("main")
end
end
function mouseDown.draw(x,y,k)
mouseMove.draw(x,y)
end
function mouseDown.setting3(x,y,k)
if k==2 then back()end
for K=1,#virtualkey do
local b=virtualkey[K]
if (x-b[1])^2+(y-b[2])^2<b[3]then
sel=K
end
end
end
mouseMove={}
function mouseMove.draw(x,y,dx,dy)
sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
if sx<1 or sx>10 then sx=nil end
if sy<1 or sy>20 then sy=nil end
if sx and sy and ms.isDown(1,2,3)then
preField[sy][sx]=ms.isDown(1)and pen or ms.isDown(2)and 0 or -1
end
end
function mouseMove.setting3(x,y,dx,dy)
if sel and ms.isDown(1)then
local b=virtualkey[sel]
b[1],b[2]=b[1]+dx,b[2]+dy
end
end
mouseUp={}
function mouseUp.setting3(x,y,k)
if sel then
local b=virtualkey[sel]
local k=snapLevelValue[snapLevel]
b[1],b[2]=int(b[1]/k+.5)*k,int(b[2]/k+.5)*k
end
end
wheelmoved={}
function wheelmoved.draw(x,y)
if y<0 then
pen=pen+1
if pen==8 then pen=9 elseif pen==14 then pen=0 end
else
pen=pen-1
if pen==8 then pen=7 elseif pen==-1 then pen=13 end
end
end
function wheelmoved.mode(x,y)
modeSel=min(max(modeSel+(y>0 and -1 or 1),1),#modeID)
levelSel=ceil(#modeLevel[modeID[modeSel]]*.5)
end
touchDown={}
function touchDown.intro(id,x,y)
gotoScene("main")
end
function touchDown.draw(id,x,y)
end
function touchDown.setting3(id,x,y)
for K=1,#virtualkey do
local b=virtualkey[K]
if (x-b[1])^2+(y-b[2])^2<b[3]then
sel=K
end
end
end
function touchDown.play(id,x,y)
if setting.virtualkeySwitch then
local t=onVirtualkey(x,y)
if t then
pressKey(t,players[1])
end
end
end
touchUp={}
function touchUp.setting3(id,x,y)
if sel then
x,y=xOy:inverseTransformPoint(x,y)
if sel then
local b=virtualkey[sel]
local k=snapLevelValue[snapLevel]
b[1],b[2]=int(b[1]/k+.5)*k,int(b[2]/k+.5)*k
end
end
end
function touchUp.play(id,x,y)
if setting.virtualkeySwitch then
local t=onVirtualkey(x,y)
if t then
releaseKey(t,players[1])
end
end
end
touchMove={}
function touchMove.setting3(id,x,y,dx,dy)
if sel then
local b=virtualkey[sel]
b[1],b[2]=b[1]+dx,b[2]+dy
end
end
function touchMove.draw(id,x,y,dx,dy)
sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
if sx<1 or sx>10 then sx=nil end
if sy<1 or sy>20 then sy=nil end
if sx and sy then
preField[sy][sx]=pen
end
end
function touchMove.play(id,x,y,dx,dy)
if setting.virtualkeySwitch then
local l=tc.getTouches()
for n=1,#virtualkey do
local b=virtualkey[n]
for i=1,#l do
local x,y=xOy:inverseTransformPoint(tc.getPosition(l[i]))
if(x-b[1])^2+(y-b[2])^2<=b[3]then goto L end
end
releaseKey(n,players[1])
::L::
end
end
end
keyDown={}
function keyDown.intro(key)
if key=="escape"then
back()
@@ -272,6 +163,18 @@ function keyDown.intro(key)
gotoScene("main")
end
end
function gamepadDown.intro(key)
if key=="back"then
back()
else
gotoScene("main")
end
end
function wheelmoved.mode(x,y)
modeSel=min(max(modeSel+(y>0 and -1 or 1),1),#modeID)
levelSel=ceil(#modeLevel[modeID[modeSel]]*.5)
end
function keyDown.mode(key)
if key=="down"then
if modeSel<#modeID then
@@ -299,13 +202,45 @@ function keyDown.mode(key)
back()
end
end
function gamepadDown.mode(key)
if key=="dpdown"then
if modeSel<#modeID then modeSel=modeSel+1 end
elseif key=="dpup"then
if modeSel>1 then modeSel=modeSel-1 end
elseif key=="start"then
loadGame(modeSel,levelSel)
elseif key=="back"then
back()
end
end
function keyDown.music(key)
if key=="down"then
sel=sel%#musicID+1
elseif key=="up"then
sel=(sel-2)%#musicID+1
elseif key=="return"or key=="space"then
BGM(musicID[sel])
elseif key=="escape"then
back()
end
end
function keyDown.custom(key)
if key=="left"then
local k=customID[optSel]
customSel[k]=(customSel[k]-2)%#customRange[k]+1
customSel[optSel]=(customSel[optSel]-2)%#customRange[customID[optSel]]+1
if optSel==12 then
curBG=customRange.bg[customSel[12]]
elseif optSel==13 then
BGM(customRange.bgm[customSel[13]])
end
elseif key=="right"then
local k=customID[optSel]
customSel[k]=customSel[k]%#customRange[k]+1
customSel[optSel]=customSel[optSel]%#customRange[customID[optSel]]+1
if optSel==12 then
curBG=customRange.bg[customSel[optSel]]
elseif optSel==13 then
BGM(customRange.bgm[customSel[optSel]])
end
elseif key=="down"then
optSel=optSel%#customID+1
elseif key=="up"then
@@ -320,6 +255,37 @@ function keyDown.custom(key)
back()
end
end
function mouseDown.draw(x,y,k)
mouseMove.draw(x,y)
end
function mouseMove.draw(x,y,dx,dy)
sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
if sx<1 or sx>10 then sx=nil end
if sy<1 or sy>20 then sy=nil end
if sx and sy and ms.isDown(1,2,3)then
preField[sy][sx]=ms.isDown(1)and pen or ms.isDown(2)and 0 or -1
end
end
function wheelmoved.draw(x,y)
if y<0 then
pen=pen+1
if pen==8 then pen=9 elseif pen==14 then pen=0 end
else
pen=pen-1
if pen==8 then pen=7 elseif pen==-1 then pen=13 end
end
end
function touchDown.draw(id,x,y)
end
function touchMove.draw(id,x,y,dx,dy)
sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
if sx<1 or sx>10 then sx=nil end
if sy<1 or sy>20 then sy=nil end
if sx and sy then
preField[sy][sx]=pen
end
end
function keyDown.draw(key)
if key=="delete"then
Buttons.draw.clear.code()
@@ -348,6 +314,7 @@ function keyDown.draw(key)
pen=find("123qwea#sdzxc",key)or pen
end
end
function keyDown.setting2(key)
if key=="escape"then
if keyboardSetting then
@@ -377,58 +344,6 @@ function keyDown.setting2(key)
curBoard=min(curBoard+1,8)
end
end
function keyDown.play(key)
if key=="escape"and not sceneSwaping then
return(frame<180 and back or pauseGame)()
end
local m=setting.keyMap
for p=1,human do
for k=1,12 do
if key==m[2*p-1][k]or key==m[2*p][k]then
pressKey(k,players[p])
return
end
end
end
end
function keyDown.pause(key)
if key=="escape"then
back()
elseif key=="return"or key=="space"then
resumeGame()
end
end
keyUp={}
function keyUp.play(key)
local m=setting.keyMap
for p=1,human do
for k=1,12 do
if key==m[2*p-1][k]or key==m[2*p][k]then
releaseKey(k,players[p])
return
end
end
end
end
gamepadDown={}
function gamepadDown.intro(key)
if key=="back"then
back()
else
gotoScene("main")
end
end
function gamepadDown.mode(key)
if key=="dpdown"then
if modeSel<#modeID then modeSel=modeSel+1 end
elseif key=="dpup"then
if modeSel>1 then modeSel=modeSel-1 end
elseif key=="start"then
loadGame(modeSel,levelSel)
elseif key=="back"then
back()
end
end
function gamepadDown.setting2(key)
if key=="back"then
if joystickSetting then
@@ -458,6 +373,117 @@ function gamepadDown.setting2(key)
curBoard=min(curBoard+1,8)
end
end
function mouseDown.setting3(x,y,k)
if k==2 then back()end
for K=1,#virtualkey do
local b=virtualkey[K]
if (x-b[1])^2+(y-b[2])^2<b[3]then
sel=K
end
end
end
function mouseMove.setting3(x,y,dx,dy)
if sel and ms.isDown(1)then
local b=virtualkey[sel]
b[1],b[2]=b[1]+dx,b[2]+dy
end
end
function mouseUp.setting3(x,y,k)
if sel then
local b=virtualkey[sel]
local k=snapLevelValue[snapLevel]
b[1],b[2]=int(b[1]/k+.5)*k,int(b[2]/k+.5)*k
end
end
function touchDown.setting3(id,x,y)
for K=1,#virtualkey do
local b=virtualkey[K]
if (x-b[1])^2+(y-b[2])^2<b[3]then
sel=K
end
end
end
function touchUp.setting3(id,x,y)
if sel then
x,y=xOy:inverseTransformPoint(x,y)
if sel then
local b=virtualkey[sel]
local k=snapLevelValue[snapLevel]
b[1],b[2]=int(b[1]/k+.5)*k,int(b[2]/k+.5)*k
end
end
end
function touchMove.setting3(id,x,y,dx,dy)
if sel then
local b=virtualkey[sel]
b[1],b[2]=b[1]+dx,b[2]+dy
end
end
function keyDown.pause(key)
if key=="escape"then
back()
elseif key=="return"or key=="space"then
resumeGame()
end
end
function touchDown.play(id,x,y)
if setting.virtualkeySwitch then
local t=onVirtualkey(x,y)
if t then
pressKey(t,players[1])
end
end
end
function touchUp.play(id,x,y)
if setting.virtualkeySwitch then
local t=onVirtualkey(x,y)
if t then
releaseKey(t,players[1])
end
end
end
function touchMove.play(id,x,y,dx,dy)
if setting.virtualkeySwitch then
local l=tc.getTouches()
for n=1,#virtualkey do
local b=virtualkey[n]
for i=1,#l do
local x,y=xOy:inverseTransformPoint(tc.getPosition(l[i]))
if(x-b[1])^2+(y-b[2])^2<=b[3]then goto L end
end
releaseKey(n,players[1])
::L::
end
end
end
function keyDown.play(key)
if key=="escape"and not sceneSwaping then
return(frame<180 and back or pauseGame)()
end
local m=setting.keyMap
for p=1,human do
for k=1,12 do
if key==m[2*p-1][k]or key==m[2*p][k]then
pressKey(k,players[p])
return
end
end
end
end
function keyUp.play(key)
local m=setting.keyMap
for p=1,human do
for k=1,12 do
if key==m[2*p-1][k]or key==m[2*p][k]then
releaseKey(k,players[p])
return
end
end
end
end
function gamepadDown.play(key)
if key=="back"then back()return end
local m=setting.keyMap
@@ -470,7 +496,6 @@ function gamepadDown.play(key)
end
end
end
gamepadUp={}
function gamepadUp.play(key)
local m=setting.keyMap
for p=1,human do
@@ -483,6 +508,9 @@ function gamepadUp.play(key)
end
end
function love.mousepressed(x,y,k,t,num)
if t then return end
mouseShow=true
@@ -651,7 +679,7 @@ function love.resize(w,h)
collectgarbage()
end
function love.focus(f)
if not f and wd.isMinimized()and scene=="play"then pauseGame()end
if system~="Android" and not f and scene=="play"then pauseGame()end
end
function love.update(dt)
-- if players then for k,v in pairs(players[1])do
@@ -742,7 +770,7 @@ function love.draw()
local r=Timer()*.5
gc.setColor(1,1,1,min(1-abs(1-r%1*2),.3))
r=int(r)%7+1
gc.draw(mouseBlock[r],mx,my,Timer()%pi*4,20,20,scs[2*r]-.5,#blocks[r][0]-scs[2*r-1]+.5)
gc.draw(mouseBlock[r],mx,my,Timer()%3.1416*4,20,20,scs[2*r]-.5,#blocks[r][0]-scs[2*r-1]+.5)
gc.setColor(1,1,1,.5)gc.circle("fill",mx,my,5)
gc.setColor(1,1,1)gc.circle("fill",mx,my,3)
end--Awesome mouse!
@@ -781,11 +809,13 @@ function love.run()
end
tm.step()
love.update(tm.getDelta())
readyDrawFrame=readyDrawFrame+setting.frameMul
if readyDrawFrame>=100 then
readyDrawFrame=readyDrawFrame-100
love.draw()
gc.present()
if not wd.isMinimized()then
readyDrawFrame=readyDrawFrame+setting.frameMul
if readyDrawFrame>=100 then
readyDrawFrame=readyDrawFrame-100
love.draw()
gc.present()
end
end
::L::if Timer()-frameT<1/60 then goto L end
frameT=Timer()

View File

@@ -9,7 +9,7 @@ function love.conf(t)
t.audio.mixwithsystem=true--Switch on to keep sysBGM
local W=t.window
W.title="Techmino V0.7.19"
W.title="Techmino V0.7.21"
W.icon="/image/icon.png"
W.width,W.height=1280,720
W.minwidth,W.minheight=640,360

View File

@@ -52,6 +52,9 @@ loadmode={
createPlayer(1,340,15)
if curMode.lv==2 then
pushSpeed=1
for i=1,5 do
garbageRise(10,1,rnd(10))
end
end
end,
solo=function()
@@ -80,7 +83,7 @@ loadmode={
c4wtrain=function()
createPlayer(1,340,15)
local F=P.field
for i=1,22 do
for i=1,24 do
F[i]=getNewRow(10)
P.visTime[i]=getNewRow(20)
for x=4,7 do F[i][x]=0 end
@@ -156,10 +159,10 @@ loadmode={
custom=function()
for i=1,#customID do
local k=customID[i]
modeEnv[k]=customRange[k][customSel[k]]
modeEnv[k]=customRange[k][customSel[i]]
end
modeEnv._20G=modeEnv.drop==-1
modeEnv.oncehold=customSel.hold==1
modeEnv.oncehold=customSel[6]==1
createPlayer(1,340,15)
if modeEnv.opponent==0 then
else
@@ -186,6 +189,8 @@ loadmode={
end
end
end
modeEnv.bg=customRange.bg[customSel[12]]
modeEnv.bgm=customRange.bgm[customSel[13]]
end,
}
mesDisp={
@@ -326,6 +331,10 @@ mesDisp={
mStr(max(100-P.stat.row,0),-82,280)
end,
custom=function()
setFont(25)
mStr("Rows",-82,300)
setFont(80)
mStr(P.stat.row,-82,220)
if P.gameEnv.target<1e4 then
setFont(75)
mStr(max(P.gameEnv.target-P.stat.row,0),-82,280)
@@ -338,7 +347,7 @@ mesDisp={
if B>0 then
gc.setColor(blockColor[B])
gc.rectangle("line",30*x-25,605-30*y,20,20)
elseif B==-1 then
elseif B==0 then
gc.setColor(.8,.8,.8,.6)
gc.line(30*x-25,605-30*y,30*x-5,625-30*y)
gc.line(30*x-25,625-30*y,30*x-5,605-30*y)
@@ -359,7 +368,6 @@ Event={
P.rank=1
P.result="WIN"
changeAtk(P)
BGM("8-bit happiness")
end
for i=1,#P.atkBuffer do
P.atkBuffer[i].sent=true
@@ -370,11 +378,14 @@ Event={
P.visTime[i][j]=min(P.visTime[i][j],20)
end
end
if P.id==1 then
if P.human then
gamefinished=true
newTask(Event_task.finish,P)
SFX("win")
VOICE("win")
if modeEnv.royaleMode then
BGM("8-bit happiness")
end
end
showText(P,text.win,"beat",90,nil,.4,curMode.id~="custom")
end,
@@ -414,7 +425,7 @@ Event={
end
P.lastRecv=A
if P.id==1 or A.id==1 then
newTask(Event_task.throwBadge,nil,{P,max(3,P.badge)*4})
newTask(Event_task.throwBadge,A,{P,max(3,P.badge)*4})
end
freshMostBadge()
end
@@ -442,11 +453,11 @@ Event={
end
P.gameEnv.keepVisible=P.gameEnv.visible~="show"
showText(P,text.lose,"appear",90,nil,nil,true)
if P.id==1 then
if P.human then
gamefinished=true
if modeEnv.royaleMode then BGM("end")end
SFX("fail")
VOICE("lose")
if modeEnv.royaleMode then BGM("end")end
end
if #players.alive==1 then
local t=P
@@ -492,10 +503,7 @@ Event={
P.gameEnv.fall=rush_fall[s]
P.gameEnv.das=10-s
if s==3 then P.gameEnv.arr=2 end
if s==5 then
P.gameEnv.bone=true
newTask(Event_task.bgmWarp,P,120)
end
if s==5 then P.gameEnv.bone=true end
showText(P,text.stage[s],"fly",80,-120)
SFX("reach")
end
@@ -509,7 +517,6 @@ Event={
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 P.modeData.event<3 then t=t+50 end
if int(t*.01)>P.modeData.event then
P.modeData.event=P.modeData.event+1
if P.modeData.event==5 then
@@ -525,10 +532,7 @@ Event={
P.gameEnv.wait=death_wait[s]
P.gameEnv.fall=death_fall[s]
P.gameEnv.das=int(7.3-s*.4)
if s==4 then
P.gameEnv.bone=true
newTask(Event_task.bgmWarp,P,120)
end
if s==4 then P.gameEnv.bone=true end
showText(P,text.stage[s],"fly",80,-120)
SFX("reach")
end
@@ -635,18 +639,18 @@ Event_task={
removeRow(P.field)
removeRow(P.visTime)
end
if P.id==1 then
if #players==1 then
pauseGame()
end
return true
end
end
end,
throwBadge=function(self,P,data)
throwBadge=function(self,A,data)
data[2]=data[2]-1
if data[2]%4==0 then
throwBadge(data[1],data[1].lastRecv)
if not data[1].ai and data[2]%8==0 then
if not A.ai and data[2]%8==0 then
SFX("collect")
end
end
@@ -673,17 +677,19 @@ Event_task={
survivor_easy=function(self,P)
if not P.control then return end
P.counter=P.counter+1
if P.counter>=max(60,150-2*P.modeData.event)then
if P.counter>=max(60,150-2*P.modeData.event)and P.atkBuffer.sum<4 then
ins(P.atkBuffer,{pos=rnd(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1})
P.counter=0
P.atkBuffer.sum=P.atkBuffer.sum+1
P.stat.recv=P.stat.recv+1
if P.modeData.event==45 then showText(P,text.maxspeed,"appear",80,-140)end
P.counter=0
P.modeData.event=P.modeData.event+1
end
end,
survivor_normal=function(self,P)
if not P.control then return end
P.counter=P.counter+1
if P.counter>=max(90,180-2*P.modeData.event)then
if P.counter>=max(90,180-2*P.modeData.event)and P.atkBuffer.sum<8 then
local d=P.modeData.event+1
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})
@@ -692,52 +698,52 @@ Event_task={
end
P.atkBuffer.sum=P.atkBuffer.sum+d%4+1
P.stat.recv=P.stat.recv+d%4+1
if P.atkBuffer.sum>20 then garbageRelease()end
P.counter=0
if P.modeData.event==45 then showText(P,text.maxspeed,"appear",80,-140)end
P.modeData.event=P.modeData.event+1
P.counter=0
P.modeData.event=d
end
end,
survivor_hard=function(self,P)
if not P.control then return end
P.counter=P.counter+1
if P.counter>=max(60,180-2*P.modeData.event)then
if P.counter>=max(60,180-2*P.modeData.event)and P.atkBuffer.sum<15 then
if P.modeData.event%3<2 then
ins(P.atkBuffer,{pos=rnd(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1})
else
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.modeData.event%3<2 and 1 or 3)
if P.atkBuffer.sum>20 then garbageRelease()end
P.counter=0
local R=(P.modeData.event%3<2 and 1 or 3)
P.atkBuffer.sum=P.atkBuffer.sum+R
P.stat.recv=P.stat.recv+R
if P.modeData.event==45 then showText(P,text.maxspeed,"appear",80,-140)end
P.counter=0
P.modeData.event=P.modeData.event+1
end
end,
survivor_lunatic=function(self,P)
if not P.control then return end
P.counter=P.counter+1
if P.counter>=max(60,150-P.modeData.event)then
if P.counter>=max(60,150-P.modeData.event)and P.atkBuffer.sum<20 then
local t=max(60,90-P.modeData.event)
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>15 then garbageRelease()end
P.counter=0
P.stat.recv=P.stat.recv+4
if P.modeData.event==60 then showText(P,text.maxspeed,"appear",80,-140)end
P.counter=0
P.modeData.event=P.modeData.event+1
end
end,
survivor_ultimate=function(self,P)
if not P.control then return end
P.counter=P.counter+1
if P.counter>=max(300,600-10*P.modeData.event)then
if P.counter>=max(300,600-10*P.modeData.event)and P.atkBuffer.sum<20 then
local t=max(300,480-12*P.modeData.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>32 then garbageRelease()end
P.stat.recv=P.stat.recv+4
P.counter=0
if P.modeData.event==31 then showText(P,text.maxspeed,"appear",80,-140)end
P.modeData.event=P.modeData.event+1
@@ -790,33 +796,33 @@ Event_task={
defaultModeEnv={
sprint={
{
drop=60,target=10,
reach=Event.win,
drop=60,lock=60,
target=10,reach=Event.win,
bg="strap",bgm="race",
},
{
drop=60,target=20,
reach=Event.win,
drop=60,lock=60,
target=20,reach=Event.win,
bg="strap",bgm="race",
},
{
drop=60,target=40,
reach=Event.win,
drop=60,lock=60,
target=40,reach=Event.win,
bg="strap",bgm="race",
},
{
drop=60,target=100,
reach=Event.win,
drop=60,lock=60,
target=100,reach=Event.win,
bg="strap",bgm="race",
},
{
drop=60,target=400,
reach=Event.win,
drop=60,lock=60,
target=400,reach=Event.win,
bg="strap",bgm="push",
},
{
drop=60,target=1000,
reach=Event.win,
drop=60,lock=60,
target=1000,reach=Event.win,
bg="strap",bgm="push",
},
},
@@ -1016,18 +1022,18 @@ defaultModeEnv={
},
{
oncehold=false,
drop=30,lock=60,
target=1,reach=Event.tech_reach_easy,
drop=1e99,lock=1e99,
target=1,reach=Event.tech_reach_ultimate,
bg="matrix",bgm="newera",
},
{
drop=10,lock=60,
freshLimit=15,
target=1,reach=Event.tech_reach_hard,
bg="matrix",bgm="way",
},
{
drop=8,lock=60,
freshLimit=15,
target=1,reach=Event.tech_reach_hard,
bg="matrix",bgm="secret8th",
},
{
drop=4,lock=40,
drop=3,lock=40,
target=1,
freshLimit=15,
reach=Event.tech_reach_hard,
@@ -1152,12 +1158,10 @@ defaultModeEnv={
custom={
{
reach=Event.win,
bg="none",bgm="reason",
},
{
Fkey=true,
reach=Event.win,
bg="none",bgm="reason",
},
},
}

BIN
font.ttf

Binary file not shown.

View File

@@ -133,7 +133,7 @@ local freshMethod={
end,
drought2=function()
if #P.next<6 then
local bag={1,1,1,2,2,2,3,3,3,4,4,4,6,6,6,5,7}
local bag={1,1,1,1,2,2,2,2,6,6,6,6,3,3,4,4,5,7}
::L::
newNext(rem(bag,rnd(#bag)))
if bag[1]then goto L end
@@ -150,7 +150,7 @@ local shadeColor={
{0,1,1,.3},
}
local function createShade(x1,y1,x2,y2)--x1<x2,y1>y2
if not P.small and P.showTime>=20 and setting.fxs and y1>=y2 then
if P.gameEnv.block and y1>=y2 then
ins(P.shade,{5,P.cur.color,x1,y1,x2,y2})
end
end
@@ -254,6 +254,7 @@ function createPlayer(id,x,y,size,AIspeed,data)
ins(players.alive,P)
P.index={__index=P}
P.x,P.y,P.size=x,y,size or 1
P.fieldOffX,P.fieldOffY=0,0
P.small=P.size<.1
if P.small then
P.centerX,P.centerY=P.x+300*P.size,P.y+600*P.size
@@ -435,7 +436,7 @@ function createBeam(S,R,lv)--Player id
end
ins(FX.beam,{x1,y1,x2,y2,t=0,lv=lv})
end
function throwBadge(S,R)--Player id
function throwBadge(S,R)--Sender/Receiver
local x1,y1,x2,y2
if S.small then
x1,y1=S.centerX,S.centerY
@@ -443,9 +444,9 @@ function throwBadge(S,R)--Player id
x1,y1=S.x+308*S.size,S.y+450*S.size
end
if R.small then
x1,y1=R.centerX,R.centerY
x2,y2=R.centerX,R.centerY
else
x2,y2=R.x+73*R.size,R.y+345*R.size
x2,y2=R.x+70*R.size,R.y+344*R.size
end
ins(FX.badge,{x1,y1,x2,y2,t=0})
end
@@ -579,7 +580,10 @@ function freshgho()
goto L
end
if P.curY>P.y_img then
createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
if P.human and setting.fxs then
createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
P.fieldOffY=4
end
P.curY=P.y_img
end
else
@@ -719,7 +723,9 @@ function spin(d,ifpre)
end
goto quit
::spin::
createShade(P.curX,P.curY+P.r-1,P.curX+P.c-1,P.curY)
if P.human and setting.fxs then
createShade(P.curX,P.curY+P.r-1,P.curX+P.c-1,P.curY)
end
P.curX,P.curY,P.dir=ix,iy,idir
P.sc,P.cur.bk=scs[P.cur.id][idir],icb
P.r,P.c=ir,ic
@@ -1009,7 +1015,7 @@ end
function pressKey(i,p)
P=p
P.keyPressing[i]=true
if P.id==1 then
if P.human then
virtualkeyDown[i]=true
virtualkeyPressTime[i]=10
end
@@ -1090,8 +1096,11 @@ act={
changeAtkMode(3)
else
if P.waiting==-1 then
if P.curY-P.y_img>0 then
createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
if P.curY~=P.y_img then
if P.human and setting.fxs then
createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
P.fieldOffY=5
end
P.curY=P.y_img
P.spinLast=false
if P.human then
@@ -1131,7 +1140,7 @@ act={
P.swappingAtkMode=30
end
end
if curMode.id=="custom"and curMode.lv==2 then
if curMode.id=="custom"and curMode.lv==2 and P.stat.row>0 then
for y=1,20 do
local L=P.field[y]
for x=1,10 do
@@ -1154,29 +1163,48 @@ act={
end,
insDown=function()
if P.curY~=P.y_img then
createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
if P.human and setting.fxs then
createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
end
P.curY,P.lockDelay,P.spinLast=P.y_img,P.gameEnv.lock,false
if P.human and setting.fxs then
P.fieldOffY=4
end
end
end,
insLeft=function()
local x0=cx
local x0=P.curX
::L::if not ifoverlap(P.cur.bk,P.curX-1,P.curY)then
P.curX=P.curX-1
createShade(P.curX+1,P.curY+P.r-1,P.curX+1,P.curY)
if P.human and setting.fxs then
createShade(P.curX+1,P.curY+P.r-1,P.curX+1,P.curY)
end
freshgho()
goto L
end
if x0~=cx then freshLockDelay()end
if x0~=P.curX then
if P.human and setting.fxs and P.curX==1 then
P.fieldOffX=-4
end
freshLockDelay()
end
end,
insRight=function()
local x0=cx
local x0=P.curX
::L::if not ifoverlap(P.cur.bk,P.curX+1,P.curY)then
P.curX=P.curX+1
createShade(P.curX+P.c-1,P.curY+P.r-1,P.curX+P.c-1,P.curY)
if P.human and setting.fxs then
createShade(P.curX+P.c-1,P.curY+P.r-1,P.curX+P.c-1,P.curY)
end
freshgho()
goto L
end
if x0~=cx then freshLockDelay()end
if x0~=P.curX then
if P.human and setting.fxs and P.curX+P.c==11 then
P.fieldOffX=4
end
freshLockDelay()
end
end,
down1=function()
if P.curY~=P.y_img then

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 972 B

BIN
image/mess/title_old.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -36,6 +36,8 @@ return{
target="目标行数:",
freshLimit="锁延刷新次数:",
opponent="对手速度等级:",
bg="背景:",
bgm="背景音乐:",
},
customVal={
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"","[20G]"},
@@ -56,7 +58,8 @@ return{
keyboard="键盘",joystick="手柄",
space="空格",enter="回车",
setting2Help="方向键选择/翻页,回车修改,esc返回",
musicRoom="音乐室",
nowPlaying="正在播放:",
actName={"左移:","右移:","顺时针旋转:","逆时针旋转:","180°旋转","硬降:","软降:","暂存:","功能键:","重新开始:","左瞬移:","右瞬移:","软降到底:"},
modeName={
@@ -88,7 +91,7 @@ return{
load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",},
tips={
"不是动画真的在加载!",
"不是动画,真的在加载!",
"整个游戏都是MrZ完成的!",
"大满贯10连击消四全清!",
"<方块研究所>有一个Nspire-CX版本!",
@@ -100,7 +103,7 @@ return{
"Miya:喵!",
"225238922,哔哩哔哩 干杯~",
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
"合群了就会消失但是消失不代表没有意义",
"合群了就会消失,但是消失不代表没有意义",
"学会使用两个旋转键,三个更好",
"更小的DAS和ARR拥有更高的操作上限",
"注意到\"旋转\"到底对方块做了些什么吗?",
@@ -149,31 +152,43 @@ return{
main={
play="开始",
setting="设置",
music="音乐室",
stat="统计信息",
help="帮助",
quit="退出",
},
mode={
up="Λ",
down="v",
left="<",
right=">",
up="",
down="",
left="",
right="",
start="开始",
custom="自定义(C)",
back="返回",
},
music={
up="",
play="播放",
down="",
back="返回",
},
custom={
up="Λ",
down="v",
left="<",
right=">",
up="",
down="",
left="",
right="",
start1="消除开始",
start2="拼图开始",
draw="画图(D)",
set1="40行",
set2="1v1",
set3="无尽",
set4="隐形",
set5="极限",
back="返回",
},
draw={
free="不定",
any="不定",
block1="",
block2="",
block3="",
@@ -186,7 +201,7 @@ return{
gb3="",
gb4="",
gb5="",
erase="×",
space="×",
clear="清空",
back="返回",
},

View File

@@ -36,6 +36,8 @@ return{
target="目标行数:",
freshLimit="锁延刷新次数:",
opponent="对手速度等级:",
bg="背景:",
bgm="背景音乐:",
},
customVal={
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"","[20G]"},
@@ -56,7 +58,8 @@ return{
keyboard="键盘",joystick="手柄",
space="空格",enter="回车",
setting2Help="方向键选择/翻页,回车修改,esc返回",
musicRoom="音乐室",
nowPlaying="正在播放:",
actName={"左移:","右移:","顺时针旋转:","逆时针旋转:","180°旋转","硬降:","软降:","暂存:","功能键:","重新开始:","左瞬移:","右瞬移:","软降到底:"},
modeName={
@@ -88,7 +91,7 @@ return{
load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",},
tips={
"不是动画真的在加载!",
"不是动画,真的在加载!",
"整个游戏都是MrZ完成的!",
"大满贯10连击消四全清!",
"<方块研究所>有一个Nspire-CX版本!",
@@ -100,7 +103,7 @@ return{
"Miya:喵!",
"225238922,哔哩哔哩 干杯~",
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
"合群了就会消失但是消失不代表没有意义",
"合群了就会消失,但是消失不代表没有意义",
"学会使用两个旋转键,三个更好",
"更小的DAS和ARR拥有更高的操作上限",
"注意到\"旋转\"到底对方块做了些什么吗?",
@@ -149,31 +152,43 @@ return{
main={
play="开始",
setting="设置",
music="音乐室",
stat="统计信息",
help="帮助",
quit="退出",
},
mode={
up="Λ",
down="v",
left="<",
right=">",
up="",
down="",
left="",
right="",
start="开始",
custom="自定义(C)",
back="返回",
},
music={
up="",
play="播放",
down="",
back="返回",
},
custom={
up="Λ",
down="v",
left="<",
right=">",
up="",
down="",
left="",
right="",
start1="消除开始",
start2="拼图开始",
draw="画图(D)",
set1="40行",
set2="1v1",
set3="无尽",
set4="隐形",
set5="极限",
back="返回",
},
draw={
free="不定",
any="不定",
block1="",
block2="",
block3="",
@@ -186,7 +201,7 @@ return{
gb3="",
gb4="",
gb5="",
erase="×",
space="×",
clear="清空",
back="返回",
},

View File

@@ -36,6 +36,8 @@ return{
target="Line limit:",
freshLimit="Lock fresh limit:",
opponent="Opponent speed:",
bg="Background:",
bgm="BGM:",
},
customVal={
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"","[20G]"},
@@ -50,13 +52,14 @@ return{
freshLimit={0,8,15,""},
opponent={"No CPU",1,2,3,4,5,6,7,8,9,10,11},
},
softdropdas="softdropDAS:",
softdroparr="softdropARR:",
softdropdas="Down DAS:",
softdroparr="Down ARR:",
snapLevelName={"Free pos","Snap-10","Snap-20","Snap-40","Snap-60","Snap-80"},
keyboard="Keyboard",joystick="Joystick",
space="Space",enter="Enter",
setting2Help="Arrowkey to select/change slot,Enter to change,Esc back",
musicRoom="Music Room",
nowPlaying="Now Playing:",
actName={"Move Left:","Move Right:","Rotate Right:","Rotate Left:","Rotate Flip:","Hard Drop:","Soft Drop:","Hold:","Function:","Restart:","Instant Left:","Instant Right:","Ins Down:"},
modeName={
@@ -149,31 +152,43 @@ return{
main={
play="Play",
setting="Settings",
music="Music room",
stat="Statistics",
help="Help",
quit="Quit",
},
mode={
up="Λ",
down="v",
left="<",
right=">",
up="",
down="",
left="",
right="",
start="Start",
custom="Custom(C)",
back="Back",
},
music={
up="",
play="Play",
down="",
back="Back",
},
custom={
up="Λ",
down="v",
left="<",
right=">",
up="",
down="",
left="",
right="",
start1="Clear Start",
start2="Puzzle Start",
draw="Draw(D)",
set1="40L",
set2="1v1",
set3="infinite",
set4="blind",
set5="classic",
back="Back",
},
draw={
free="FREE",
any="ANY",
block1="",
block2="",
block3="",
@@ -186,7 +201,7 @@ return{
gb3="",
gb4="",
gb5="",
erase="×",
space="×",
clear="CLEAR",
back="Back",
},

124
list.lua
View File

@@ -52,7 +52,6 @@ blockColor={
}
sfx={
"button","swipe",
"ready","start","win","fail","collect",
"move","rotate","rotatekick","hold",
"prerotate","prehold",
@@ -86,6 +85,7 @@ voiceList={
"spin","spin_","mini","b2b","b3b","pc",
"win","lose","voc_nya","nya",
}
voiceBank={}
voice={
Z={"Z_1","Z_2"},
S={"S_1","S_2"},
@@ -110,18 +110,31 @@ voice={
nya={"nya_1","nya_2","nya_3","nya_4"},
}
musicID={
"blank",
"way",
"race",
"newera",
"push",
"reason",
"infinite",
"cruelty",
"final",
"secret7th",
"secret8th",
"rockblock",
"8-bit happiness",
"end",
}
customID={
"drop",
"lock",
"wait",
"fall",
"next",
"hold",
"sequence",
"visible",
"drop","lock",
"wait","fall",
"next","hold",
"sequence","visible",
"target",
"freshLimit",
"opponent",
"bg","bgm",
}
customRange={
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99,-1},
@@ -135,6 +148,8 @@ customRange={
target={10,20,40,100,200,500,1000,1e99},
freshLimit={0,8,15,1e99},
opponent={0,60,30,20,15,10,7,5,4,3,2,1},
bg={"none","game1","game2","game3","strap","rgb","glow","matrix"},
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
}
RCPB={10,33,200,33,105,5,105,60}
@@ -159,7 +174,7 @@ modeLevel={
blind={"EASY","HARD","HARD+","LUNATIC","ULTIMATE","GM"},
dig={"NORMAL","LUNATIC"},
survivor={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
tech={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
tech={"NORMAL","NORMAL+","HARD","LUNATIC","ULTIMATE"},
c4wtrain={"NORMAL","LUNATIC"},
pctrain={"NORMAL","EXTRA"},
pcchallenge={"NORMAL","HARD","LUNATIC"},
@@ -169,15 +184,15 @@ modeLevel={
hotseat={"2P","3P","4P",},
custom={"Normal","Puzzle"},
}
local t,f=true,false
local O,_=true,false
blocks={
{[0]={{f,t,t},{t,t,f}},{{t,f},{t,t},{f,t}}},
{[0]={{t,t,f},{f,t,t}},{{f,t},{t,t},{t,f}}},
{[0]={{t,t,t},{f,f,t}},{{t,t},{t,f},{t,f}},{{t,f,f},{t,t,t}},{{f,t},{f,t},{t,t}}},
{[0]={{t,t,t},{t,f,f}},{{t,f},{t,f},{t,t}},{{f,f,t},{t,t,t}},{{t,t},{f,t},{f,t}}},
{[0]={{t,t,t},{f,t,f}},{{t,f},{t,t},{t,f}},{{f,t,f},{t,t,t}},{{f,t},{t,t},{f,t}}},
{[0]={{t,t},{t,t}},{{t,t},{t,t}}},
{[0]={{t,t,t,t}},{{t},{t},{t},{t}}},
{[0]={{_,O,O},{O,O,_}},{{O,_},{O,O},{_,O}}},
{[0]={{O,O,_},{_,O,O}},{{_,O},{O,O},{O,_}}},
{[0]={{O,O,O},{_,_,O}},{{O,O},{O,_},{O,_}},{{O,_,_},{O,O,O}},{{_,O},{_,O},{O,O}}},
{[0]={{O,O,O},{O,_,_}},{{O,_},{O,_},{O,O}},{{_,_,O},{O,O,O}},{{O,O},{_,O},{_,O}}},
{[0]={{O,O,O},{_,O,_}},{{O,_},{O,O},{O,_}},{{_,O,_},{O,O,O}},{{_,O},{O,O},{_,O}}},
{[0]={{O,O},{O,O}},{{O,O},{O,O}}},
{[0]={{O,O,O,O}},{{O},{O},{O},{O}}},
}
local l={1,2,6,7}for i=1,4 do blocks[l[i]][2],blocks[l[i]][3]=blocks[l[i]][0],blocks[l[i]][1]end
for i=1,7 do blocks[i+7]=blocks[i]end
@@ -244,38 +259,64 @@ local virtualkeySet={
{1200-770,40,1600,40},--restart
},--PC key feedback
}
local customSet={
{20,20,1,1,7,1,1,1,3,4,1,3,3},
{18,20,1,1,7,1,1,1,8,3,8,3,3},
{22,22,1,1,7,3,1,3,8,4,1,8,7},
{20,20,1,1,7,1,1,3,8,3,1,7,8},
{23,11,8,11,4,1,2,1,8,3,1,4,9},
}
local function useDefaultSet(n)
for i=1,#customSet[n]do
customSel[i]=customSet[n][i]
end
curBG=customRange.bg[customSel[12]]
BGM(customRange.bgm[customSel[13]])
end
Buttons={
load={},
intro={},
main={
play= {x=380,y=300,w=240,h=240,rgb=color.red, f=70,code=function()gotoScene("mode")end,down="stat",right="setting"},
setting={x=640,y=300,w=240,h=240,rgb=color.lightBlue, f=55,code=function()gotoScene("setting")end,down="stat",left="play",right="help"},
stat= {x=640,y=560,w=240,h=240,rgb=color.cyan, f=55,code=function()gotoScene("stat")end,up="setting",left="play",right="help"},
help= {x=900,y=560,w=240,h=240,rgb=color.yellow, f=55,code=function()gotoScene("help")end,up="setting",left="stat",right="quit"},
play= {x=380,y=300,w=240, h=240,rgb=color.red, f=70,code=function()gotoScene("mode")end,down="stat",right="setting"},
setting={x=640,y=300,w=240, h=240,rgb=color.lightBlue, f=55,code=function()gotoScene("setting")end,down="stat",left="play",right="music"},
music= {x=900,y=300,w=240, h=240,rgb=color.lightCyan, f=42,code=function()gotoScene("music")end,down="help",left="setting",right="quit"},
stat= {x=640,y=560,w=240, h=240,rgb=color.cyan, f=55,code=function()gotoScene("stat")end,up="setting",left="play",right="help"},
help= {x=900,y=560,w=240, h=240,rgb=color.yellow, f=55,code=function()gotoScene("help")end,up="music",left="stat",right="quit"},
quit= {x=1180,y=620,w=120,h=120,rgb=color.lightGrey, f=50,code=function()gotoScene("quit")end,up="setting",left="help"},
},
mode={
up= {x=1000,y=210,w=200,h=140, rgb=color.white, f=64, code=function()keyDown.mode("up")end, hide=function()return modeSel==1 end,},
down= {x=1000,y=430,w=200,h=140, rgb=color.white, f=80, code=function()keyDown.mode("down")end, hide=function()return modeSel==#modeID end,},
left= {x=190, y=160,w=100,h=80, rgb=color.white, code=function()keyDown.mode("left")end, hide=function()return levelSel==1 end,},
right= {x=350, y=160,w=100,h=80, rgb=color.white, code=function()keyDown.mode("right")end,hide=function()return levelSel==#modeLevel[modeID[modeSel]]end,},
start={ x=1000, y=600,w=250,h=100, rgb=color.green, f=50, code=function()
up= {x=1000,y=210,w=200,h=140, rgb=color.white, f=80, code=function()love.keypressed("up")end, hide=function()return modeSel==1 end,},
down= {x=1000,y=430,w=200,h=140, rgb=color.white, f=80, code=function()love.keypressed("down")end, hide=function()return modeSel==#modeID end,},
left= {x=190, y=160,w=100,h=80, rgb=color.white, code=function()love.keypressed("left")end, hide=function()return levelSel==1 end,},
right= {x=350, y=160,w=100,h=80, rgb=color.white, code=function()love.keypressed("right")end,hide=function()return levelSel==#modeLevel[modeID[modeSel]]end,},
start= {x=1000,y=600,w=250,h=100, rgb=color.green, f=50, code=function()
loadGame(modeSel,levelSel)end},
custom= {x=275, y=420,w=200,h=90, rgb=color.yellow, code=function()gotoScene("custom")end},
back= {x=640, y=630,w=230,h=90, rgb=color.white, f=45, code=back},
},
music={
up= {x=1100,y=200,w=120,h=120, rgb=color.white,f=40,code=function()sel=(sel-2)%#musicID+1 end},
play= {x=1100,y=340,w=120,h=120, rgb=color.white,f=40,code=function()BGM(musicID[sel])end},
down= {x=1100,y=480,w=120,h=120, rgb=color.white,f=50,code=function()sel=sel%#musicID+1 end},
back= {x=640, y=630,w=230,h=90, rgb=color.white,f=45,code=back},
},
custom={
up= {x=1000,y=220, w=100, h=100, rgb=color.white, code=function()optSel=(optSel-2)%#customID+1 end},
down= {x=1000,y=460, w=100, h=100, rgb=color.white,f=50, code=function()optSel=optSel%#customID+1 end},
left= {x=880, y=340, w=100, h=100, rgb=color.white,f=50, code=function()local k=customID[optSel]customSel[k]=(customSel[k]-2)%#customRange[k]+1 end},
right= {x=1120,y=340, w=100, h=100, rgb=color.white,f=50, code=function()local k=customID[optSel]customSel[k]=customSel[k]%#customRange[k]+1 end},
start1= {x=880, y=580, w=220, h=70, rgb=color.green, code=function()loadGame(0,1)end},
start2= {x=1120,y=580, w=220, h=70, rgb=color.lightPurple, code=function()loadGame(0,2)end},
draw= {x=1000,y=90, w=190, h=85, rgb=color.cyan, code=function()gotoScene("draw")end},
back= {x=640, y=630 ,w=180, h=60, rgb=color.white, code=back},
up= {x=1000,y=220, w=100,h=100, rgb=color.white,f=50, code=function()optSel=(optSel-2)%#customID+1 end},
down= {x=1000,y=460, w=100,h=100, rgb=color.white,f=50, code=function()optSel=optSel%#customID+1 end},
left= {x=880, y=340, w=100,h=100, rgb=color.white,f=50, code=function()customSel[optSel]=(customSel[optSel]-2)%#customRange[customID[optSel]]+1 end},
right= {x=1120,y=340, w=100,h=100, rgb=color.white,f=50, code=function()customSel[optSel]=customSel[optSel]%#customRange[customID[optSel]]+1 end},
start1= {x=880, y=580, w=220,h=70, rgb=color.green, code=function()loadGame(0,1)end},
start2= {x=1120,y=580, w=220,h=70, rgb=color.lightPurple, code=function()loadGame(0,2)end},
draw= {x=1000,y=90, w=190,h=85, rgb=color.cyan, code=function()gotoScene("draw")end},
set1= {x=640, y=160, w=240,h=75, rgb=color.lightRed, code=function()useDefaultSet(1)end},
set2= {x=640, y=250, w=240,h=75, rgb=color.lightRed, code=function()useDefaultSet(2)end},
set3= {x=640, y=340, w=240,h=75, rgb=color.lightRed, code=function()useDefaultSet(3)end},
set4= {x=640, y=430, w=240,h=75, rgb=color.lightRed, code=function()useDefaultSet(4)end},
set5= {x=640, y=520, w=240,h=75, rgb=color.lightRed, code=function()useDefaultSet(5)end},
back= {x=640, y=630, w=180,h=60, rgb=color.white, code=back},
},
draw={
free= {x=700, y=80,w=120,h=120, f=45, rgb=color.lightGrey,code=function()pen=-1 end},
any= {x=700, y=80,w=120,h=120, f=45, rgb=color.lightGrey,code=function()pen=-1 end},
block1= {x=840, y=80,w=120,h=120, f=65, rgb=color.red, code=function()pen=1 end},
block2= {x=980, y=80,w=120,h=120, f=65, rgb=color.green, code=function()pen=2 end},
block3= {x=1120,y=80,w=120,h=120, f=65, rgb=color.orange, code=function()pen=3 end},
@@ -288,7 +329,7 @@ Buttons={
gb3= {x=840, y=500,w=120,h=120, f=65, rgb=color.darkPurple,code=function()pen=11 end},
gb4= {x=980, y=500,w=120,h=120, f=65, rgb=color.darkRed, code=function()pen=12 end},
gb5= {x=1120,y=500,w=120,h=120, f=65, rgb=color.darkGreen,code=function()pen=13 end},
erase= {x=840, y=640,w=120,h=120, f=70, rgb=color.grey, code=function()pen=0 end},
space= {x=840, y=640,w=120,h=120, f=70, rgb=color.grey, code=function()pen=0 end},
clear= {x=1120,y=640,w=120,h=120, f=45, rgb=color.white, code=function()
if clearSureTime>0 then
for y=1,20 do for x=1,10 do preField[y][x]=0 end end
@@ -334,18 +375,15 @@ Buttons={
BGM()
setting.bgm=not setting.bgm
BGM("blank")
end,down="vib",left="sfx"},
end,down="voc",left="sfx"},
vib= {x=760,y=160, w=160, h=60,rgb=color.white, code=function()
setting.vib=(setting.vib+1)%6
VIB(1)
end,up="sfx",down="fullscreen",left="swap"},
end,up="sfx",down="fullscreen",left="swap",right="voc"},
voc= {x=940,y=160, w=160, h=60,rgb=color.white,
hide=function()
return not(kb.isDown("m")or false)
end,
hide=function()return true end,
code=function()
setting.voc=not setting.voc
if setting.voc then VOICE("voc_nya")end
end,up="sfx",down="fullscreen",left="vib"},
fullscreen= {x=850,y=230, w=340,h=60,rgb=color.white, code=function()
setting.fullscreen=not setting.fullscreen

View File

@@ -1,7 +1,7 @@
local gc,tm=love.graphics,love.timer
local ms,kb=love.mouse,love.keyboard
local fs,sys=love.filesystem,love.system
int,ceil,abs,rnd,max,min,sin,cos,atan,pi=math.floor,math.ceil,math.abs,math.random,math.max,math.min,math.sin,math.cos,math.atan,math.pi
int,ceil,abs,rnd,max,min,sin,cos,atan=math.floor,math.ceil,math.abs,math.random,math.max,math.min,math.sin,math.cos,math.atan
sub,gsub,find,format,byte,char=string.sub,string.gsub,string.find,string.format,string.byte,string.char
ins,rem,concat=table.insert,table.remove,table.concat
-- sort=table.sort
@@ -52,16 +52,7 @@ gameEnv0={
freshLimit=1e99,target=1e99,reach=null,
bg="none",bgm="race"
}
customSel={
drop=22,lock=22,
wait=1,fall=1,
next=7,hold=3,
sequence=1,
visible=1,
target=8,
freshLimit=4,
opponent=1,
}
customSel={22,22,1,1,7,3,1,1,8,4,1,1,1}
preField={h=20}
for i=1,18 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
for i=19,20 do preField[i]={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}end
@@ -146,16 +137,16 @@ virtualkey={
virtualkeyDown={F,F,F,F,F,F,F,F,F,F,F,F,F}
virtualkeyPressTime={0,0,0,0,0,0,0,0,0,0,0,0,0}
--User Data&User Setting
require"toolfunc"
require"list"
require"class"
require"gamefunc"
require"ai"
require"timer"
require"paint"
require"call&sys"
require"dataList"
require"texture"
require("toolfunc")
require("list")
require("class")
require("gamefunc")
require("ai")
require("timer")
require("paint")
require("call&sys")
require("dataList")
require("texture")
userData,userSetting=fs.newFile("userdata"),fs.newFile("usersetting")
if fs.getInfo("userdata")then

View File

@@ -20,6 +20,7 @@ local frameColor={
local modeLevelColor={
EASY=color.cyan,
NORMAL=color.green,
["NORMAL+"]=color.darkGreen,
HARD=color.magenta,
["HARD+"]=color.darkMagenta,
LUNATIC=color.red,
@@ -263,7 +264,7 @@ function Pnt.BG.game6()
end
gc.setColor(.3,.3,.3)
local r=7-int(Timer()*.5)%7
gc.draw(mouseBlock[r],640,360,Timer()%pi*6,400,400,scs[r][2]-.5,#blocks[r][0]-scs[r][1]+.5)
gc.draw(mouseBlock[r],640,360,Timer()%3.1416*6,400,400,scs[r][2]-.5,#blocks[r][0]-scs[r][1]+.5)
end
function Pnt.BG.rgb()
gc.clear(
@@ -319,12 +320,14 @@ function Pnt.intro()
end
function Pnt.main()
gc.setColor(1,1,1)
gc.draw(titleImage,300,30)
gc.draw(titleImage,280,30,nil,1.3)
setFont(30)
gc.print("Alpha V0.7.19",290,140)
gc.print(system,800,110)
gc.print("Alpha V0.7.21",290,125)
gc.print(system,845,95)
end
function Pnt.mode()
gc.setColor(1,1,1)
gc.draw(titleImage,830,30)
setFont(40)
gc.setColor(modeLevelColor[modeLevel[modeID[modeSel]][levelSel]]or color.white)
mStr(modeLevel[modeID[modeSel]][levelSel],270,215)
@@ -343,6 +346,22 @@ function Pnt.mode()
end
end
end
function Pnt.music()
gc.setColor(1,1,1,.3+sin(Timer()*5)*.2)
gc.rectangle("fill",45,98+30*sel,237,30)
gc.setColor(.8,.8,.8)
gc.draw(drawableText.musicRoom,20,20)
gc.setColor(1,1,1)
gc.draw(drawableText.musicRoom,22,23)
gc.draw(drawableText.nowPlaying,520,83)
setFont(35)
for i=1,#musicID do
gc.print(musicID[i],50,90+30*i)
end
setFont(50)
gc.setColor(sin(Timer()*.5)*.2+.8,sin(Timer()*.7)*.2+.8,sin(Timer())*.2+.8)
gc.print(bgmPlaying or"",600,140)
end
function Pnt.custom()
gc.setColor(1,1,1,.3+sin(Timer()*8)*.2)
gc.rectangle("fill",25,95+40*optSel,465,40)
@@ -354,9 +373,9 @@ function Pnt.custom()
local y=90+40*i
gc.printf(text.customOption[k],30,y,320,"right")
if text.customVal[k]then
gc.print(text.customVal[k][customSel[k]],350,y)
gc.print(text.customVal[k][customSel[i]],350,y)
else
gc.print(customRange[k][customSel[k]],350,y)
gc.print(customRange[k][customSel[i]],350,y)
end
end
end
@@ -374,7 +393,7 @@ function Pnt.draw()
local B=preField[y][x]
if B>0 then
drawPixel(y,x,B)
elseif B==-1 then
elseif B==0 then
gc.line(30*x-25,605-30*y,30*x-5,625-30*y)
gc.line(30*x-25,625-30*y,30*x-5,605-30*y)
end
@@ -393,9 +412,6 @@ function Pnt.draw()
gc.setColor(blockColor[pen])
gc.rectangle("line",945,605,70,70)
elseif pen==0 then
gc.setColor(.8,.8,.8)
gc.draw(drawableText.x,950,560)
else
gc.setLineWidth(5)
gc.setColor(.9,.9,.9)
gc.line(960,620,1000,660)
@@ -415,13 +431,14 @@ function Pnt.play()
gc.origin()
gc.setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1)
local h=#P.clearing
for j=1,#P.field do
local F=P.field
for j=1,#F do
if j==P.clearing[h]and P.falling>-1 then
h=h-1
else
for i=1,10 do
if P.field[j][i]>0 then
gc.draw(blockSkinmini[P.field[j][i]],6*i-6,120-6*j)
if F[j][i]>0 then
gc.draw(blockSkinmini[F[j][i]],6*i-6,120-6*j)
end
end
end
@@ -457,12 +474,18 @@ function Pnt.play()
gc.setColor(0,0,0,.6)gc.rectangle("fill",0,0,600,690)--Background
gc.setLineWidth(7)
gc.setColor(frameColor[P.strength])gc.rectangle("line",0,0,600,690,3)--Big frame
gc.translate(150,70)
gc.translate(150+P.fieldOffX,70+P.fieldOffY)
if P.gameEnv.grid then
gc.setLineWidth(1)
gc.setColor(1,1,1,.2)
for x=1,9 do gc.line(30*x,-10,30*x,600)end
for y=0,19 do gc.line(0,30*y,300,30*y)end
for y=0,19 do
y=30*y+P.fieldBeneath
gc.line(0,y,300,y)
end
if P.fieldBeneath>20 then
gc.line(0,P.fieldBeneath-30,300,P.fieldBeneath-30)
end
end--Grid lines
gc.translate(0,P.fieldBeneath)
gc.setScissor(scr.x+P.absFieldX*scr.k,scr.y+P.absFieldY*scr.k,300*P.size*scr.k,610*P.size*scr.k)
@@ -523,9 +546,9 @@ function Pnt.play()
end
--Draw game field
gc.setScissor()--In-playField mask
gc.translate(0,-P.fieldBeneath)
gc.setColor(1,1,1)
gc.draw(PTC.dust[p])
gc.translate(0,-P.fieldBeneath)
gc.setLineWidth(3)
gc.rectangle("line",-1,-11,302,612)--Draw boarder
@@ -572,6 +595,7 @@ function Pnt.play()
gc.setColor(1,1,1)
gc.rectangle("line",-17,-3,16,604.5)--Draw b2b bar boarder
--B2B indictator
gc.translate(-P.fieldOffX,-P.fieldOffY)
if P.gameEnv.hold then
gc.setColor(1,1,1)
@@ -699,9 +723,9 @@ function Pnt.setting()
setFont(35)
mStr("DAS:"..setting.das,290,278)
mStr("ARR:"..setting.arr,506,278)
setFont(18)
mStr(text.softdropdas..setting.sddas,290,361)
mStr(text.softdroparr..setting.sdarr,506,361)
setFont(21)
mStr(text.softdropdas..setting.sddas,290,357)
mStr(text.softdroparr..setting.sdarr,506,357)
gc.draw(blockSkin[7-int(Timer()*2)%7],820,480,nil,2)
end
function Pnt.setting2()
@@ -759,7 +783,7 @@ function Pnt.help()
for i=1,11 do
gc.printf(text.help[i],140,15+43*i,1000,"center")
end
gc.draw(titleImage,180,600,.2,.7+.05*sin(Timer()*2),nil,140,100)
gc.draw(titleImage,250,600,.2,1+.05*sin(Timer()*2),nil,212,35)
gc.setLineWidth(5)
gc.rectangle("line",17,17,260,260)
gc.rectangle("line",1077,17,186,186)
@@ -778,5 +802,5 @@ function Pnt.stat()
gc.print(text.stat[i],400,30*i-5)
gc.print(statOpt(i),720,30*i-5)
end
gc.draw(titleImage,260,570,.2+.07*sin(Timer()*3),.8,nil,250,60)
gc.draw(titleImage,260,600,.2+.07*sin(Timer()*3),nil,nil,212,35)
end

View File

@@ -79,7 +79,6 @@ groupCode=N("/image/mess/groupcode.png")
payCode=N("/image/mess/paycode.png")
drawableText={
question=T(100,"?"),
x=T(110,"×"),
bpm=T(15,"BPM"),
kpm=T(15,"KPM"),
@@ -90,5 +89,7 @@ drawableText={
custom=T(80),
keyboard=T(25),joystick=T(25),
setting2Help=T(25),
musicRoom=T(80),
nowPlaying=T(50),
}
c=gc.setCanvas()

View File

@@ -3,6 +3,8 @@ local Timer=love.timer.getTime
Tmr={}
function Tmr.load()
local t=Timer()
::R::
if loading==1 then
if loadnum<=#voiceList then
local N=voiceList[loadnum]
@@ -258,6 +260,12 @@ function Tmr.play(dt)
rem(P.shade,i)
end
end
if P.fieldOffY>0 then
P.fieldOffY=P.fieldOffY-(P.fieldOffY>3 and 2 or 1)
end
if P.fieldOffX~=0 then
P.fieldOffX=P.fieldOffX-(P.fieldOffX>0 and 1 or -1)
end
for i=#P.bonus,1,-1 do
local b=P.bonus[i]
if b.inf then

View File

@@ -50,6 +50,8 @@ local drawableTextLoad={
"keyboard",
"joystick",
"setting2Help",
"musicRoom",
"nowPlaying",
}
function swapLanguage(l)
text=require("language/"..langID[l])
@@ -125,9 +127,12 @@ end
function BGM(s)
if setting.bgm and bgmPlaying~=s then
if bgmPlaying then newTask(Event_task.bgmFadeOut,nil,bgmPlaying)end
for i=1,#Task do
if Task[i].code==Event_task.bgmFadeIn then
Task[i].code=Event_task.bgmFadeOut
for i=#Task,1,-1 do
local T=Task[i]
if T.code==Event_task.bgmFadeIn then
T.code=Event_task.bgmFadeOut
elseif T.code==Event_task.bgmFadeOut and T.data==s then
rem(Task,i)
end
end
if s then
@@ -202,27 +207,27 @@ local prevMenu={
load=love.event.quit,
intro="quit",
main="intro",
music="main",
mode="main",
custom="mode",
draw=function()
kb.setKeyRepeat(false)
gotoScene("custom")
end,
ready="mode",
play=function()
updateStat()
clearTask("play")
gotoScene(curMode.id~="custom"and"mode"or"custom","deck")
end,
pause=null,
help="main",
stat="main",
pause=nil,
setting=function()
saveSetting()
gotoScene("main")
end,
setting2="setting",
setting3="setting",
help="main",
stat="main",
}prevMenu.pause=prevMenu.play
function back()
local t=prevMenu[scene]