diff --git a/SFX/perfectclear.ogg b/SFX/clear.ogg similarity index 100% rename from SFX/perfectclear.ogg rename to SFX/clear.ogg diff --git a/VOICE/perfectclear_1.ogg b/VOICE/clear_1.ogg similarity index 100% rename from VOICE/perfectclear_1.ogg rename to VOICE/clear_1.ogg diff --git a/VOICE/perfectclear_2.ogg b/VOICE/clear_2.ogg similarity index 100% rename from VOICE/perfectclear_2.ogg rename to VOICE/clear_2.ogg diff --git a/ai.lua b/ai.lua index d17bf4b3..c241046a 100644 --- a/ai.lua +++ b/ai.lua @@ -80,14 +80,14 @@ end -------------------------------------------------⑨Stack setup local dirCount={1,1,3,3,3,0,1} local spinOffset={ - {1,0,0},--S - {1,0,0},--Z - {1,0,0},--L - {1,0,0},--J - {1,0,0},--T - {0,0,0},--O - {2,0,1},--I -}for i=1,7 do spinOffset[i][0]=0 end + {[0]=0,1,0,0},--Z + {[0]=0,1,0,0},--L + {[0]=0,1,0,0},--J + {[0]=0,1,0,0},--T + {[0]=0,1,0,0},--S + {[0]=0,0,0,0},--O + {[0]=0,2,0,1},--I +} local FCL={ [1]={ {{11},{11,2},{1},{},{2},{2,2},{12,1},{12}}, @@ -106,10 +106,7 @@ local FCL={ {{11},{11,2},{1},{},{2},{12,1},{12},}, {{4,11},{11,4},{11,3},{1,4},{4},{3},{2,3},{12,4},{12,3},{3,12},}, }, -} -FCL[2]=FCL[1] -FCL[4]=FCL[3] -FCL[5]=FCL[3] +}FCL[2],FCL[4],FCL[5]=FCL[1],FCL[3],FCL[3] local LclearScore={[0]=0,-200,-120,-80,200} local HclearScore={[0]=0,100,140,200,500} local function ifoverlapAI(f,bk,x,y) @@ -256,7 +253,7 @@ AI_think={ P.AI_delay=P.AI_delay0 if Timer()-P.modeData.point>P.modeData.event then P.modeData.point=Timer() - P.modeData.event=P.AI_delay0+rnd(2,10) + P.modeData.event=P.AI_delay0+rnd(5,15) P:changeAtkMode(rnd()<.85 and 1 or #P.atker>3 and 4 or rnd()<.3 and 2 or 3) end return 1 @@ -294,7 +291,7 @@ AI_think={ P.AI_delay=P.AI_delay0 if Timer()-P.modeData.point>P.modeData.event then P.modeData.point=Timer() - P.modeData.event=P.AI_delay0+rnd(2,10) + P.modeData.event=P.AI_delay0+rnd(5,15) P:changeAtkMode(rnd()<.85 and 1 or #P.atker>3 and 4 or rnd()<.3 and 2 or 3) end return 1 diff --git a/conf.lua b/conf.lua index 6c558fb7..27fe0d78 100644 --- a/conf.lua +++ b/conf.lua @@ -1,4 +1,4 @@ -gameVersion="Alpha V0.8.14" +gameVersion="Alpha V0.8.15" function love.conf(t) t.identity="Techmino"--SaveDir name t.version="11.1" @@ -17,7 +17,7 @@ function love.conf(t) W.resizable=true W.fullscreentype="desktop"--"exclusive" W.fullscreen=false - W.vsync=0--0:∞fps + W.vsync=0--∞fps W.msaa=false--num of samples to use with multi-sampled antialiasing W.depth=0--bits/samp of depth buffer W.stencil=1--bits/samp of stencil buffer diff --git a/default_data.lua b/default_data.lua index 9b52697e..3c256a09 100644 --- a/default_data.lua +++ b/default_data.lua @@ -7,6 +7,10 @@ setting={ swap=true, fine=false, autoPause=true, + + lang=1, + skinSet=1, + skin={1,5,2,8,10,3,7}, face={0,0,0,0,0,0,0}, --game @@ -18,12 +22,10 @@ setting={ atkFX=3, frameMul=100, + text=true, fullscreen=false, bg=true, bgspace=true, - lang=1, - skinSet=1, - skin={1,5,2,8,10,3,7}, --graphic sfx=10,bgm=7, @@ -47,7 +49,7 @@ stat={ atk=0,send=0,recv=0,pend=0, clear_1=0,clear_2=0,clear_3=0,clear_4=0, spin_0=0,spin_1=0,spin_2=0,spin_3=0, - b2b=0,b3b=0,pc=0,score=0, + pc=0,c=0,b2b=0,b3b=0,score=0, lastPlay=1,--last played mode ID } keyMap={ diff --git a/document.txt b/document.txt index b1aa6472..da881f09 100644 --- a/document.txt +++ b/document.txt @@ -19,7 +19,8 @@ spin判定: B3B:在B2B效果之上消四再加1,spin再加0.5*消行数攻击,二者都+1额外抵挡 连击:0,0,1,1,2,2,2,3,3,4,3,2…(后面都是2) 特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文) - PC:将上述伤害之和开根号,再+6~10(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满) + 半全消("下方有剩余方块"的全消):伤害+2,额外抵挡+2 + 全消:将上述伤害之和开根号,再+6~10(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满) 根据上述规则计算后,向下取整,攻击打出 分数系统: diff --git a/file.lua b/file.lua index 88302205..470aa58b 100644 --- a/file.lua +++ b/file.lua @@ -89,7 +89,7 @@ function saveRecord(N,L) local _,mes=F:write(dumpTable(L)) F:flush()F:close() if not _ then - TEXT(text.recSavingError..mes,1140,650,20,"sudden",.5) + TEXT(text.recSavingError..(mes or"unknown error"),1140,650,20,"sudden",.5) end end function delRecord(N) @@ -115,7 +115,7 @@ function saveUnlock() local _,mes=F:write(dumpTable(modeRanks)) F:flush()F:close() if not _ then - TEXT(text.unlockSavingError..mes,1140,650,20,"sudden",.5) + TEXT(text.unlockSavingError..(mes or"unknown error"),1140,650,20,"sudden",.5) end end @@ -140,7 +140,7 @@ function saveData() local _,mes=F:write(dumpTable(stat)) F:flush()F:close() if not _ then - TEXT(text.statSavingError..mes,1140,650,20,"sudden",.5) + TEXT(text.statSavingError..(mes or"unknown error"),1140,650,20,"sudden",.5) end end @@ -165,7 +165,7 @@ function saveSetting() local _,mes=F:write(dumpTable(setting)) F:flush()F:close() if _ then TEXT(text.settingSaved,1140,650,40,"sudden",.5) - else TEXT(text.settingSavingError..mes,1140,650,20,"sudden",.5) + else TEXT(text.settingSavingError..(mes or"unknown error"),1140,650,20,"sudden",.5) end end @@ -186,7 +186,7 @@ function saveKeyMap() local _,mes=F:write(dumpTable(keyMap)) F:flush()F:close() if _ then TEXT(text.keyMapSaved,1140,650,26,"sudden",.5) - else TEXT(text.keyMapSavingError..mes,1140,650,20,"sudden",.5) + else TEXT(text.keyMapSavingError..(mes or"unknown error"),1140,650,20,"sudden",.5) end end @@ -207,7 +207,7 @@ function saveVK() local _,mes=F:write(dumpTable(VK_org)) F:flush()F:close() if _ then TEXT(text.VKSaved,1140,650,26,"sudden",.5) - else TEXT(text.VKSavingError..mes,1140,650,20,"sudden",.5) + else TEXT(text.VKSavingError..(mes or"unknown error"),1140,650,20,"sudden",.5) end end diff --git a/language/chi.lua b/language/chi.lua index 90a00287..504e35d6 100644 --- a/language/chi.lua +++ b/language/chi.lua @@ -22,6 +22,7 @@ return{ b2b="B2B ",b3b="B2B2B ", mini="Mini", PC="Perfect Clear", + C="Clear", hold="暂存",next="下一个", stage=function(n)return"关卡 "..n end, @@ -248,6 +249,7 @@ return{ dropFX="下落特效等级", shakeFX="晃动特效等级", atkFX="攻击特效等级", + text="消行文本", fullscreen="全屏", frame="绘制帧率", back=BK, diff --git a/language/chi_full.lua b/language/chi_full.lua index 977d5901..a932cee3 100644 --- a/language/chi_full.lua +++ b/language/chi_full.lua @@ -22,6 +22,7 @@ return{ b2b="满贯",b3b="大满贯", mini="迷你", PC="场地全清", + C="场地半清", hold="暂存",next="下一个", stage=function(n)return"关卡 "..n end, @@ -176,7 +177,7 @@ return{ }, mode={ draw="画图(Q)", - custon="参数(E)", + custom="参数(E)", start="开始", back=BK, }, @@ -245,6 +246,7 @@ return{ dropFX="下落特效等级", shakeFX="晃动特效等级", atkFX="攻击特效等级", + text="消行文本", fullscreen="全屏", frame="绘制帧率", back=BK, diff --git a/language/eng.lua b/language/eng.lua index 1b36c5ba..21772ef0 100644 --- a/language/eng.lua +++ b/language/eng.lua @@ -20,6 +20,7 @@ return{ b2b="B2B ",b3b="B2B2B ", mini="Mini", PC="Perfect Clear", + C="Clear", hold="Hold",next="Next", stage=function(n)return"STAGE "..n end, @@ -244,6 +245,7 @@ Lib used: dropFX="Drop FX level", shakeFX="Shake FX level", atkFX="ATK FX level", + text="Line-clear text", fullscreen="Fullscreen", frame="draw FPS", back=BK, @@ -276,8 +278,8 @@ Lib used: prev5="↑",next5="↓",spin5="R", prev6="↑",next6="↓",spin6="R", prev7="↑",next7="↓",spin7="R", - skinR="reset Color", - faceR="reset Dir", + skinR="Reset Color", + faceR="Reset Dir.", back=BK, }, setting_touch={ diff --git a/main.lua b/main.lua index c2a4cd77..a7aacbbb 100644 --- a/main.lua +++ b/main.lua @@ -677,7 +677,7 @@ function touchMove.play(id,x,y,dx,dy) end function keyDown.play(key) if key=="escape"then - (frame<180 and scene.back or pauseGame)() + pauseGame() return end local m=keyMap diff --git a/modes/attacker_hard.lua b/modes/attacker_hard.lua index d72b2c42..2c217bd3 100644 --- a/modes/attacker_hard.lua +++ b/modes/attacker_hard.lua @@ -42,10 +42,10 @@ return{ D.event=D.event+1 D.point=int(72e4/t)*.1 if D.event==20 then - P:showText(text.great,0,-140,100,"appear",.6) + P:showTextF(text.great,0,-140,100,"appear",.6) P.gameEnv.pushSpeed=3 elseif D.event==50 then - P:showText(text.maxspeed,0,-140,100,"appear",.6) + P:showTextF(text.maxspeed,0,-140,100,"appear",.6) end end end diff --git a/modes/attacker_ultimate.lua b/modes/attacker_ultimate.lua index 021dfb8f..7c574448 100644 --- a/modes/attacker_ultimate.lua +++ b/modes/attacker_ultimate.lua @@ -48,13 +48,13 @@ return{ D.event=D.event+1 D.point=int(s*36e3/t)*.1 if D.event==10 then - P:showText(text.great,0,-140,100,"appear",.6) + P:showTextF(text.great,0,-140,100,"appear",.6) P.gameEnv.pushSpeed=4 elseif D.event==20 then - P:showText(text.awesome,0,-140,100,"appear",.6) + P:showTextF(text.awesome,0,-140,100,"appear",.6) P.gameEnv.pushSpeed=5 elseif D.event==30 then - P:showText(text.maxspeed,0,-140,100,"appear",.6) + P:showTextF(text.maxspeed,0,-140,100,"appear",.6) end end end diff --git a/modes/c4wtrain_lunatic.lua b/modes/c4wtrain_lunatic.lua index 5db15f98..e881286d 100644 --- a/modes/c4wtrain_lunatic.lua +++ b/modes/c4wtrain_lunatic.lua @@ -1,7 +1,7 @@ local rnd,min=math.random,math.min local function check_c4w(P) for i=1,#P.clearedRow do - P.field[#P.field+1]=freeRow.get(10) + P.field[#P.field+1]=freeRow.get(13) P.visTime[#P.visTime+1]=freeRow.get(20) for i=4,7 do P.field[#P.field][i]=0 end end @@ -46,17 +46,17 @@ return{ local P=players[1] local F=P.field for i=1,24 do - F[i]=freeRow.get(10) + F[i]=freeRow.get(13) P.visTime[i]=freeRow.get(20) for x=4,7 do F[i][x]=0 end end local r=rnd(6) - if r==1 then F[1][5],F[1][4],F[2][4]=10,10,10 - elseif r==2 then F[1][6],F[1][7],F[2][7]=10,10,10 - elseif r==3 then F[1][4],F[2][4],F[2][5]=10,10,10 - elseif r==4 then F[1][7],F[2][7],F[2][6]=10,10,10 - elseif r==5 then F[1][4],F[1][5],F[1][6]=10,10,10 - elseif r==6 then F[1][7],F[1][6],F[1][5]=10,10,10 + if r==1 then F[1][5],F[1][4],F[2][4]=13,13,13 + elseif r==2 then F[1][6],F[1][7],F[2][7]=13,13,13 + elseif r==3 then F[1][4],F[2][4],F[2][5]=13,13,13 + elseif r==4 then F[1][7],F[2][7],F[2][6]=13,13,13 + elseif r==5 then F[1][4],F[1][5],F[1][6]=13,13,13 + elseif r==6 then F[1][7],F[1][6],F[1][5]=13,13,13 end end, mesDisp=function(P,dx,dy) diff --git a/modes/c4wtrain_normal.lua b/modes/c4wtrain_normal.lua index 6dbc8b7e..cbe58b6b 100644 --- a/modes/c4wtrain_normal.lua +++ b/modes/c4wtrain_normal.lua @@ -1,7 +1,7 @@ local rnd,min=math.random,math.min local function check_c4w(P) for i=1,#P.clearedRow do - P.field[#P.field+1]=freeRow.get(10) + P.field[#P.field+1]=freeRow.get(13) P.visTime[#P.visTime+1]=freeRow.get(20) for i=4,7 do P.field[#P.field][i]=0 end end @@ -44,17 +44,17 @@ return{ local P=players[1] local F=P.field for i=1,24 do - F[i]=freeRow.get(10) + F[i]=freeRow.get(13) P.visTime[i]=freeRow.get(20) for x=4,7 do F[i][x]=0 end end local r=rnd(6) - if r==1 then F[1][5],F[1][4],F[2][4]=10,10,10 - elseif r==2 then F[1][6],F[1][7],F[2][7]=10,10,10 - elseif r==3 then F[1][4],F[2][4],F[2][5]=10,10,10 - elseif r==4 then F[1][7],F[2][7],F[2][6]=10,10,10 - elseif r==5 then F[1][4],F[1][5],F[1][6]=10,10,10 - elseif r==6 then F[1][7],F[1][6],F[1][5]=10,10,10 + if r==1 then F[1][5],F[1][4],F[2][4]=13,13,13 + elseif r==2 then F[1][6],F[1][7],F[2][7]=13,13,13 + elseif r==3 then F[1][4],F[2][4],F[2][5]=13,13,13 + elseif r==4 then F[1][7],F[2][7],F[2][6]=13,13,13 + elseif r==5 then F[1][4],F[1][5],F[1][6]=13,13,13 + elseif r==6 then F[1][7],F[1][6],F[1][5]=13,13,13 end end, mesDisp=function(P,dx,dy) diff --git a/modes/defender_lunatic.lua b/modes/defender_lunatic.lua index a452825e..fa8d9869 100644 --- a/modes/defender_lunatic.lua +++ b/modes/defender_lunatic.lua @@ -37,15 +37,15 @@ return{ D.event=D.event+1 D.point=int(144e3/(240-2*D.event))*.1 if D.event==25 then - P:showText(text.great,0,-140,100,"appear",.6) + P:showTextF(text.great,0,-140,100,"appear",.6) P.gameEnv.pushSpeed=3 P.dropDelay,P.gameEnv.drop=4,4 elseif D.event==50 then - P:showText(text.awesome,0,-140,100,"appear",.6) + P:showTextF(text.awesome,0,-140,100,"appear",.6) P.gameEnv.pushSpeed=4 P.dropDelay,P.gameEnv.drop=3,3 elseif D.event==75 then - P:showText(text.maxspeed,0,-140,100,"appear",.6) + P:showTextF(text.maxspeed,0,-140,100,"appear",.6) P.dropDelay,P.gameEnv.drop=2,2 end end diff --git a/modes/defender_normal.lua b/modes/defender_normal.lua index 1dccd440..cb955c23 100644 --- a/modes/defender_normal.lua +++ b/modes/defender_normal.lua @@ -37,16 +37,16 @@ return{ D.event=D.event+1 D.point=int(108e3/(360-D.event*2))*.1 if D.event==25 then - P:showText(text.great,0,-140,100,"appear",.6) + P:showTextF(text.great,0,-140,100,"appear",.6) P.gameEnv.pushSpeed=2 P.dropDelay,P.gameEnv.drop=20,20 elseif D.event==50 then - P:showText(text.awesome,0,-140,100,"appear",.6) + P:showTextF(text.awesome,0,-140,100,"appear",.6) P.gameEnv.pushSpeed=3 P.dropDelay,P.gameEnv.drop=10,10 elseif D.event==90 then P.dropDelay,P.gameEnv.drop=5,5 - P:showText(text.maxspeed,0,-140,100,"appear",.6) + P:showTextF(text.maxspeed,0,-140,100,"appear",.6) end end end diff --git a/modes/hotseat_2P.lua b/modes/hotseat_2P.lua index 77bd175f..e58c59f0 100644 --- a/modes/hotseat_2P.lua +++ b/modes/hotseat_2P.lua @@ -2,7 +2,7 @@ return{ name={ "本地多人", "本地多人", - "Hotseat", + "Multiplayer", }, level={ "2P", @@ -10,8 +10,8 @@ return{ "2P", }, info={ - "友尽模式", - "友尽模式", + "友尽模式(非联网/局域网)", + "友尽模式(非联网/局域网)", "End of friendship", }, color=color.white, diff --git a/modes/hotseat_3P.lua b/modes/hotseat_3P.lua index c03f60ce..ae74bea9 100644 --- a/modes/hotseat_3P.lua +++ b/modes/hotseat_3P.lua @@ -2,7 +2,7 @@ return{ name={ "本地多人", "本地多人", - "Hotseat", + "Multiplayer", }, level={ "3P", @@ -10,8 +10,8 @@ return{ "3P", }, info={ - "友尽模式", - "友尽模式", + "友尽模式(非联网/局域网)", + "友尽模式(非联网/局域网)", "End of friendship", }, color=color.white, diff --git a/modes/hotseat_4P.lua b/modes/hotseat_4P.lua index 2a119ea6..d16a9e98 100644 --- a/modes/hotseat_4P.lua +++ b/modes/hotseat_4P.lua @@ -2,7 +2,7 @@ return{ name={ "本地多人", "本地多人", - "Hotseat", + "Multiplayer", }, level={ "4P", @@ -10,8 +10,8 @@ return{ "4P", }, info={ - "友尽模式", - "友尽模式", + "友尽模式(非联网/局域网)", + "友尽模式(非联网/局域网)", "End of friendship", }, color=color.white, diff --git a/modes/master_adavnce.lua b/modes/master_adavnce.lua index f4991094..e926badc 100644 --- a/modes/master_adavnce.lua +++ b/modes/master_adavnce.lua @@ -26,7 +26,7 @@ local function score(P) P.modeData.point,P.modeData.event=500,4 P:win("finish") else - P:showText(text.stage(s),0,-120,80,"fly") + P:showTextF(text.stage(s),0,-120,80,"fly") end SFX.play("reach") end diff --git a/modes/master_beginner.lua b/modes/master_beginner.lua index ff2386a7..cfc3b237 100644 --- a/modes/master_beginner.lua +++ b/modes/master_beginner.lua @@ -30,7 +30,7 @@ local function score(P) P.modeData.point,P.modeData.event=500,4 P:win("finish") else - P:showText(text.stage(s),0,-120,80,"fly") + P:showTextF(text.stage(s),0,-120,80,"fly") end SFX.play("reach") end diff --git a/modes/master_final.lua b/modes/master_final.lua index 2ae3cc84..24c23a82 100644 --- a/modes/master_final.lua +++ b/modes/master_final.lua @@ -12,7 +12,7 @@ local function score(P) if MD.point%100==99 then SFX.play("blip_1")end if int(MD.point*.01)>MD.event then local s=MD.event+1;MD.event=s--level up! - P:showText(text.stage(s),0,-120,80,"fly") + P:showTextF(text.stage(s),0,-120,80,"fly") local E=P.gameEnv if s<4 then--first 300 if s~=1 then E.lock=E.lock-1 end diff --git a/modes/pctrain_lunatic.lua b/modes/pctrain_lunatic.lua index 53ace788..3c880121 100644 --- a/modes/pctrain_lunatic.lua +++ b/modes/pctrain_lunatic.lua @@ -9,10 +9,12 @@ local function task_PC(P) P.modeData.counter=P.modeData.counter+1 if P.modeData.counter==21 then local t=P.stat.pc%2 + local S=P.gameEnv.skin for i=1,4 do local r=freeRow.get(0) for j=1,10 do - r[j]=PCbase[4*t+i][j] + local _=PCbase[4*t+i][j] + r[j]=S[_]or 0 end ins(P.field,1,r) ins(P.visTime,1,freeRow.get(20)) @@ -44,7 +46,7 @@ local function newPC(P) elseif b<5 then b=7-b end end - P.next[#P.next+1]={bk=blocks[b][0],id=b,color=b,name=b}--P:newNext(b)'s simple version! + P:getNext(b) end P.modeData.counter=P.stat.piece==0 and 20 or 0 newTask(task_PC,P) @@ -54,9 +56,9 @@ local function newPC(P) P.gameEnv.lock=pc_lock[s]or 20 P.gameEnv.fall=pc_fall[s]or 5 if s==10 then - P:showText(text.maxspeed,0,-140,100,"appear",.6) + P:showTextF(text.maxspeed,0,-140,100,"appear",.6) else - P:showText(text.speedup,0,-140,40,"appear",.8) + P:showTextF(text.speedup,0,-140,40,"appear",.8) end end end diff --git a/modes/pctrain_normal.lua b/modes/pctrain_normal.lua index b02ff4dc..18f5181e 100644 --- a/modes/pctrain_normal.lua +++ b/modes/pctrain_normal.lua @@ -6,10 +6,12 @@ local function task_PC(P) P.modeData.counter=P.modeData.counter+1 if P.modeData.counter==21 then local t=P.stat.pc%2 + local S=P.gameEnv.skin for i=1,4 do local r=freeRow.get(0) for j=1,10 do - r[j]=PCbase[4*t+i][j] + local _=PCbase[4*t+i][j] + r[j]=S[_]or 0 end ins(P.field,1,r) ins(P.visTime,1,freeRow.get(20)) @@ -40,7 +42,7 @@ local function newPC(P) elseif b<5 then b=7-b end end - P.next[#P.next+1]={bk=blocks[b][0],id=b,color=b,name=b}--P:newNext(b)'s simple version! + P:getNext(b) end P.modeData.counter=P.stat.piece==0 and 20 or 0 newTask(task_PC,P) diff --git a/modes/survivor_easy.lua b/modes/survivor_easy.lua index b2f587d9..8647010b 100644 --- a/modes/survivor_easy.lua +++ b/modes/survivor_easy.lua @@ -26,7 +26,7 @@ return{ P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1} P.atkBuffer.sum=P.atkBuffer.sum+1 P.stat.recv=P.stat.recv+1 - if P.modeData.event==45 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end + if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end P.modeData.counter=0 P.modeData.event=P.modeData.event+1 end diff --git a/modes/survivor_hard.lua b/modes/survivor_hard.lua index 208e3bc7..a331a56f 100644 --- a/modes/survivor_hard.lua +++ b/modes/survivor_hard.lua @@ -31,7 +31,7 @@ return{ 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==60 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end + if P.modeData.event==60 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end P.modeData.counter=0 P.modeData.event=P.modeData.event+1 end diff --git a/modes/survivor_lunatic.lua b/modes/survivor_lunatic.lua index 6c14bc13..e8673b07 100644 --- a/modes/survivor_lunatic.lua +++ b/modes/survivor_lunatic.lua @@ -27,7 +27,7 @@ return{ P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3} P.atkBuffer.sum=P.atkBuffer.sum+4 P.stat.recv=P.stat.recv+4 - if P.modeData.event==60 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end + if P.modeData.event==60 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end P.modeData.counter=0 P.modeData.event=P.modeData.event+1 end diff --git a/modes/survivor_normal.lua b/modes/survivor_normal.lua index 2ec8f99b..841c7a94 100644 --- a/modes/survivor_normal.lua +++ b/modes/survivor_normal.lua @@ -31,7 +31,7 @@ return{ d%4==3 and{pos=rnd(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3} P.atkBuffer.sum=P.atkBuffer.sum+d%4+1 P.stat.recv=P.stat.recv+d%4+1 - if P.modeData.event==45 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end + if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end P.modeData.counter=0 P.modeData.event=d end diff --git a/modes/survivor_ultimate.lua b/modes/survivor_ultimate.lua index 9891024f..d0a6d73e 100644 --- a/modes/survivor_ultimate.lua +++ b/modes/survivor_ultimate.lua @@ -33,7 +33,7 @@ return{ P.atkBuffer[p+3]={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 P.stat.recv=P.stat.recv+20 - if P.modeData.event==31 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end + if P.modeData.event==31 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end P.modeData.counter=0 P.modeData.event=P.modeData.event+1 end diff --git a/paint.lua b/paint.lua index 79937a6e..d285cc41 100644 --- a/paint.lua +++ b/paint.lua @@ -153,14 +153,13 @@ function Pnt.BG.game5() else gc.clear(0,0,0) end end--Lightning -local miniBlockColor={} function Pnt.BG.game6() local t=1.2-Timer()%10%3%1.2 if t<.3 then gc.clear(t,t,t) else gc.clear(0,0,0) end local R=7-int(Timer()*.5)%7 - local _=miniBlockColor[R] + local _=skin.libColor[setting.skin[R]] gc.setColor(_[1],_[2],_[3],.1) gc.draw(miniBlock[R],640,360,Timer()%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5) end--Fast lightning&spining tetromino @@ -497,13 +496,11 @@ function Pnt.pause() gc.rectangle("fill",0,0,scr.w,scr.h) gc.pop() setFont(25) - gc.setColor(1,1,1,T) if pauseCount>0 then - t=curMode.pauseLimit and pauseTime>30 - if t then gc.setColor(1,.4,.4,T)end + gc.setColor(1,.4,.4,T) gc.print(text.pauseCount..":["..pauseCount.."] "..format("%.2f",pauseTime).."s",110,150) - if t then gc.setColor(1,1,1,T)end end + gc.setColor(1,1,1,T) for i=1,7 do gc.print(text.pauseStat[i],95,30*i+310) gc.print(sceneTemp[i],305,30*i+310) @@ -564,10 +561,10 @@ function Pnt.setting_control() --Floating number setFont(30) local _=setting - mStr(_.das,226+35*_.das,150) - mStr(_.arr,226+35*_.arr,240) - mStr(_.sddas,226+35*_.sddas,330) - mStr(_.sdarr,226+35*_.sdarr,420) + mStr(_.das,226+35*_.das,145) + mStr(_.arr,226+35*_.arr,235) + mStr(_.sddas,226+35*_.sddas,325) + mStr(_.sdarr,226+35*_.sdarr,415) --Testing O mino _=blockSkin[setting.skin[6]] @@ -633,17 +630,17 @@ function Pnt.setting_skin() for N=1,7 do local face=setting.face[N] local B=blocks[N][face] - local x,y=-30+140*N-scs[N][face][2]*30,335+scs[N][face][1]*30 + local x,y=-25+140*N-scs[N][face][2]*30,325+scs[N][face][1]*30 local col=#B[1] for i=1,#B do for j=1,col do if B[i][j]then gc.draw(blockSkin[setting.skin[N]],x+30*j,y-30*i) end end end - gc.circle("fill",-15+140*N,350,sin(Timer()*10)+5) + gc.circle("fill",-10+140*N,340,sin(Timer()*10)+5) end - for i=1,5 do - gc.draw(blockSkin[12+i],1110,140+60*i,nil,2) + for i=1,6 do + gc.draw(blockSkin[11+i],1110,100+60*i,nil,2) end gc.draw(drawableText.setting_skin,80,50) end diff --git a/parts/kickList.lua b/parts/kickList.lua index 7c201c06..e2e9a702 100644 --- a/parts/kickList.lua +++ b/parts/kickList.lua @@ -91,8 +91,8 @@ local TRS={ [02]={{0,0},{-1,0}, {1,0}, {0,-1}, {0,1} }, [20]={{0,0},{1,0}, {-1,0}, {0,1}, {0,-1} }, [13]={{0,0},{0,-1}, {-1,0}, {1,0}, {0,1} }, - [31]={{0,0},{1,0}, {-1,0}}, - } + [31]={{0,0},{0,-1}, {1,0}, {-1,0}, {0,1} }, + }--I }for i=1,7 do collect(TRS[i])end local AIRS={ [1]={ diff --git a/parts/light.lua b/parts/light.lua index b005fb7e..a3c17a3b 100644 --- a/parts/light.lua +++ b/parts/light.lua @@ -1,13 +1,12 @@ --LIGHT MODULE(Optimized by MrZ,Original on github/love2d community/simple-love-lights) --Heavily based on mattdesl's libGDX implementation: --https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows +--Private-- local gc=love.graphics local C=gc.clear local shadowMapShader=gc.newShader("shader/shadowMap.cs")--Shader for caculating the 1D shadow map. local lightRenderShader=gc.newShader("shader/lightRender.cs")--Shader for rendering blurred lights and shadows. -Lights={}--Lightsource objects -local Lights=Lights ---Private-- +local Lights={}--Lightsource objects local function move(L,x,y) L.x,L.y=x,y end @@ -51,18 +50,18 @@ local function draw(L) --复位 end --Public-- -function drawLight() +function Lights.draw() for i=1,#Lights do Lights[i]:draw() end end -function clearLight(L) - for i=1,#Lights do +function Lights.clear(L) + for i=#Lights,1,-1 do Lights[i]:destroy() Lights[i]=nil end end -function addLight(x,y,R,F) +function Lights.add(x,y,R,F) local id=#Lights+1 Lights[id]={ id=id, @@ -77,4 +76,5 @@ function addLight(x,y,R,F) draw=draw, destroy=destroy, } -end \ No newline at end of file +end +return Lights \ No newline at end of file diff --git a/parts/list.lua b/parts/list.lua index cebcb939..960efdc1 100644 --- a/parts/list.lua +++ b/parts/list.lua @@ -75,7 +75,7 @@ voiceList={ mini={"mini_1","mini_2","mini_3"}, b2b={"b2b_1","b2b_2","b2b_3"}, b3b={"b3b_1","b3b_2"}, - pc={"perfectclear_1","perfectclear_2"}, + pc={"clear_1","clear_2"}, win={"win_1","win_2","win_3","win_4","win_5","win_6","win_6","win_7"}, lose={"lose_1","lose_2","lose_3"}, bye={"bye_1","bye_2"}, diff --git a/parts/sfx.lua b/parts/sfx.lua index fe2783ce..910c1841 100644 --- a/parts/sfx.lua +++ b/parts/sfx.lua @@ -17,7 +17,7 @@ SFX.list={ "clear_1","clear_2","clear_3","clear_4", "spin_0","spin_1","spin_2","spin_3", "emit","blip_1","blip_2", - "perfectclear", + "clear", "error", --Mono sfxs diff --git a/parts/space.lua b/parts/space.lua index ec852ebe..d54c8d81 100644 --- a/parts/space.lua +++ b/parts/space.lua @@ -51,9 +51,9 @@ function space.draw() if not stars[1]then return end gc.translate(-50,-50) gc.setLineWidth(7) - gc.setColor(planet.R,planet.G,planet.B,.1626) + gc.setColor(planet.R,planet.G,planet.B,.026) gc.circle("line",planet.x,planet.y,planet.r+1) - gc.setColor(planet.R,.6,planet.B,.26) + gc.setColor(planet.R,.6,planet.B,.0626) gc.circle("fill",planet.x,planet.y,planet.r) gc.setColor(.9,.9,.9) for i=1,2600,5 do diff --git a/player.lua b/player.lua index b363dbf2..24e8201b 100644 --- a/player.lua +++ b/player.lua @@ -13,6 +13,7 @@ local gameEnv0={ quickR=true,swap=true, ghost=true,center=true, smooth=false,grid=false, + text=true, lockFX=3,dropFX=3, shakeFX=3, @@ -53,14 +54,9 @@ local spinSCR={--[blockName][row] --B2BMUL:1.2/2.0 --Techrash:1K;MUL:1.3/1.8 --Mini*=.6 -local visible_opt={show=1e99,time=300,fast=20,none=5} +local visible_opt={show=1e99,time=300,fast=20,none=0} local reAtk={0,0,1,1,1,2,2,3,3} local reDef={0,1,1,2,3,3,4,4,5} -local spinName={"zspin","sspin","lspin","jspin","tspin","ospin","ispin"} -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 local initCenterX={6,6,6,6,6,6.5,6.5}--1 added local initCenterY={22,22,22,22,22,22.5,21.5}--1 added local CCblockID={4,3,5,6,1,2,0} @@ -69,7 +65,7 @@ local kickList=require("parts/kickList") local finesseCtrlPar={ [1]={ {1,2,1,0,1,2,2,1}, - {2,2,3,1,1,2,3,2,2}, + {2,2,2,1,1,2,3,2,2}, },--Z [3]={ {1,2,1,0,1,2,2,1}, @@ -92,42 +88,42 @@ local CCblockID={4,3,5,6,1,2,0} local freshMethod={ none=NULL, bag7=function(P) - if #P.next<6 then - local bag={1,2,3,4,5,6,7} - ::L::P:getNext(rem(bag,rnd(#bag))) - if bag[1]then goto L end - end + local bag={1,2,3,4,5,6,7} + ::L::P:getNext(rem(bag,rnd(#bag))) + if bag[1]then goto L end end, his4=function(P) - if #P.next<6 then - local j,i=0 - repeat - i,j=rnd(7),j+1 - until i~=P.his[1]and i~=P.his[2]and i~=P.his[3]and i~=P.his[4] - P:getNext(i) - rem(P.his,1)P.his[4]=i - end + local i + local j=0 + repeat + i=rnd(7) + j=j+1 + until i~=P.his[1]and i~=P.his[2]and i~=P.his[3]and i~=P.his[4]and j<6 + P:getNext(i) + rem(P.his,1)P.his[4]=i end, rnd=function(P) - ::L::local i=rnd(7) - if i==P.next[5].id then goto L end + local i + ::L::i=rnd(7) + if P.next[1]and i==P.next[#P.next].id then goto L end P:getNext(i) - end,--random + end, drought1=function(P) - if #P.next<6 then - local bag={1,2,3,4,5,6} - ::L::P:getNext(rem(bag,rnd(#bag))) - if bag[1]then goto L end - end + local bag={1,2,3,4,5,6} + ::L::P:getNext(rem(bag,rnd(#bag))) + if bag[1]then goto L end end, drought2=function(P) - if #P.next<6 then - local bag={1,1,1,1,2,2,2,2,6,6,6,6,3,3,4,4,5,7} - ::L::P:getNext(rem(bag,rnd(#bag))) - if bag[1]then goto L end - end + local bag={1,1,1,1,2,2,2,2,6,6,6,6,3,3,4,4,5,7} + ::L::P:getNext(rem(bag,rnd(#bag))) + if bag[1]then goto L end end, } +local spinName={"zspin","sspin","lspin","jspin","tspin","ospin","ispin"} +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 ------------------------------------------------- --------------------------------------------------- @@ -394,7 +390,7 @@ end local function Pdraw_small(P) P.frameWait=P.frameWait-1 if P.frameWait==0 then - P.frameWait=8 + P.frameWait=10 gc.setCanvas(P.canvas) gc.clear(0,0,0,.4) gc.push("transform") @@ -607,7 +603,7 @@ local function Pupdate_alive(P,dt) P.AI_stage=AI_think[P.AI_mode][P.AI_stage](P,C) elseif P.AI_delay<=0 then P:pressKey(C[1])P:releaseKey(C[1]) - local k=#C for i=1,k do C[i]=C[i+1]end--table.remove(C,1) + rem(C,1) P.AI_delay=P.AI_delay0*2 end end @@ -712,7 +708,7 @@ local function Pupdate_alive(P,dt) end end if not P.control then goto stop end - if P.waiting==0 then P:freshNext()end + if P.waiting==0 then P:popNext()end if P.waiting>=0 then P.waiting=P.waiting-1 goto stop @@ -797,10 +793,13 @@ player={}local player=player -------------------------------------------------------- local textFX=textFX function player.showText(P,text,dx,dy,font,style,spd,stop) - if P.bonus then + if P.gameEnv.text then P.bonus[#P.bonus+1]=getTEXT(text,150+dx,300+dy,font*P.size,style,spd,stop) end end +function player.showTextF(P,text,dx,dy,font,style,spd,stop) + P.bonus[#P.bonus+1]=getTEXT(text,150+dx,300+dy,font*P.size,style,spd,stop) +end local function without(L,e) for i=1,#L do if L[i]==e then return end @@ -809,7 +808,7 @@ local function without(L,e) end function player.createLockFX(P) local BK=P.cur.bk - local t=.1-P.gameEnv.lockFX*.02 + local t=.3-P.gameEnv.lockFX*.06 for i=1,P.r do local y=P.curY+i-1 if without(P.clearedRow,y)then @@ -821,7 +820,7 @@ function player.createLockFX(P) end end end -function player.createShade(P,x1,y1,x2,y2)--x1y2! +function player.createDropFX(P,x1,y1,x2,y2)--x1y2! if P.gameEnv.block and y1>=y2 then P.dropFX[#P.dropFX+1]={5,P.cur.color,x1,y1,x2,y2} end @@ -1077,7 +1076,7 @@ function player.freshgho(P) end if P.curY>P.y_img then if P.gameEnv.dropFX then - P:createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1) + P:createDropFX(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1) end if P.gameEnv.shakeFX then P.fieldOff.vy=P.gameEnv.shakeFX*.5 @@ -1170,7 +1169,7 @@ function player.spin(P,d,ifpre) do return end ::spin:: if P.gameEnv.dropFX then - P:createShade(P.curX,P.curY+P.r-1,P.curX+P.c-1,P.curY) + P:createDropFX(P.curX,P.curY+P.r-1,P.curX+P.c-1,P.curY) end local y0=P.curY P.curX,P.curY,P.dir=ix,iy,idir @@ -1217,7 +1216,9 @@ function player.hold(P,ifpre) P.hd.bk=blocks[hid][P.gameEnv.face[hid]] if P.cur.id==0 then P.cur=rem(P.next,1) - P:newNext() + if #P.next0 and P.clearingRow[_]>#P.field then - P.clearingRow[_]=nil - _=_-1 - goto L + + --处理锁定特效 + if P.gameEnv.lockFX then + if cc==0 then + P:createLockFX() + elseif P.lockFX[1]then + P.lockFX={} + end end - if P.clearingRow[1]then P.falling=P.gameEnv.fall end --处理锁定特效 if P.gameEnv.lockFX then @@ -1381,14 +1387,32 @@ function player.drop(P)--Place piece end end end + else + finesse=true end ::L2:: --移除消去的行 - for i=cc,1,-1 do - _=P.clearedRow[i] - freeRow.discard(rem(P.field,_)) - freeRow.discard(rem(P.visTime,_)) + if cc>0 then + for i=cc,1,-1 do + _=P.clearedRow[i] + freeRow.discard(rem(P.field,_)) + freeRow.discard(rem(P.visTime,_)) + end + end + --清除超高特效 + _=#P.clearingRow + ::L::if _>0 then + if P.clearingRow[_]>#P.field then + P.clearingRow[_]=nil + _=_-1 + goto L + end + end + if P.clearingRow[1]then + P.falling=P.gameEnv.fall + elseif cc==P.r then + clear=true end if not finesse then--极简判定:操作判断法 @@ -1489,7 +1513,7 @@ function player.drop(P)--Place piece SFX.play(spin_n[cc]) VOICE(spinName[P.cur.name],CHN) end - elseif #P.field>0 then + elseif not clear then P.b2b=max(P.b2b-250,0) P:showText(text.clear[cc],0,-30,27+cc*3,"appear",(8-cc)*.3) send=cc-.75 @@ -1508,21 +1532,31 @@ function player.drop(P)--Place piece P:showText(text.cmb[min(cmb,20)],0,25,15+min(cmb,25)*3,cmb<10 and"appear"or"flicker") cscore=cscore+min(20*cmb,300)*cc end - if #P.field==0 then - P:showText(text.PC,0,-80,50,"flicker") - send=send^.5+min(6+P.stat.pc,10) - exblock=exblock+2 - sendTime=sendTime+60 - if P.stat.row+cc>4 then - P.b2b=1200 - cscore=cscore+300*min(6+P.stat.pc,10) + if clear then + if #P.field==0 then + P:showText(text.PC,0,-80,50,"flicker") + send=send^.5+min(6+P.stat.pc,10) + exblock=exblock+2 + sendTime=sendTime+120 + if P.stat.row+cc>4 then + P.b2b=1200 + cscore=cscore+300*min(6+P.stat.pc,10) + else + cscore=cscore+626 + end + P.stat.pc=P.stat.pc+1 + P.lastClear=P.cur.id*10+5 else + P:showText(text.C,0,-80,50,"fly") + send=send+2 + exblock=exblock+2 + sendTime=sendTime+60 cscore=cscore+626 + P.stat.c=P.stat.c+1 + P.lastClear=cc end - P.stat.pc=P.stat.pc+1 - P.lastClear=P.cur.id*10+5 if P.human then - SFX.play("perfectclear") + SFX.play("clear") VOICE("pc",CHN) end end @@ -1698,7 +1732,7 @@ local function gameOver() end if p<10 then if p==0 then - P:showText(text.newRecord,0,-100,100,"beat",.5) + P:showTextF(text.newRecord,0,-100,100,"beat",.5) end D.date=os.date("%Y/%m/%d %H:%M") ins(L,p+1,D) @@ -1748,9 +1782,9 @@ function player.win(P,result) end newTask(Event_task.finish,P) if curMode.id=="custom_puzzle"then - P:showText(text.win,0,0,90,"beat",.4) + P:showTextF(text.win,0,0,90,"beat",.4) else - P:showText(text.win,0,0,90,"beat",.5,.2) + P:showTextF(text.win,0,0,90,"beat",.5,.2) end if P.human then gameOver() @@ -1779,7 +1813,7 @@ function player.lose(P) if modeEnv.royaleMode then P:changeAtk() P.modeData.event=#players.alive+1 - P:showText(P.modeData.event,0,-120,60,"appear",1,12) + P:showTextF(P.modeData.event,0,-120,60,"appear",1,12) P.strength=0 if P.lastRecv then local A,i=P,0 @@ -1816,7 +1850,7 @@ function player.lose(P) end end P.gameEnv.keepVisible=P.gameEnv.visible~="show" - P:showText(text.lose,0,0,90,"appear",.5,.2) + P:showTextF(text.lose,0,0,90,"appear",.5,.2) if P.human then gameResult="lose" SFX.play("fail") @@ -1917,7 +1951,7 @@ function player.act.hardDrop(P) elseif P.control and P.waiting==-1 then if P.curY~=P.y_img then if P.gameEnv.dropFX then - P:createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1) + P:createDropFX(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1) end P.curY=P.y_img P.spinLast=false @@ -1969,7 +2003,7 @@ function player.act.insLeft(P,auto) while not P:ifoverlap(P.cur.bk,P.curX-1,P.curY)do P.curX=P.curX-1 if P.gameEnv.dropFX then - P:createShade(P.curX+P.c,P.curY+P.r-1,P.curX+P.c,P.curY) + P:createDropFX(P.curX+P.c,P.curY+P.r-1,P.curX+P.c,P.curY) end P:freshgho() end @@ -1991,7 +2025,7 @@ function player.act.insRight(P,auto) while not P:ifoverlap(P.cur.bk,P.curX+1,P.curY)do P.curX=P.curX+1 if P.gameEnv.dropFX then - P:createShade(P.curX-1,P.curY+P.r-1,P.curX-1,P.curY) + P:createDropFX(P.curX-1,P.curY+P.r-1,P.curX-1,P.curY) end P:freshgho() end @@ -2010,7 +2044,7 @@ end function player.act.insDown(P) if P.curY~=P.y_img then if P.gameEnv.dropFX then - P:createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1) + P:createDropFX(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1) end if P.gameEnv.shakeFX then P.fieldOff.vy=P.gameEnv.shakeFX*.5 @@ -2094,7 +2128,7 @@ function newDemoPlayer(id,x,y,size) atk=0,send=0,recv=0,pend=0, clear_1=0,clear_2=0,clear_3=0,clear_4=0, spin_0=0,spin_1=0,spin_2=0,spin_3=0, - pc=0,b2b=0,b3b=0, + pc=0,c=0,b2b=0,b3b=0, } P.modeData={point=0,event=0,counter=0} P.keyTime={}P.keySpeed=0 @@ -2111,6 +2145,7 @@ function newDemoPlayer(id,x,y,size) quickR=true,swap=true, ghost=setting.ghost,center=setting.center, smooth=setting.smooth,grid=setting.grid, + text=setting.text, lockFX=setting.lockFX,dropFX=setting.dropFX, shakeFX=setting.shakeFX, @@ -2122,7 +2157,7 @@ function newDemoPlayer(id,x,y,size) ospin=true, sequence="bag7", face={0,0,0,0,0,0,0}, - skin={1,5,2,8,10,3,7}, + skin=setting.skin, pushSpeed=3, block=true, @@ -2154,15 +2189,8 @@ function newDemoPlayer(id,x,y,size) P.spinSeq=0 P.ctrlCount=0 - local bag1={1,2,3,4,5,6,7} - for _=1,7 do - P:getNext(rem(bag1,rnd(#bag1))) - end P.newNext=freshMethod.bag7 - if ENV.sequence==1 then P.bag={} - elseif ENV.sequence==2 then P.his={}for i=1,4 do P.his[i]=P.next.id[i+3]end - elseif ENV.sequence==3 then - end + P:newNext() P.human=false P.AI_mode="CC" @@ -2202,7 +2230,7 @@ function newDemoPlayer(id,x,y,size) P.dust=clearDust:clone() P.dust:start() - P:freshNext() + P:popNext() end function newPlayer(id,x,y,size,AIdata) players[id]={id=id} @@ -2239,7 +2267,7 @@ function newPlayer(id,x,y,size,AIdata) atk=0,send=0,recv=0,pend=0, clear_1=0,clear_2=0,clear_3=0,clear_4=0, spin_0=0,spin_1=0,spin_2=0,spin_3=0, - pc=0,b2b=0,b3b=0, + pc=0,c=0,b2b=0,b3b=0, }--Current gamestat P.modeData={point=0,event=0,counter=0}--data use by mode P.keyTime={}for i=1,10 do P.keyTime[i]=-1e5 end P.keySpeed=0 @@ -2281,33 +2309,11 @@ function newPlayer(id,x,y,size,AIdata) P.ctrlCount=0--key press time,for finesse check P.his={rnd(7),rnd(7),rnd(7),rnd(7)} - local s=ENV.sequence - if s=="bag7"or s=="his4"then - local bag1={1,2,3,4,5,6,7} - for _=1,7 do - P:getNext(rem(bag1,rnd(#bag1))) - end - elseif s=="rnd"then - for _=1,6 do - local r=rnd(7) - P:getNext(r) - end - elseif s=="drought1"then - local bag1={1,2,3,4,5,6} - for _=1,6 do - P:getNext(rem(bag1,rnd(#bag1))) - end - elseif s=="drought2"then - local bag1={1,2,3,4,6,6} - for _=1,6 do - P:getNext(rem(bag1,rnd(#bag1))) - end - end - P.newNext=freshMethod[ENV.sequence] - if ENV.sequence==1 then P.bag={}--Bag7 - elseif ENV.sequence==2 then P.his={}for i=1,4 do P.his[i]=P.next.id[i+3]end--History4 - elseif ENV.sequence==3 then--Pure random + if ENV.sequence~="none"then + while #P.next35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"fullscreen"), - fullscreen=newSwitch(990,180,40,SETval("fullscreen"),function() + frame= newSlider(310,620,373,10,35,nil,function()return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"text"), + text= newSwitch(990,180,35,SETval("text"),SETrev("text"),nil,"fullscreen"), + fullscreen=newSwitch(990,260,35,SETval("fullscreen"),function() setting.fullscreen=not setting.fullscreen love.window.setFullscreen(setting.fullscreen) - if not setting.fullscreen then - love.resize(love.graphics.getWidth(),love.graphics.getHeight()) - end + love.resize(love.graphics.getWidth(),love.graphics.getHeight()) end,nil,"bg"), - bg= newSwitch(990,250,35,SETval("bg"),SETrev("bg"),nil,"bgspace"), - bgspace=newSwitch(990,330,35,SETval("bgspace"),function() + bg= newSwitch(990,330,35,SETval("bg"),SETrev("bg"),nil,"bgspace"), + bgspace=newSwitch(990,410,35,SETval("bgspace"),function() setting.bgspace=not setting.bgspace if setting.bgspace then space.new() @@ -308,32 +307,32 @@ local Widget={ setting_skin={ prev= newButton(700,100,140,100,C.white,50,function()skin.prevSet()end), next= newButton(860,100,140,100,C.white,50,function()skin.nextSet()end), - prev1= newButton(125,240,90,65,C.white,30,prevSkin(1)), - prev2= newButton(265,240,90,65,C.white,30,prevSkin(2)), - prev3= newButton(405,240,90,65,C.white,30,prevSkin(3)), - prev4= newButton(545,240,90,65,C.white,30,prevSkin(4)), - prev5= newButton(685,240,90,65,C.white,30,prevSkin(5)), - prev6= newButton(825,240,90,65,C.white,30,prevSkin(6)), - prev7= newButton(965,240,90,65,C.white,30,prevSkin(7)), + prev1= newButton(130,230,90,65,C.white,30,prevSkin(1)), + prev2= newButton(270,230,90,65,C.white,30,prevSkin(2)), + prev3= newButton(410,230,90,65,C.white,30,prevSkin(3)), + prev4= newButton(550,230,90,65,C.white,30,prevSkin(4)), + prev5= newButton(690,230,90,65,C.white,30,prevSkin(5)), + prev6= newButton(830,230,90,65,C.white,30,prevSkin(6)), + prev7= newButton(970,230,90,65,C.white,30,prevSkin(7)), - next1= newButton(125,460,90,65,C.white,30,nextSkin(1)), - next2= newButton(265,460,90,65,C.white,30,nextSkin(2)), - next3= newButton(405,460,90,65,C.white,30,nextSkin(3)), - next4= newButton(545,460,90,65,C.white,30,nextSkin(4)), - next5= newButton(685,460,90,65,C.white,30,nextSkin(5)), - next6= newButton(825,460,90,65,C.white,30,nextSkin(6)), - next7= newButton(965,460,90,65,C.white,30,nextSkin(7)), + next1= newButton(130,450,90,65,C.white,30,nextSkin(1)), + next2= newButton(270,450,90,65,C.white,30,nextSkin(2)), + next3= newButton(410,450,90,65,C.white,30,nextSkin(3)), + next4= newButton(550,450,90,65,C.white,30,nextSkin(4)), + next5= newButton(690,450,90,65,C.white,30,nextSkin(5)), + next6= newButton(830,450,90,65,C.white,30,nextSkin(6)), + next7= newButton(970,450,90,65,C.white,30,nextSkin(7)), - spin1= newButton(125,550,90,65,C.white,30,nextDir(1)), - spin2= newButton(265,550,90,65,C.white,30,nextDir(2)), - spin3= newButton(405,550,90,65,C.white,30,nextDir(3)), - spin4= newButton(545,550,90,65,C.white,30,nextDir(4)), - spin5= newButton(685,550,90,65,C.white,30,nextDir(5)), - --spin6=newButton(825,550,90,65,C.white,30,nextDir(6)),--O cannot rotate - spin7= newButton(965,550,90,65,C.white,30,nextDir(7)), + spin1= newButton(130,540,90,65,C.white,30,nextDir(1)), + spin2= newButton(270,540,90,65,C.white,30,nextDir(2)), + spin3= newButton(410,540,90,65,C.white,30,nextDir(3)), + spin4= newButton(550,540,90,65,C.white,30,nextDir(4)), + spin5= newButton(690,540,90,65,C.white,30,nextDir(5)), + --spin6=newButton(825,540,90,65,C.white,30,nextDir(6)),--cannot rotate O + spin7= newButton(970,540,90,65,C.white,30,nextDir(7)), - skinR= newButton(200,650,180,80,C.lightPurple,35,function()setting.skin={1,5,2,8,10,3,7}SFX.play("hold")end), - faceR= newButton(480,650,180,80,C.lightRed,35,function()setting.face={0,0,0,0,0,0,0}SFX.play("rotate")end), + skinR= newButton(200,640,220,80,C.lightPurple,35,function()setting.skin={1,5,2,8,10,3,7}SFX.play("rotate")end), + faceR= newButton(480,640,220,80,C.lightRed,35,function()setting.face={0,0,0,0,0,0,0}SFX.play("hold")end), back= newButton(1140,650,200,80,C.white,40,scene.back), }, setting_touch={