diff --git a/BGM/8-bit happiness.ogg b/BGM/8-bit happiness.ogg new file mode 100644 index 00000000..f429f2b9 Binary files /dev/null and b/BGM/8-bit happiness.ogg differ diff --git a/BGM/32000Hz 86kbps b/BGM/ogg 32000Hz 0.5q 1chn similarity index 100% rename from BGM/32000Hz 86kbps rename to BGM/ogg 32000Hz 0.5q 1chn diff --git a/SFX/ren_mega.ogg b/SFX/ren_mega.ogg new file mode 100644 index 00000000..d9e26027 Binary files /dev/null and b/SFX/ren_mega.ogg differ diff --git a/VOICE/I_1.ogg b/VOICE/I_1.ogg new file mode 100644 index 00000000..d83aa472 Binary files /dev/null and b/VOICE/I_1.ogg differ diff --git a/VOICE/I_2.ogg b/VOICE/I_2.ogg new file mode 100644 index 00000000..85c9a916 Binary files /dev/null and b/VOICE/I_2.ogg differ diff --git a/VOICE/J_1.ogg b/VOICE/J_1.ogg new file mode 100644 index 00000000..ca0fdfe1 Binary files /dev/null and b/VOICE/J_1.ogg differ diff --git a/VOICE/J_2.ogg b/VOICE/J_2.ogg new file mode 100644 index 00000000..b3649a41 Binary files /dev/null and b/VOICE/J_2.ogg differ diff --git a/VOICE/L_1.ogg b/VOICE/L_1.ogg new file mode 100644 index 00000000..b9c88dbb Binary files /dev/null and b/VOICE/L_1.ogg differ diff --git a/VOICE/L_2.ogg b/VOICE/L_2.ogg new file mode 100644 index 00000000..b46df613 Binary files /dev/null and b/VOICE/L_2.ogg differ diff --git a/VOICE/O_1.ogg b/VOICE/O_1.ogg new file mode 100644 index 00000000..87c839a5 Binary files /dev/null and b/VOICE/O_1.ogg differ diff --git a/VOICE/O_2.ogg b/VOICE/O_2.ogg new file mode 100644 index 00000000..35b4298a Binary files /dev/null and b/VOICE/O_2.ogg differ diff --git a/VOICE/PC_1.ogg b/VOICE/PC_1.ogg new file mode 100644 index 00000000..80d81bb8 Binary files /dev/null and b/VOICE/PC_1.ogg differ diff --git a/VOICE/S_1.ogg b/VOICE/S_1.ogg new file mode 100644 index 00000000..40f54eda Binary files /dev/null and b/VOICE/S_1.ogg differ diff --git a/VOICE/S_2.ogg b/VOICE/S_2.ogg new file mode 100644 index 00000000..7588e267 Binary files /dev/null and b/VOICE/S_2.ogg differ diff --git a/VOICE/T_1.ogg b/VOICE/T_1.ogg new file mode 100644 index 00000000..9e56790b Binary files /dev/null and b/VOICE/T_1.ogg differ diff --git a/VOICE/T_2.ogg b/VOICE/T_2.ogg new file mode 100644 index 00000000..90d57f79 Binary files /dev/null and b/VOICE/T_2.ogg differ diff --git a/VOICE/Z_1.ogg b/VOICE/Z_1.ogg new file mode 100644 index 00000000..f14898fd Binary files /dev/null and b/VOICE/Z_1.ogg differ diff --git a/VOICE/Z_2.ogg b/VOICE/Z_2.ogg new file mode 100644 index 00000000..2f02e54e Binary files /dev/null and b/VOICE/Z_2.ogg differ diff --git a/VOICE/b2b_1.ogg b/VOICE/b2b_1.ogg new file mode 100644 index 00000000..3d717ff2 Binary files /dev/null and b/VOICE/b2b_1.ogg differ diff --git a/VOICE/b2b_2.ogg b/VOICE/b2b_2.ogg new file mode 100644 index 00000000..2b13429b Binary files /dev/null and b/VOICE/b2b_2.ogg differ diff --git a/VOICE/b2b_3.ogg b/VOICE/b2b_3.ogg new file mode 100644 index 00000000..d72131f5 Binary files /dev/null and b/VOICE/b2b_3.ogg differ diff --git a/VOICE/b3b_1.ogg b/VOICE/b3b_1.ogg new file mode 100644 index 00000000..e336596b Binary files /dev/null and b/VOICE/b3b_1.ogg differ diff --git a/VOICE/double_1.ogg b/VOICE/double_1.ogg new file mode 100644 index 00000000..1f3f55e9 Binary files /dev/null and b/VOICE/double_1.ogg differ diff --git a/VOICE/double_2.ogg b/VOICE/double_2.ogg new file mode 100644 index 00000000..3446bd88 Binary files /dev/null and b/VOICE/double_2.ogg differ diff --git a/VOICE/double_3.ogg b/VOICE/double_3.ogg new file mode 100644 index 00000000..33e996b3 Binary files /dev/null and b/VOICE/double_3.ogg differ diff --git a/VOICE/lose_1.ogg b/VOICE/lose_1.ogg new file mode 100644 index 00000000..a06e28c5 Binary files /dev/null and b/VOICE/lose_1.ogg differ diff --git a/VOICE/lose_2.ogg b/VOICE/lose_2.ogg new file mode 100644 index 00000000..c79f0a7d Binary files /dev/null and b/VOICE/lose_2.ogg differ diff --git a/VOICE/lose_3.ogg b/VOICE/lose_3.ogg new file mode 100644 index 00000000..aeae0d62 Binary files /dev/null and b/VOICE/lose_3.ogg differ diff --git a/VOICE/mini_1.ogg b/VOICE/mini_1.ogg new file mode 100644 index 00000000..75f2de42 Binary files /dev/null and b/VOICE/mini_1.ogg differ diff --git a/VOICE/nya_1.ogg b/VOICE/nya_1.ogg new file mode 100644 index 00000000..c51b00c5 Binary files /dev/null and b/VOICE/nya_1.ogg differ diff --git a/VOICE/nya_11.ogg b/VOICE/nya_11.ogg new file mode 100644 index 00000000..8b10ba45 Binary files /dev/null and b/VOICE/nya_11.ogg differ diff --git a/VOICE/nya_12.ogg b/VOICE/nya_12.ogg new file mode 100644 index 00000000..913ca118 Binary files /dev/null and b/VOICE/nya_12.ogg differ diff --git a/VOICE/nya_13.ogg b/VOICE/nya_13.ogg new file mode 100644 index 00000000..f9f53496 Binary files /dev/null and b/VOICE/nya_13.ogg differ diff --git a/VOICE/nya_2.ogg b/VOICE/nya_2.ogg new file mode 100644 index 00000000..e278ffff Binary files /dev/null and b/VOICE/nya_2.ogg differ diff --git a/VOICE/nya_21.ogg b/VOICE/nya_21.ogg new file mode 100644 index 00000000..e0d94c5f Binary files /dev/null and b/VOICE/nya_21.ogg differ diff --git a/VOICE/nya_22.ogg b/VOICE/nya_22.ogg new file mode 100644 index 00000000..cd7ee9bd Binary files /dev/null and b/VOICE/nya_22.ogg differ diff --git a/VOICE/nya_3.ogg b/VOICE/nya_3.ogg new file mode 100644 index 00000000..0ed6aad7 Binary files /dev/null and b/VOICE/nya_3.ogg differ diff --git a/VOICE/nya_31.ogg b/VOICE/nya_31.ogg new file mode 100644 index 00000000..08b5519c Binary files /dev/null and b/VOICE/nya_31.ogg differ diff --git a/VOICE/nya_4.ogg b/VOICE/nya_4.ogg new file mode 100644 index 00000000..9a7307c8 Binary files /dev/null and b/VOICE/nya_4.ogg differ diff --git a/VOICE/nya_o0.ogg b/VOICE/nya_o0.ogg new file mode 100644 index 00000000..5eefd148 Binary files /dev/null and b/VOICE/nya_o0.ogg differ diff --git a/VOICE/nya_o1.ogg b/VOICE/nya_o1.ogg new file mode 100644 index 00000000..e1774506 Binary files /dev/null and b/VOICE/nya_o1.ogg differ diff --git a/VOICE/nya_o2.ogg b/VOICE/nya_o2.ogg new file mode 100644 index 00000000..260fb6b4 Binary files /dev/null and b/VOICE/nya_o2.ogg differ diff --git a/VOICE/nya_o3.ogg b/VOICE/nya_o3.ogg new file mode 100644 index 00000000..cb7bbcd1 Binary files /dev/null and b/VOICE/nya_o3.ogg differ diff --git a/VOICE/nya_o4.ogg b/VOICE/nya_o4.ogg new file mode 100644 index 00000000..0f3789ff Binary files /dev/null and b/VOICE/nya_o4.ogg differ diff --git a/VOICE/nya_o5.ogg b/VOICE/nya_o5.ogg new file mode 100644 index 00000000..b9b4d998 Binary files /dev/null and b/VOICE/nya_o5.ogg differ diff --git a/VOICE/single_1.ogg b/VOICE/single_1.ogg new file mode 100644 index 00000000..daafe258 Binary files /dev/null and b/VOICE/single_1.ogg differ diff --git a/VOICE/single_2.ogg b/VOICE/single_2.ogg new file mode 100644 index 00000000..7b2ac62f Binary files /dev/null and b/VOICE/single_2.ogg differ diff --git a/VOICE/single_3.ogg b/VOICE/single_3.ogg new file mode 100644 index 00000000..808d2a92 Binary files /dev/null and b/VOICE/single_3.ogg differ diff --git a/VOICE/spin-_1.ogg b/VOICE/spin-_1.ogg new file mode 100644 index 00000000..ffc8f1a3 Binary files /dev/null and b/VOICE/spin-_1.ogg differ diff --git a/VOICE/spin-_2.ogg b/VOICE/spin-_2.ogg new file mode 100644 index 00000000..8b6ddfe6 Binary files /dev/null and b/VOICE/spin-_2.ogg differ diff --git a/VOICE/spin_1.ogg b/VOICE/spin_1.ogg new file mode 100644 index 00000000..8221ee23 Binary files /dev/null and b/VOICE/spin_1.ogg differ diff --git a/VOICE/spin_2.ogg b/VOICE/spin_2.ogg new file mode 100644 index 00000000..08243d0d Binary files /dev/null and b/VOICE/spin_2.ogg differ diff --git a/VOICE/spin_3.ogg b/VOICE/spin_3.ogg new file mode 100644 index 00000000..bc2d5dca Binary files /dev/null and b/VOICE/spin_3.ogg differ diff --git a/VOICE/spin_4.ogg b/VOICE/spin_4.ogg new file mode 100644 index 00000000..71903226 Binary files /dev/null and b/VOICE/spin_4.ogg differ diff --git a/VOICE/spin_5.ogg b/VOICE/spin_5.ogg new file mode 100644 index 00000000..42ab4d52 Binary files /dev/null and b/VOICE/spin_5.ogg differ diff --git a/VOICE/triple_1.ogg b/VOICE/triple_1.ogg new file mode 100644 index 00000000..6672e2ce Binary files /dev/null and b/VOICE/triple_1.ogg differ diff --git a/VOICE/triple_2.ogg b/VOICE/triple_2.ogg new file mode 100644 index 00000000..3ef623d5 Binary files /dev/null and b/VOICE/triple_2.ogg differ diff --git a/VOICE/tts_1.ogg b/VOICE/tts_1.ogg new file mode 100644 index 00000000..0b4944ed Binary files /dev/null and b/VOICE/tts_1.ogg differ diff --git a/VOICE/win_1.ogg b/VOICE/win_1.ogg new file mode 100644 index 00000000..ee31baa1 Binary files /dev/null and b/VOICE/win_1.ogg differ diff --git a/VOICE/win_2.ogg b/VOICE/win_2.ogg new file mode 100644 index 00000000..efa28813 Binary files /dev/null and b/VOICE/win_2.ogg differ diff --git a/VOICE/这游戏有问题.ogg b/VOICE/这游戏有问题.ogg new file mode 100644 index 00000000..c2fa0a08 Binary files /dev/null and b/VOICE/这游戏有问题.ogg differ diff --git a/call&sys.lua b/call&sys.lua index d8a32d9a..45eee883 100644 --- a/call&sys.lua +++ b/call&sys.lua @@ -115,7 +115,8 @@ function buttonControl_key(i) if not sceneSwaping and Buttons.sel then Buttons.sel.alpha=1 Buttons.sel.code() - sysSFX("button") + SFX("button") + VOICE("nya") end end end @@ -130,7 +131,8 @@ function buttonControl_gamepad(i) if not sceneSwaping and Buttons.sel then Buttons.sel.alpha=1 Buttons.sel.code() - sysSFX("button") + SFX("button") + VOICE("nya") end end end @@ -160,8 +162,8 @@ 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)then - preField[sy][sx]=ms.isDown(1)and pen or 0 + 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) @@ -336,6 +338,8 @@ function keyDown.draw(key) if sx and sy then preField[sy][sx]=pen end + elseif key=="tab"then + pen=-1 elseif key=="backspace"then pen=0 elseif key=="escape"then @@ -479,7 +483,6 @@ function gamepadUp.play(key) end end - function love.mousepressed(x,y,k,t,num) if t then return end mouseShow=true @@ -496,7 +499,8 @@ function love.mousepressed(x,y,k,t,num) B.alpha=1 Buttons.sel=nil love.mousemoved(x,y,0,0) - sysSFX("button") + SFX("button") + VOICE("nya") VIB(1) end end @@ -547,7 +551,8 @@ function love.touchreleased(id,x,y) B.code() B.alpha=1 Buttons.sel=nil - sysSFX("button") + SFX("button") + VOICE("nya") VIB(1) end Buttons.sel=nil @@ -581,7 +586,8 @@ function love.keypressed(i) if devMode then if i=="k"then P=players.alive[rnd(#players.alive)] - Event_gameover.lose() + P.lastRecv=players[1] + Event.lose() --Test code here elseif i=="q"then local B=Buttons.sel if B then print(format("x=%d,y=%d,w=%d,h=%d",B.x,B.y,B.w,B.h))end @@ -639,6 +645,7 @@ function love.resize(w,h) scr.k=h/720 scr.x,scr.y=(w-h*16/9)*.5,0 end + gc.origin() xOy=xOy:setTransformation(w*.5,h*.5,nil,scr.k,nil,640,360) gc.replaceTransform(xOy) collectgarbage() @@ -680,6 +687,12 @@ function love.update(dt) for i=#Task,1,-1 do Task[i]:update() end + if voicePlaying[1]then + if not voicePlaying[1]:isPlaying()then + rem(voicePlaying,1) + end + if voicePlaying[1] and not voicePlaying[1]:isPlaying()then voicePlaying[1]:play()end + end for k,B in next,Buttons[scene]do local t=B==Buttons.sel and .4 or 0 B.alpha=abs(B.alpha-t)>.02 and(B.alpha+(B.alpha0 then - if curMode.lv==1 then - goto L - elseif curMode.lv==2 then - return - end + if preField[preField.h][i]>0 or curMode.lv==2 and preField[preField.h][i]==-1 then + goto L end end preField.h=preField.h-1 - if preField.h>0 then goto R end + if preField.h>0 then goto R end ::L:: - for _,P in next,players.alive do - local t=P.showTime*3 - for y=1,preField.h do - P.field[y]=getNewRow(0) - P.visTime[y]=getNewRow(t) - for x=1,10 do P.field[y][x]=preField[y][x]end + if curMode.lv==1 then + for _,P in next,players.alive do + local t=P.showTime*3 + for y=1,preField.h do + P.field[y]=getNewRow(0) + P.visTime[y]=getNewRow(t) + for x=1,10 do P.field[y][x]=preField[y][x]end + end end end end, @@ -255,6 +269,14 @@ mesDisp={ mStr("Attack",-82,363) mStr("Efficiency",-82,475) end, + c4wtrain=function() + setFont(50) + mStr(P.combo,-82,310) + mStr(P.modeData.point,-82,400) + setFont(20) + mStr("combo",-82,358) + mStr("max combo",-82,450) + end, pctrain=function() setFont(22) mStr("Perfect Clear",-82,412) @@ -312,140 +334,20 @@ mesDisp={ gc.setColor(1,1,1,.6) gc.setLineWidth(3) for y=1,preField.h do for x=1,10 do - if preField[y][x]>0 then - gc.setColor(blockColor[preField[y][x]]) + local B=preField[y][x] + if B>0 then + gc.setColor(blockColor[B]) gc.rectangle("line",30*x-25,605-30*y,20,20) + elseif B==-1 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) end end end end end } Event={ - marathon_reach=function() - local s=int(P.stat.row*.1) - if s>=20 then - P.stat.row=200 - Event_gameover.win() - else - P.gameEnv.drop=marathon_drop[s] - if s==18 then P.gameEnv._20G=true end - P.gameEnv.target=s*10+10 - SFX("reach") - end - end, - master_reach_lunatic=function() - local t=P.modeData.point - 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.modeData.event then - P.modeData.event=P.modeData.event+1 - if P.modeData.event==5 then - P.modeData.event=4 - P.modeData.point=500 - Event_gameover.win() - goto L - else - local s=P.modeData.event+1 - curBG=s==2 and"game1"or s==3 and"game2"or s==4 and"game3"or s==5 and"game4" - P.gameEnv.lock=rush_lock[s] - P.gameEnv.wait=rush_wait[s] - 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 end - showText(P,text.stage[s],"fly",80,-120) - SFX("reach") - end - end - P.modeData.point=t - if t%100==99 then SFX("blip_1")end - ::L:: - end, - master_reach_ultimate=function() - local t=P.modeData.point - 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.modeData.event then - P.modeData.event=P.modeData.event+1 - if P.modeData.event==5 then - curBG="game5" - P.modeData.event=4 - P.modeData.point=500 - Event_gameover.win() - goto L - else - local s=P.modeData.event+1 - curBG=s==2 and"game3"or s==3 and"game4"or s==4 and"game5"or s==5 and"game6" - P.gameEnv.lock=death_lock[s] - 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 end - showText(P,text.stage[s],"fly",80,-120) - SFX("reach") - end - end - P.modeData.point=t - if t%100==99 then SFX("blip_1")end - ::L:: - end, - classic_reach=function() - P.gameEnv.target=P.gameEnv.target+10 - if P.gameEnv.target==100 then - P.gameEnv.drop,P.gameEnv.lock=0,0 - end - SFX("reach") - end, - tsd_reach=function() - if P.lastClear~=52 then - Event_gameover.lose() - elseif #P.clearing>0 then - P.modeData.event=P.modeData.event+1 - end - end, - tech_reach_easy=function() - if P.b2b<40 then - Event_gameover.lose() - end - end, - tech_reach_hard=function() - if #P.clearing>0 and P.lastClear<10 then - Event_gameover.lose() - end - end, - tech_reach_ultimate=function() - if #P.clearing>0 and P.lastClear<10 or P.lastClear==74 then - Event_gameover.lose() - end - end, - newPC=function() - local P=players[1] - if P.stat.piece%4==0 then - if #P.field==#P.clearing then - P.counter=P.stat.piece==0 and 20 or 0 - newTask(Event_task.PC,P) - if curMode.lv==2 then - local s=P.stat.pc*.5 - if int(s)==s and s>0 then - P.gameEnv.drop=pc_drop[s]or 10 - P.gameEnv.lock=pc_lock[s]or 20 - P.gameEnv.fall=pc_fall[s]or 5 - if s==10 then - showText(P,text.maxspeed,"appear",80,-140) - else - showText(P,text.speedup,"appear",30,-140) - end - end - end - else - Event_gameover.lose() - end - end - end, -} -Event_gameover={ win=function() P.alive=false P.control=false @@ -457,7 +359,7 @@ Event_gameover={ P.rank=1 P.result="WIN" changeAtk(P) - BGM("end") + BGM("8-bit happiness") end for i=1,#P.atkBuffer do P.atkBuffer[i].sent=true @@ -471,9 +373,10 @@ Event_gameover={ if P.id==1 then gamefinished=true newTask(Event_task.finish,P) + SFX("win") + VOICE("win") end showText(P,text.win,"beat",90,nil,.4,curMode.id~="custom") - SFX("win") end, lose=function() P.alive=false @@ -541,15 +444,14 @@ Event_gameover={ showText(P,text.lose,"appear",90,nil,nil,true) if P.id==1 then gamefinished=true + if modeEnv.royaleMode then BGM("end")end SFX("fail") - if modeEnv.royaleMode then - BGM("end") - end + VOICE("lose") end if #players.alive==1 then local t=P P=players.alive[1] - Event_gameover.win() + Event.win() P=t end if #players>1 then @@ -558,16 +460,167 @@ Event_gameover={ newTask(Event_task.finish,P) end end, + marathon_reach=function() + local s=int(P.stat.row*.1) + if s>=20 then + P.stat.row=200 + Event.win() + else + P.gameEnv.drop=marathon_drop[s] + if s==18 then P.gameEnv._20G=true end + P.gameEnv.target=s*10+10 + SFX("reach") + end + end, + master_reach_lunatic=function() + local t=P.modeData.point + 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.modeData.event then + P.modeData.event=P.modeData.event+1 + if P.modeData.event==5 then + P.modeData.event=4 + P.modeData.point=500 + Event.win() + goto L + else + local s=P.modeData.event+1 + curBG=s==2 and"game1"or s==3 and"game2"or s==4 and"game3"or s==5 and"game4" + P.gameEnv.lock=rush_lock[s] + P.gameEnv.wait=rush_wait[s] + 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 + showText(P,text.stage[s],"fly",80,-120) + SFX("reach") + end + end + P.modeData.point=t + if t%100==99 then SFX("blip_1")end + ::L:: + end, + master_reach_ultimate=function() + local t=P.modeData.point + 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 + curBG="game5" + P.modeData.event=4 + P.modeData.point=500 + Event.win() + goto L + else + local s=P.modeData.event+1 + curBG=s==2 and"game3"or s==3 and"game4"or s==4 and"game5"or s==5 and"game6" + P.gameEnv.lock=death_lock[s] + 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 + showText(P,text.stage[s],"fly",80,-120) + SFX("reach") + end + end + P.modeData.point=t + if t%100==99 then SFX("blip_1")end + ::L:: + end, + classic_reach=function() + P.gameEnv.target=P.gameEnv.target+10 + if P.gameEnv.target==100 then + P.gameEnv.drop,P.gameEnv.lock=0,0 + end + SFX("reach") + end, + infinite_check=function() + for i=1,#P.clearing do + if P.clearing[i]<6 then + garbageRise(10,1,rnd(10)) + end + end + end, + tsd_reach=function() + if P.lastClear~=52 then + Event.lose() + elseif #P.clearing>0 then + P.modeData.event=P.modeData.event+1 + end + end, + tech_reach_easy=function() + if P.b2b<40 then + Event.lose() + end + end, + tech_reach_hard=function() + if #P.clearing>0 and P.lastClear<10 then + Event.lose() + end + end, + tech_reach_ultimate=function() + if #P.clearing>0 and P.lastClear<10 or P.lastClear==74 then + Event.lose() + end + end, + c4w_reach=function() + for i=1,#P.clearing do + ins(P.field,getNewRow(10)) + ins(P.visTime,getNewRow(20)) + for i=4,7 do P.field[#P.field][i]=0 end + end + if #P.clearing==0 then + if curMode.lv==2 then + Event.lose() + end + elseif P.combo>P.modeData.point then + P.modeData.point=P.combo + end + end, + newPC=function() + local P=players[1] + if P.stat.piece%4==0 then + if #P.field==#P.clearing then + P.counter=P.stat.piece==0 and 20 or 0 + newTask(Event_task.PC,P) + if curMode.lv==2 then + local s=P.stat.pc*.5 + if int(s)==s and s>0 then + P.gameEnv.drop=pc_drop[s]or 10 + P.gameEnv.lock=pc_lock[s]or 20 + P.gameEnv.fall=pc_fall[s]or 5 + if s==10 then + showText(P,text.maxspeed,"appear",80,-140) + else + showText(P,text.speedup,"appear",30,-140) + end + end + end + else + Event.lose() + end + end + end, } Event_task={ - finish=function(P) + finish=function(self,P) P.endCounter=P.endCounter+1 if P.endCounter>120 then pauseGame() return true end end, - lose=function(P) + lose=function(self,P) P.endCounter=P.endCounter+1 if P.endCounter>80 then for i=1,#P.field do @@ -589,35 +642,35 @@ Event_task={ end end end, - throwBadge=function(P,data) + throwBadge=function(self,P,data) data[2]=data[2]-1 if data[2]%4==0 then throwBadge(data[1],data[1].lastRecv) - if data[2]%8==0 then - sysSFX("collect") + if not data[1].ai and data[2]%8==0 then + SFX("collect") end end if data[2]<=0 then return true end end, - dig_normal=function(P) + dig_normal=function(self,P) if not P.control then return end P.counter=P.counter+1 if P.counter>=max(90,180-P.modeData.event)then - garbageRise(10,1,rnd(10)) P.counter=0 + garbageRise(10,1,rnd(10)) P.modeData.event=P.modeData.event+1 end end, - dig_lunatic=function(P) + dig_lunatic=function(self,P) if not P.control then return end P.counter=P.counter+1 if P.counter>=max(45,80-.3*P.modeData.event)then - garbageRise(11+P.modeData.event%3,1,rnd(10)) P.counter=0 + garbageRise(11+P.modeData.event%3,1,rnd(10)) P.modeData.event=P.modeData.event+1 end end, - survivor_easy=function(P) + 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 @@ -627,7 +680,7 @@ Event_task={ P.modeData.event=P.modeData.event+1 end end, - survivor_normal=function(P) + 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 @@ -645,7 +698,7 @@ Event_task={ P.modeData.event=P.modeData.event+1 end end, - survivor_hard=function(P) + 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 @@ -661,7 +714,7 @@ Event_task={ P.modeData.event=P.modeData.event+1 end end, - survivor_lunatic=function(P) + 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 @@ -674,7 +727,7 @@ Event_task={ P.modeData.event=P.modeData.event+1 end end, - survivor_ultimate=function(P) + 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 @@ -690,7 +743,7 @@ Event_task={ P.modeData.event=P.modeData.event+1 end end, - PC=function(P) + PC=function(self,P) P.counter=P.counter+1 if P.counter==21 then local t=P.stat.pc%2 @@ -711,48 +764,59 @@ Event_task={ end end, - bgmFadeOut=function(_,id) + bgmFadeOut=function(self,_,id) bgm[id]:setVolume(max(bgm[id]:getVolume()-.03,0)) if bgm[id]:getVolume()==0 then bgm[id]:stop() return true end end, - bgmFadeIn=function(_,id) + bgmFadeIn=function(self,_,id) bgm[id]:setVolume(min(bgm[id]:getVolume()+.03,1)) if bgm[id]:getVolume()==1 then return true end end, + bgmWarp=function(self) + if bgmPlaying then + self.data=self.data-1 + if self.data==0 then + self.data=rnd(120,180) + bgm[bgmPlaying]:seek(max(bgm[bgmPlaying]:tell()-1,0)) + end + else + return true + end + end } defaultModeEnv={ sprint={ { drop=60,target=10, - reach=Event_gameover.win, + reach=Event.win, bg="strap",bgm="race", }, { drop=60,target=20, - reach=Event_gameover.win, + reach=Event.win, bg="strap",bgm="race", }, { drop=60,target=40, - reach=Event_gameover.win, + reach=Event.win, bg="strap",bgm="race", }, { drop=60,target=100, - reach=Event_gameover.win, + reach=Event.win, bg="strap",bgm="race", }, { drop=60,target=400, - reach=Event_gameover.win, + reach=Event.win, bg="strap",bgm="push", }, { drop=60,target=1000, - reach=Event_gameover.win, + reach=Event.win, bg="strap",bgm="push", }, }, @@ -809,7 +873,7 @@ defaultModeEnv={ { drop=1e99,lock=1e99, oncehold=false, - target=200,reach=Event_gameover.win, + target=200,reach=Event.win, bg="strap",bgm="infinite", }, }, @@ -819,6 +883,12 @@ defaultModeEnv={ oncehold=false, bg="glow",bgm="infinite", }, + { + drop=1e99,lock=1e99, + oncehold=false, + target=1,reach=Event.infinite_check, + bg="glow",bgm="infinite", + }, }, solo={ { @@ -860,7 +930,6 @@ defaultModeEnv={ { fall=10,lock=60, center=false, - ghost=false, visible="none", freshLimit=15, bg="rgb",bgm="secret7th", @@ -868,6 +937,7 @@ defaultModeEnv={ { fall=5,lock=60, center=false, + ghost=false, visible="none", freshLimit=15, bg="rgb",bgm="secret8th", @@ -970,6 +1040,19 @@ defaultModeEnv={ bg="matrix",bgm="secret7th", }, }, + c4wtrain={ + { + freshLimit=15, + target=0,reach=Event.c4w_reach, + bg="rgb",bgm="newera", + }, + { + drop=5,lock=30, + freshLimit=15, + target=0,reach=Event.c4w_reach, + bg="rgb",bgm="newera", + }, + }, pctrain={ { next=4, @@ -997,20 +1080,20 @@ defaultModeEnv={ { oncehold=false, drop=300,lock=1e99, - target=100,reach=Event_gameover.win, + target=100,reach=Event.win, ospin=false, bg="rgb",bgm="newera", }, { drop=60,lock=120,fall=10, - target=100,reach=Event_gameover.win, + target=100,reach=Event.win, freshLimit=15, ospin=false, bg="rgb",bgm="infinite", }, { drop=20,lock=60,fall=20, - target=100,reach=Event_gameover.win, + target=100,reach=Event.win, freshLimit=15, ospin=false, bg="rgb",bgm="infinite", @@ -1045,7 +1128,7 @@ defaultModeEnv={ drop=20,lock=60, sequence="drought1", target=100, - reach=Event_gameover.win, + reach=Event.win, ospin=false, freshLimit=15, bg="glow",bgm="reason", @@ -1054,7 +1137,7 @@ defaultModeEnv={ drop=20,lock=60, sequence="drought2", target=100, - reach=Event_gameover.win, + reach=Event.win, ospin=false, freshLimit=15, bg="glow",bgm="reason", @@ -1068,12 +1151,12 @@ defaultModeEnv={ }, custom={ { - reach=Event_gameover.win, + reach=Event.win, bg="none",bgm="reason", }, { Fkey=true, - reach=Event_gameover.win, + reach=Event.win, bg="none",bgm="reason", }, }, diff --git a/font.ttf b/font.ttf index ae483b85..bfaa1d12 100644 Binary files a/font.ttf and b/font.ttf differ diff --git a/gamefunc.lua b/gamefunc.lua index 6f3ffb77..31274f15 100644 --- a/gamefunc.lua +++ b/gamefunc.lua @@ -1,3 +1,4 @@ +local gc=love.graphics local blockPos={4,4,4,4,4,5,4} local renATK={[0]=0,0,0,1,1,2,2,3,3,4,4}--3 else local b2bPoint={50,100,180} @@ -6,6 +7,8 @@ local testScore={[-1]=1,[-2]=0,[-3]=1,2,2,2} local visible_opt={show=1e99,time=300,fast=20,none=5} local reAtk={0,0,1,1,1,2,2,3,3} local reDef={0,1,1,2,3,3,4,4,5} +local blockName={"Z","S","L","J","T","O","I"} +local clearName={"single","double","triple"} local spin_n={[0]="spin_0","spin_1","spin_2","spin_3"} local clear_n={"clear_1","clear_2","clear_3","clear_4"} local ren_n={}for i=1,11 do ren_n[i]="ren_"..i end @@ -230,11 +233,11 @@ function resetGameData() while freeRow[p]do rem(freeRow) end - sysSFX("ready") + SFX("ready") collectgarbage() end function gameStart() - sysSFX("start") + SFX("start") for P=1,#players do P=players[P] _G.P=P @@ -251,13 +254,15 @@ 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.small=P.size<.3 + P.small=P.size<.1 if P.small then - P.centerX,P.centerY=P.x+150*P.size,P.y+300*P.size - P.size=P.size*5 + P.centerX,P.centerY=P.x+300*P.size,P.y+600*P.size + P.canvas=gc.newCanvas(60,120) + P.frameWait=rnd(30,120) else P.centerX,P.centerY=P.x+300*P.size,P.y+670*P.size - P.absFieldPos={P.x+150*P.size,P.y+60*P.size} + P.absFieldX=P.x+150*P.size + P.absFieldY=P.y+60*P.size end if AIspeed then @@ -267,6 +272,7 @@ function createPlayer(id,x,y,size,AIspeed,data) controlDelay0=AIspeed, } else + P.human=true human=human+1 end @@ -383,7 +389,9 @@ function garbageSend(S,R,send,time) lv=min(int(send^.69),5), }) R.stat.recv=R.stat.recv+send - if R.id==1 then sysSFX(send<4 and "blip_1"or"blip_2",min(send+1,5)*.1)end + if R.human then + SFX(send<4 and "blip_1"or"blip_2",min(send+1,5)*.1) + end end end function garbageRelease() @@ -406,11 +414,12 @@ function garbageRise(color,amount,pos) P.field[1][pos]=0 end P.fieldBeneath=P.fieldBeneath+amount*30 - P.curY,P.y_img=P.curY+amount,P.y_img+amount + P.curY=P.curY+amount + freshgho() for i=1,#P.clearing do P.clearing[i]=P.clearing[i]+amount end - if #P.field>40 then Event_gameover.lose()end + if #P.field>40 then Event.lose()end end function createBeam(S,R,lv)--Player id local x1,y1,x2,y2 @@ -420,7 +429,7 @@ function createBeam(S,R,lv)--Player id x1,y1=S.x+(30*(P.curX+P.sc[2]-1)-30+15+150)*S.size,S.y+(600-30*(P.curY+P.sc[1]-1)+15+70)*S.size end if R.small then - x2,y2=R.x+150*R.size*.2,R.y+300*R.size*.2 + x2,y2=R.centerX,R.centerY else x2,y2=R.x+308*R.size,R.y+450*R.size end @@ -429,12 +438,12 @@ end function throwBadge(S,R)--Player id local x1,y1,x2,y2 if S.small then - x1,y1=S.x+30*S.size,S.y+60*S.size + x1,y1=S.centerX,S.centerY else x1,y1=S.x+308*S.size,S.y+450*S.size end if R.small then - x2,y2=R.x+30*R.size,R.y+60*R.size + x1,y1=R.centerX,R.centerY else x2,y2=R.x+73*R.size,R.y+345*R.size end @@ -642,7 +651,7 @@ function resetblock() P.curX=P.curX+(P.moving>0 and 1 or -1) end--Initial SYSs - if ifoverlap(P.cur.bk,P.curX,P.curY)then lock()Event_gameover.lose()end + if ifoverlap(P.cur.bk,P.curX,P.curY)then lock()Event.lose()end freshgho() if P.keyPressing[6]then act.hardDrop()P.keyPressing[6]=false end end @@ -650,7 +659,9 @@ function spin(d,ifpre) local idir=(P.dir+d)%4 if P.cur.id==6 then freshLockDelay() - SFX(ifpre and"prerotate"or"rotate") + if P.human then + SFX(ifpre and"prerotate"or"rotate") + end if P.gameEnv.ospin and P.freshTime>10 then if d==1 then if P.curY==P.y_img and solid(P.curX+2,P.curY+1)and solid(P.curX+2,P.curY)and solid(P.curX-1,P.curY+1)and not solid(P.curX-1,P.curY)then @@ -715,7 +726,9 @@ function spin(d,ifpre) P.spinLast=t==2 and testScore[-d]or 2 freshgho() freshLockDelay() - SFX(ifpre and"prerotate"or ifoverlap(P.cur.bk,P.curX,P.curY+1)and ifoverlap(P.cur.bk,P.curX-1,P.curY)and ifoverlap(P.cur.bk,P.curX+1,P.curY)and"rotatekick"or"rotate") + if P.human then + SFX(ifpre and"prerotate"or ifoverlap(P.cur.bk,P.curX,P.curY+1)and ifoverlap(P.cur.bk,P.curX-1,P.curY)and ifoverlap(P.cur.bk,P.curX+1,P.curY)and"rotatekick"or"rotate") + end P.stat.rotate=P.stat.rotate+1 ::quit:: end @@ -738,9 +751,11 @@ function hold(ifpre) freshgho() P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,max(P.freshTime-5,0) - if ifoverlap(P.cur.bk,P.curX,P.curY)then lock()Event_gameover.lose()end + if ifoverlap(P.cur.bk,P.curX,P.curY)then lock()Event.lose()end - SFX(ifpre and"prehold"or"hold") + if P.human then + SFX(ifpre and"prehold"or"hold") + end P.stat.hold=P.stat.hold+1 end end @@ -791,11 +806,17 @@ function drop() sendTime=100 exblock=exblock+1 P.stat.b3b=P.stat.b3b+1 + if P.human then + VOICE("b3b") + end elseif P.b2b>=40 then showText(P,text.techrashB2B,"drive",80,-30) sendTime=80 send=5 P.stat.b2b=P.stat.b2b+1 + if P.human then + VOICE("b2b") + end else showText(P,text.techrash,"stretch",80,-30) sendTime=60 @@ -804,6 +825,9 @@ function drop() P.b2b=P.b2b+120 P.lastClear=74 P.stat.clear_4=P.stat.clear_4+1 + if P.human then + VOICE("tts") + end elseif cc>0 then local clearKey=clear_n if dospin then @@ -812,10 +836,16 @@ function drop() send=b2bATK[cc]+1 exblock=exblock+1 P.stat.b3b=P.stat.b3b+1 + if P.human then + VOICE("b3b") + end elseif P.b2b>=40 then showText(P,text.b2b..text.spin[P.cur.name]..text.clear[cc],"spin",40,-30) send=b2bATK[cc] P.stat.b2b=P.stat.b2b+1 + if P.human then + VOICE("b2b") + end else showText(P,text.spin[P.cur.name]..text.clear[cc],"spin",50,-30) send=2*cc @@ -826,12 +856,19 @@ function drop() send=ceil(send*.5) sendTime=sendTime+60 P.b2b=P.b2b+b2bPoint[cc]*.8 + if P.human then + VOICE("mini") + end else P.b2b=P.b2b+b2bPoint[cc] end P.lastClear=P.cur.id*10+cc clearKey=spin_n - SFX(spin_n[cc]) + if P.human then + SFX(spin_n[cc]) + VOICE(blockName[P.cur.name]) + VOICE("spin_") + end elseif #P.clearing<#P.field then P.b2b=max(P.b2b-250,0) showText(P,text.clear[cc],"appear",32+cc*3,-30,(8-cc)*.3) @@ -840,13 +877,20 @@ function drop() P.lastClear=cc end P.stat[clearKey[cc]]=P.stat[clearKey[cc]]+1 + if P.human then + VOICE(clearName[cc]) + end else P.combo=0 if dospin then showText(P,text.spin[P.cur.name],"appear",50,-30) - SFX("spin_0") P.b2b=P.b2b+20 P.stat.spin_0=P.stat.spin_0+1 + if P.human then + SFX("spin_0") + VOICE(blockName[P.cur.name]) + VOICE("spin") + end end end send=send+(renATK[P.combo]or 4) @@ -858,16 +902,20 @@ function drop() if P.stat.row>4 then P.b2b=1200 end P.stat.pc=P.stat.pc+1 P.lastClear=P.cur.id*10+5 - SFX("perfectclear") + if P.human then + SFX("perfectclear") + VOICE("pc") + end end if P.combo>2 then - showText(P,text.cmb[min(P.combo,20)],P.combo<10 and"appear"or"flicker",20+P.combo*3,60) + showText(P,text.cmb[min(P.combo,20)],P.combo<10 and"appear"or"flicker",20+min(P.combo,25)*3,60) end sendTime=sendTime+20*P.combo - if cc>0 then + if P.human and cc>0 then SFX(clear_n[cc]) SFX(ren_n[min(P.combo,11)]) - if P.id==1 then VIB(cc)end + if P.combo>14 then SFX("ren_mega",(P.combo-10)*.1)end + VIB(cc) end if P.b2b>1200 then P.b2b=1200 end @@ -925,7 +973,7 @@ function drop() garbageSend(P,randomTarget(P),send,sendTime) end P.stat.send=P.stat.send+send - if P.id==1 and send>3 then sysSFX("emit",min(send,8)*.125)end + if P.human and send>3 then SFX("emit",min(send,8)*.125)end end elseif cc==0 then if P.b2b>1000 then @@ -938,7 +986,9 @@ function drop() P.gameEnv.reach() end P.spinLast=dospin and cc>0 - SFX("lock") + if P.human then + SFX("lock") + end else P.curY=P.curY-1 P.spinLast=false @@ -1011,7 +1061,7 @@ act={ P.curX=P.curX-1 freshgho() freshLockDelay() - if P.curY==P.y_img then SFX("move")end + if P.human and P.curY==P.y_img then SFX("move")end P.spinLast=false end end @@ -1027,7 +1077,7 @@ act={ P.curX=P.curX+1 freshgho() freshLockDelay() - if P.curY==P.y_img then SFX("move")end + if P.human and P.curY==P.y_img then SFX("move")end P.spinLast=false end end @@ -1044,8 +1094,10 @@ act={ createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1) P.curY=P.y_img P.spinLast=false - SFX("drop") - if P.id==1 then VIB(0)end + if P.human then + SFX("drop") + VIB(0) + end end P.lockDelay=-1 drop() @@ -1080,21 +1132,17 @@ act={ end end if curMode.id=="custom"and curMode.lv==2 then - if #P.field>=preField.h then - for y=1,preField.h do - for x=1,10 do - local a,b=preField[y][x],P.field[y][x] - if a==0 and b>0 or a<8 and a~=b or a>7 and b==0 then - P.modeData.event=1-P.modeData.event - return - end - end + for y=1,20 do + local L=P.field[y] + for x=1,10 do + local a,b=preField[y][x],L and L[x]or 0 + if a~=-1 and(a==0 and b>0 or a<8 and a~=b or a>7 and b==0)then goto change end end - P.modeData.event=1 - Event_gameover.win() - else - P.modeData.event=1-P.modeData.event end + P.modeData.event=0 + Event.win() + ::change:: + P.modeData.event=1-P.modeData.event end end end, @@ -1146,6 +1194,6 @@ act={ end end end, - quit=function()Event_gameover.lose()end, + quit=function()Event.lose()end, --System movements } \ No newline at end of file diff --git a/image/block.png b/image/block.png index 9ddeb8d6..f15f5008 100644 Binary files a/image/block.png and b/image/block.png differ diff --git a/language/chi.lua b/language/chi.lua index bfb5725d..08ddf43c 100644 --- a/language/chi.lua +++ b/language/chi.lua @@ -62,7 +62,7 @@ return{ modeName={ [0]="自定义", "竞速","马拉松","大师","经典","禅","无尽","单挑","仅TSD","隐形","挖掘","生存","科研", - "全清训练","全清挑战","49人混战","99人混战","干旱","多人", + "C4W练习","全清训练","全清挑战","49人混战","99人混战","干旱","多人", }, modeInfo={ sprint="挑战世界纪录", @@ -77,6 +77,7 @@ return{ dig="核能挖掘机", survivor="防守练习", tech="尽可能不要普通消除", + c4wtrain="无 限 连 击", pctrain="熟悉全清定式的组合", pcchallenge="100行内尽可能多PC", techmino49="49人混战", @@ -85,7 +86,7 @@ return{ hotseat="友尽模式", }, - load={"加载材质ing","加载音乐ing","加载音效ing","加载完成",}, + load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",}, tips={ "不是动画,真的在加载!", "整个游戏都是MrZ完成的!", @@ -107,6 +108,8 @@ return{ "不要在上课时玩游戏!", "本游戏难度上限很高,做好心理准备", "方块可以不是个休闲游戏", + "调到特殊的日期也不会发生什么的", + "[随机文本]", }, stat={ "游戏运行次数:", @@ -135,9 +138,9 @@ return{ "", "使用LOVE2D引擎", "作者:MrZ 邮箱:1046101471@qq.com", - "程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ", + "程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:Miya", "使用工具:VScode,GFIE,Beepbox,Goldwave", - "特别感谢:Farter,Teatube,196,Flyz,T830,[所有测试人员]和 你!", + "特别感谢:Farter,196,Teatube,Flyz,T830,[所有测试人员]和 你!", "错误或者建议请附带相关信息发送到作者邮箱~", }, support="支持作者", @@ -170,6 +173,7 @@ return{ back="返回", }, draw={ + free="不定", block1="■", block2="■", block3="■", @@ -209,7 +213,8 @@ return{ lang=function()return langName[setting.lang]end, sfx=function()return setting.sfx and"音效:开"or"音效:关"end, bgm=function()return setting.bgm and"音乐:开"or"音乐:关"end, - vib=function()return "震动强度:"..setting.vib end, + vib=function()return "震动:"..setting.vib end, + voc=function()return setting.voc and"语音:开"or"语音:关"end, fullscreen=function()return setting.fullscreen and"全屏:开"or"全屏:关"end, bgblock=function()return setting.bgblock and"背景动画:开"or"背景动画:关"end, frame=function()return"绘制帧:"..setting.frameMul.."%"end, diff --git a/language/chi_full.lua b/language/chi_full.lua index 7d4162ea..2b75ce93 100644 --- a/language/chi_full.lua +++ b/language/chi_full.lua @@ -62,7 +62,7 @@ return{ modeName={ [0]="自定义", "竞速","马拉松","大师","经典","禅","无尽","单挑","仅TSD","隐形","挖掘","生存","科研", - "全清训练","全清挑战","49人混战","99人混战","干旱","多人", + "C4W练习","全清训练","全清挑战","49人混战","99人混战","干旱","多人", }, modeInfo={ sprint="挑战世界纪录", @@ -77,6 +77,7 @@ return{ dig="核能挖掘机", survivor="防守练习", tech="尽可能不要普通消除!", + c4wtrain="无 限 连 击", pctrain="熟悉全清定式的组合", pcchallenge="100行内尽可能多全清", techmino49="49人混战", @@ -85,7 +86,7 @@ return{ hotseat="友尽模式", }, - load={"加载材质ing","加载音乐ing","加载音效ing","加载完成",}, + load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",}, tips={ "不是动画,真的在加载!", "整个游戏都是MrZ完成的!", @@ -107,6 +108,8 @@ return{ "不要在上课时玩游戏!", "本游戏难度上限很高,做好心理准备", "方块可以不是个休闲游戏", + "调到特殊的日期也不会发生什么的", + "[随机文本]", }, stat={ "游戏运行次数:", @@ -135,7 +138,7 @@ return{ "", "使用LOVE2D引擎", "作者:MrZ 邮箱:1046101471@qq.com", - "程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ", + "程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:Miya", "使用工具:VScode,GFIE,Beepbox,Goldwave", "特别感谢:Farter,Teatube,196,Flyz,T830,[所有测试人员]和 你!", "错误或者建议请附带相关信息发送到作者邮箱~", @@ -170,6 +173,7 @@ return{ back="返回", }, draw={ + free="不定", block1="■", block2="■", block3="■", @@ -209,7 +213,8 @@ return{ lang=function()return langName[setting.lang]end, sfx=function()return setting.sfx and"音效:开"or"音效:关"end, bgm=function()return setting.bgm and"音乐:开"or"音乐:关"end, - vib=function()return "震动强度:"..setting.vib end, + vib=function()return "震动:"..setting.vib end, + voc=function()return setting.voc and"语音:开"or"语音:关"end, fullscreen=function()return setting.fullscreen and"全屏:开"or"全屏:关"end, bgblock=function()return setting.bgblock and"背景动画:开"or"背景动画:关"end, frame=function()return"绘制帧:"..setting.frameMul.."%"end, @@ -237,4 +242,4 @@ return{ path="打开存储目录", }, }, -}--文 \ No newline at end of file +} \ No newline at end of file diff --git a/language/eng.lua b/language/eng.lua index e5504c48..3f22986c 100644 --- a/language/eng.lua +++ b/language/eng.lua @@ -62,7 +62,7 @@ return{ modeName={ [0]="Custom", "Sprint","Marathon","Master","Classic","Zen","Infinite","1v1","TSD-only","Blind","Dig","Survivor","Tech", - "PC Train","PC Challenge","Techmino49","Techmino99","Drought","Hotseat", + "C4W Train","PC Train","PC Challenge","Techmino49","Techmino99","Drought","Hotseat", }, modeInfo={ sprint="Speed run", @@ -77,6 +77,7 @@ return{ dig="Downstack!", survivor="Hand them!", tech="Don't do normal clear", + c4wtrain="Infinite combo", pctrain="Let's learn some PCs", pcchallenge="Make PCs in 100 Lines", techmino49="Melee fight with 48 AIs", @@ -85,7 +86,7 @@ return{ hotseat="", }, - load={"Loading textures","Loading BGM","Loading SFX","Finished",}, + load={"Loading VOICE","Loading BGM","Loading SFX","Finished",}, tips={ "Not animation,real loading!", "The WHOLE game is made by MrZ!", @@ -107,6 +108,8 @@ return{ "Do not play game in class!", "This game can be very hard,be mentally perpared", "This in not a casual game", + "Nothing will happen when some special day come", + "[random text]", }, stat={ "Games run:", @@ -135,7 +138,7 @@ return{ "", "Powered by LOVE2D", "Author:MrZ E-mail:1046101471@qq.com", - "Programe:MrZ Art:MrZ Music:MrZ SFX:MrZ", + "Programe:MrZ Art:MrZ Music:MrZ SFX:MrZ VOICE:Miya", "Tool used:VScode,GFIE,Beepbox,Goldwave", "Special thanks:Farter,Teatube,196,Flyz,T830,[all test staff] and YOU!", "Any bugs/suggestions to my E-mail.", @@ -170,6 +173,7 @@ return{ back="Back", }, draw={ + free="FREE", block1="■", block2="■", block3="■", @@ -183,7 +187,7 @@ return{ gb4="■", gb5="■", erase="×", - clear="Clear", + clear="CLEAR", back="Back", }, play={ @@ -209,7 +213,8 @@ return{ lang=function()return langName[setting.lang]end, sfx=function()return setting.sfx and"SFX:ON"or"SFX:OFF"end, bgm=function()return setting.bgm and"BGM:ON"or"BGM:OFF"end, - vib=function()return "Vibrate level:"..setting.vib end, + voc=function()return setting.voc and"VOC:ON"or"VOC:OFF"end, + vib=function()return "VIB:"..setting.vib end, fullscreen=function()return setting.fullscreen and"Fullscreen:ON"or"Fullscreen:OFF"end, bgblock=function()return setting.bgblock and"BG animation:ON"or"BG animation:OFF"end, frame=function()return"FrameDraw:"..setting.frameMul.."%"end, diff --git a/list.lua b/list.lua index 7e691bb6..0dffa45b 100644 --- a/list.lua +++ b/list.lua @@ -1,4 +1,5 @@ local gc=love.graphics +local tc,kb=love.touch,love.keyboard local sys=love.system local fs=love.filesystem actName={"moveLeft","moveRight","rotRight","rotLeft","rotFlip","hardDrop","softDrop","hold","func","restart","insLeft","insRight","insDown"} @@ -57,7 +58,7 @@ sfx={ "prerotate","prehold", "lock","drop","fall", "reach", - "ren_1","ren_2","ren_3","ren_4","ren_5","ren_6","ren_7","ren_8","ren_9","ren_10","ren_11", + "ren_1","ren_2","ren_3","ren_4","ren_5","ren_6","ren_7","ren_8","ren_9","ren_10","ren_11","ren_mega", "clear_1","clear_2","clear_3","clear_4", "spin_0","spin_1","spin_2","spin_3", "emit","blip_1","blip_2", @@ -76,8 +77,38 @@ bgm={ "secret7th", "secret8th", "rockblock", + "8-bit happiness", "end", } +voiceList={ + "Z","S","L","J","T","O","I", + "single","double","triple","tts", + "spin","spin_","mini","b2b","b3b","pc", + "win","lose","voc_nya","nya", +} +voice={ + Z={"Z_1","Z_2"}, + S={"S_1","S_2"}, + J={"J_1","J_2"}, + L={"L_1","L_2"}, + T={"T_1","T_2"}, + O={"O_1","O_2"}, + I={"I_1","I_2"}, + single={"single_1","single_2","single_3"}, + double={"double_1","double_2","double_3"}, + triple={"triple_1","triple_2"}, + tts={"tts_1"}, + spin={"spin_1","spin_2","spin_3","spin_4","spin_5"}, + spin_={"spin-_1","spin-_2"}, + mini={"mini_1"}, + b2b={"b2b_1","b2b_2"}, + b3b={"b3b_1"}, + pc={"PC_1"}, + win={"win_1","win_2"}, + lose={"lose_1","lose_2","lose_3"}, + voc_nya={"nya_11","nya_12","nya_13","nya_21","nya_22"}, + nya={"nya_1","nya_2","nya_3","nya_4"}, +} customID={ "drop", @@ -114,7 +145,7 @@ percent0to5={[0]="0%","20%","40%","60%","80%","100%",} modeID={ [0]="custom", "sprint","marathon","master","classic","zen","infinite","solo","tsd","blind","dig","survivor","tech", - "pctrain","pcchallenge","techmino49","techmino99","drought","hotseat", + "c4wtrain","pctrain","pcchallenge","techmino49","techmino99","drought","hotseat", } modeLevel={ sprint={"10L","20L","40L","100L","400L","1000L"}, @@ -122,13 +153,14 @@ modeLevel={ master={"LUNATIC","ULTIMATE"}, classic={"CTWC"}, zen={"NORMAL"}, - infinite={"NORMAL"}, + infinite={"NORMAL","EXTRA"}, solo={"EASY","NORMAL","HARD","LUNATIC"}, tsd={"NORMAL","HARD"}, blind={"EASY","HARD","HARD+","LUNATIC","ULTIMATE","GM"}, dig={"NORMAL","LUNATIC"}, survivor={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"}, tech={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"}, + c4wtrain={"NORMAL","LUNATIC"}, pctrain={"NORMAL","EXTRA"}, pcchallenge={"NORMAL","HARD","LUNATIC"}, techmino49={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"}, @@ -243,6 +275,7 @@ Buttons={ 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}, 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}, @@ -256,7 +289,7 @@ Buttons={ 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}, - clear= {x=1120,y=640,w=120,h=120, rgb=color.white, code=function() + 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 clearSureTime=0 @@ -302,10 +335,18 @@ Buttons={ setting.bgm=not setting.bgm BGM("blank") end,down="vib",left="sfx"}, - vib= {x=850,y=160, w=340,h=60,rgb=color.white, code=function() + 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"}, + voc= {x=940,y=160, w=160, h=60,rgb=color.white, + hide=function() + return not(kb.isDown("m")or false) + 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 love.window.setFullscreen(setting.fullscreen) @@ -326,7 +367,7 @@ Buttons={ if setting.frameMul>100 then setting.frameMul=25 end end,up="bgblock",down="skin",left="sdarrU"}, skin= {x=850,y=440, w=340,h=60,rgb=color.white, code=function() - setting.skin=setting.skin%4+1 + setting.skin=setting.skin%6+1 changeBlockSkin(setting.skin) end,up="frame",down="back",left="ctrl"}, back= {x=640,y=620, w=300,h=70,rgb=color.white, code=back,up="lang"}, diff --git a/main.lua b/main.lua index 949ec5d6..7eaf0523 100644 --- a/main.lua +++ b/main.lua @@ -13,6 +13,7 @@ scr={x=0,y=0,w=gc.getWidth(),h=gc.getHeight(),k=1} scene="" bgmPlaying=nil curBG="none" +voicePlaying={} local F=false kb.setKeyRepeat(F) @@ -61,7 +62,9 @@ customSel={ freshLimit=4, opponent=1, } -preField={h=20}for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end +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 freeRow={} for i=1,40 do freeRow[i]={0,0,0,0,0,0,0,0,0,0} @@ -75,7 +78,8 @@ setting={ sddas=0,sdarr=2, lang=1, - sfx=true,bgm=true,vib=3, + sfx=true,bgm=true, + vib=3,voc=false, fullscreen=F, bgblock=true, skin=1, diff --git a/paint.lua b/paint.lua index 422406e5..291af3c2 100644 --- a/paint.lua +++ b/paint.lua @@ -321,7 +321,7 @@ function Pnt.main() gc.setColor(1,1,1) gc.draw(titleImage,300,30) setFont(30) - gc.print("Alpha V0.7.18",290,140) + gc.print("Alpha V0.7.19",290,140) gc.print(system,800,110) end function Pnt.mode() @@ -369,9 +369,14 @@ function Pnt.draw() gc.setColor(1,1,1) gc.setLineWidth(3) gc.rectangle("line",-2,-2,304,604) + gc.setLineWidth(2) for y=1,20 do for x=1,10 do - if preField[y][x]>0 then - drawPixel(y,x,preField[y][x]) + local B=preField[y][x] + if B>0 then + drawPixel(y,x,B) + elseif B==-1 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 end end if sx and sy then @@ -387,56 +392,65 @@ function Pnt.draw() gc.setLineWidth(13) gc.setColor(blockColor[pen]) gc.rectangle("line",945,605,70,70) - else + 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) + gc.line(960,660,1000,620) end end function Pnt.play() for p=1,#players do P=players[p] if P.small then - gc.push("transform") - gc.translate(P.x,P.y)gc.scale(P.size)--Position - gc.setColor(0,0,0,.4)gc.rectangle("fill",0,0,60,120)--Background - gc.translate(0,P.fieldBeneath*.2) - gc.setScissor(scr.x+P.x*scr.k,scr.y+P.y*scr.k,60*P.size*scr.k,120*P.size*scr.k) - gc.setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1) - local h=#P.clearing - for j=int(P.fieldBeneath/30+1),#P.field 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) + P.frameWait=P.frameWait-1 + if P.frameWait==0 then + P.frameWait=8 + gc.setCanvas(P.canvas) + gc.clear(0,0,0,.4) + gc.push("transform") + 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 + 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) + end end end + end--Field + if P.alive then + gc.setLineWidth(2) + gc.setColor(frameColor[P.strength])gc.rectangle("line",1,1,58,118) + end--Draw boarder + if modeEnv.royaleMode then + gc.setColor(1,1,1) + for i=1,P.strength do + gc.draw(badgeIcon,12*i-7,4,nil,.5) + end end - end--Field - gc.setScissor() - gc.translate(0,-P.fieldBeneath*.2) - if P.alive then - gc.setLineWidth(2) - gc.setColor(frameColor[P.strength])gc.rectangle("line",-1,-1,62,122) - end--Draw boarder - if modeEnv.royaleMode then - gc.setColor(1,1,1) - for i=1,P.strength do - gc.draw(badgeIcon,12*i-7,4,nil,.5) + if P.result then + gc.setColor(1,1,1,min(P.endCounter,60)*.01) + setFont(22)mStr(P.result,32,47) + setFont(20)mStr(P.rank,30,82) end + gc.pop() + gc.setCanvas() end - if P.result then - gc.setColor(1,1,1,min(P.endCounter,60)*.01) - setFont(22)mStr(P.result,32,47) - setFont(20)mStr(P.rank,30,82) - if P.killMark then - gc.setLineWidth(4) - gc.setColor(1,0,0,min(P.endCounter,25)*.04) - gc.circle("line",31,60,84-2*min(P.endCounter,30)) - end + gc.setColor(1,1,1) + gc.draw(P.canvas,P.x,P.y,nil,P.size*10) + if P.killMark then + gc.setLineWidth(3) + gc.setColor(1,0,0,min(P.endCounter,25)*.04) + gc.circle("line",P.centerX,P.centerY,(840-20*min(P.endCounter,30))*P.size) end - gc.pop() else gc.push("transform") gc.translate(P.x,P.y)gc.scale(P.size)--Position @@ -451,7 +465,7 @@ function Pnt.play() for y=0,19 do gc.line(0,30*y,300,30*y)end end--Grid lines gc.translate(0,P.fieldBeneath) - gc.setScissor(scr.x+P.absFieldPos[1]*scr.k,scr.y+P.absFieldPos[2]*scr.k,300*P.size*scr.k,610*P.size*scr.k) + gc.setScissor(scr.x+P.absFieldX*scr.k,scr.y+P.absFieldY*scr.k,300*P.size*scr.k,610*P.size*scr.k) local h=#P.clearing for j=int(P.fieldBeneath/30+1),#P.field do if j==P.clearing[h]and P.falling>-1 then @@ -507,13 +521,12 @@ function Pnt.play() gc.draw(spinCenter,x,600-30*(P.y_img+P.sc[1]-1)+15,nil,nil,nil,4,4) end--Rotate center end - gc.setColor(1,1,1) - gc.draw(PTC.dust[p]) --Draw game field gc.setScissor()--In-playField mask gc.translate(0,-P.fieldBeneath) - gc.setLineWidth(3) gc.setColor(1,1,1) + gc.draw(PTC.dust[p]) + gc.setLineWidth(3) gc.rectangle("line",-1,-11,302,612)--Draw boarder gc.setLineWidth(2) diff --git a/texture.lua b/texture.lua index e6bb53a6..3cfd2122 100644 --- a/texture.lua +++ b/texture.lua @@ -86,6 +86,7 @@ drawableText={ modeName=T(30),levelName=T(30), next=T(40),hold=T(40), pause=T(120), + finish=T(120), custom=T(80), keyboard=T(25),joystick=T(25), setting2Help=T(25), diff --git a/timer.lua b/timer.lua index 3b9da58c..466e2b3b 100644 --- a/timer.lua +++ b/timer.lua @@ -4,19 +4,23 @@ local Timer=love.timer.getTime Tmr={} function Tmr.load() if loading==1 then - loadnum=loadnum+1 - loadprogress=loadnum/10 - if loadnum==5 then - --require("texture") - elseif loadnum==10 then - loadnum=1 + if loadnum<=#voiceList then + local N=voiceList[loadnum] + for i=1,#voice[N]do + voice[N][i]=love.audio.newSource("VOICE/"..voice[N][i]..".ogg","static") + end + loadprogress=loadnum/#voiceList + loadnum=loadnum+1 + else loading=2 + loadnum=1 end elseif loading==2 then if loadnum<=#bgm then - bgm[bgm[loadnum]]=love.audio.newSource("/BGM/"..bgm[loadnum]..".ogg","stream") - bgm[bgm[loadnum]]:setLooping(true) - bgm[bgm[loadnum]]:setVolume(0) + local N=bgm[loadnum] + bgm[N]=love.audio.newSource("/BGM/"..N..".ogg","stream") + bgm[N]:setLooping(true) + bgm[N]:setVolume(0) loadprogress=loadnum/#bgm loadnum=loadnum+1 else @@ -32,7 +36,7 @@ function Tmr.load() else for i=1,#sfx do sfx[i]=nil end loading=4 - loadnum=0 + loadnum=1 end elseif loading==4 then loadnum=loadnum+1 @@ -82,7 +86,7 @@ function Tmr.play(dt) if frame==179 then gameStart() elseif frame%60==0 then - sysSFX("ready") + SFX("ready") end for p=1,#players do P=players[p] @@ -181,7 +185,7 @@ function Tmr.play(dt) if P.falling>=0 then P.falling=P.falling-1 if P.falling>=0 then goto stop end - if P.gameEnv.fall>0 and #P.field>P.clearing[1]then SFX("fall")end + if P.human and P.gameEnv.fall>0 and #P.field>P.clearing[1]then SFX("fall")end for i=1,#P.clearing do removeRow(P.field,P.clearing[i]) removeRow(P.visTime,P.clearing[i]) @@ -230,7 +234,7 @@ function Tmr.play(dt) if P.falling>=0 then P.falling=P.falling-1 if P.falling>=0 then goto stop end - if P.gameEnv.fall>0 and #P.field>P.clearing[1]then SFX("fall")end + if P.human and P.gameEnv.fall>0 and #P.field>P.clearing[1]then SFX("fall")end for i=1,#P.clearing do removeRow(P.field,P.clearing[i]) removeRow(P.visTime,P.clearing[i]) diff --git a/toolfunc.lua b/toolfunc.lua index 81d6d713..9998cbfe 100644 --- a/toolfunc.lua +++ b/toolfunc.lua @@ -45,6 +45,7 @@ local drawableTextLoad={ "next", "hold", "pause", + "finish", "custom", "keyboard", "joystick", @@ -59,7 +60,6 @@ function swapLanguage(l) B.t=text.ButtonText[S][N] end end - if royaleCtrlPad then royaleCtrlPad:release()end gc.push("transform") gc.origin() royaleCtrlPad=gc.newCanvas(300,100) @@ -71,8 +71,8 @@ function swapLanguage(l) gc.rectangle("line",RCPB[2*i-1],RCPB[2*i],90,35,8,4) mStr(text.atkModeName[i],RCPB[2*i-1]+45,RCPB[2*i]+3) end - gc.setCanvas() gc.pop() + gc.setCanvas() for _,s in next,drawableTextLoad do drawableText[s]:set(text[s]) end @@ -80,12 +80,15 @@ function swapLanguage(l) end function changeBlockSkin(n) n=n-1 + gc.push("transform") + gc.origin() for i=1,13 do gc.setCanvas(blockSkin[i]) gc.draw(blockImg,30-30*i,-30*n) gc.setCanvas(blockSkinmini[i]) gc.draw(blockImg,6-6*i,-6*n,nil,.2) end + gc.pop() gc.setCanvas() end @@ -95,7 +98,7 @@ function VIB(t) love.system.vibrate(vibrateLevel[setting.vib+t]) end end -function sysSFX(s,v) +function SFX(s,v) if setting.sfx then local n=1 ::L::if sfx[s][n]:isPlaying()then @@ -111,20 +114,12 @@ function sysSFX(s,v) sfx[s][n]:play() end end -function SFX(s,v) - if setting.sfx and not P.ai then - local n=1 - ::L::if sfx[s][n]:isPlaying()then - n=n+1 - if not sfx[s][n]then - sfx[s][n]=sfx[s][n-1]:clone() - sfx[s][n]:seek(0) - goto quit - end - goto L - end::quit:: - sfx[s][n]:setVolume(v or 1) - sfx[s][n]:play() +function VOICE(s,n) + if setting.voc then + ins(voicePlaying,voice[s][n or rnd(#voice[s])]) + if #voicePlaying==1 then + voicePlaying[1]:play() + end end end function BGM(s) @@ -194,13 +189,12 @@ function gotoScene(s,style) } Buttons.sel=nil if style~="none"then - sysSFX("swipe") + SFX("swipe") end end end function updateStat() for k,v in next,players[1].stat do - print(k) stat[k]=stat[k]+v end end @@ -309,7 +303,7 @@ function loadSetting() if find(i,"=")then local t=sub(i,1,find(i,"=")-1) local v=sub(i,find(i,"=")+1) - if t=="sfx"or t=="bgm"or t=="bgblock"then + if t=="sfx"or t=="bgm"or t=="bgblock"or t=="voc"then setting[t]=v=="true" elseif t=="vib"then setting.vib=toN(v:match("[012345]"))or 0 @@ -348,7 +342,7 @@ function loadSetting() elseif t=="lang"then setting[t]=toN(v:match("[123]"))or 1 elseif t=="skin"then - setting[t]=toN(v:match("[1234]"))or 1 + setting[t]=toN(v:match("[123456]"))or 1 end end end @@ -362,7 +356,7 @@ local saveOpt={ "lang", "sfx","bgm", - "vib", + "vib","voc", "fullscreen", "bgblock", "skin",