From 74bc1a254473f095889e222cdb666cdad36d63fc Mon Sep 17 00:00:00 2001 From: MrZ_26 Date: Sat, 18 Jul 2020 01:05:10 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D=EF=BC=8C=E6=B0=B4?= =?UTF-8?q?=E5=8D=B0=E4=BF=AE=E6=94=B9=EF=BC=8C20G=E4=B8=8A=E7=BA=A7?= =?UTF-8?q?=E8=B0=83=E5=B9=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/init.lua | 42 ++++++++++++++++++++++++++-------------- Zframework/languages.lua | 8 ++++---- Zframework/paint.lua | 9 +++------ Zframework/scene.lua | 3 ++- Zframework/timer.lua | 2 +- modes/master_adavnce.lua | 14 +++++++------- modes/sprint_1000.lua | 8 ++++---- parts/player.lua | 6 ++++++ parts/updateLog.lua | 16 +++++++-------- 9 files changed, 63 insertions(+), 45 deletions(-) diff --git a/Zframework/init.lua b/Zframework/init.lua index 8871c825..bee7fefb 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -455,21 +455,13 @@ function keyDown.draw(key) end function mouseDown.setting_sound(x,y,k) - if x>780 and x<980 and y>470 and sceneTemp.jump==0 then - sceneTemp.jump=10 - local t=Timer()-sceneTemp.last + local s=sceneTemp + if x>780 and x<980 and y>470 and s.jump==0 then + s.jump=10 + local t=Timer()-s.last if t>1 then VOC.play((t<1.5 or t>15)and"doubt"or rnd()<.8 and"happy"or"egg") - sceneTemp.last=Timer() - if rnd()<.0626 then - for name,M in next,Modes do - if not modeRanks[name]then - modeRanks[name]=M.score and 0 or 6 - end - end - FILE.saveUnlock() - TEXT.show("DEVModes:UNLOCKALL",640,360,50,"stretch",.6) - end + s.last=Timer() end end end @@ -734,8 +726,10 @@ function keyDown.staff(key,RESET) TEXT.show("What are you up to?",640,200,40,"appear",.5) elseif sceneTemp.ct==10 then TEXT.show("Stop what you are doing.",640,200,40,"flicker",.5) - elseif sceneTemp.ct==20 then + elseif sceneTemp.ct==16 then TEXT.show("RESET ALL DATA?",640,200,40,"appear",.3,.2) + elseif sceneTemp.ct==20 then + TEXT.show("SURE?????",640,200,40,"beat",.3,.2) elseif sceneTemp.ct==26 then local L=love.filesystem.getDirectoryItems("") for i=1,#L do @@ -762,6 +756,26 @@ function touchDown.staff(id,x,y) end end +function keyDown.stat(key) + if key=="u"and kb.isDown("lshift","rshift")then + touchDown.stat() + end +end +function touchDown.stat(id,x,y) + local s=sceneTemp + s.count=s.count+1 + if rnd()<.0626 and s.count>26 then + for name,M in next,Modes do + if not modeRanks[name]then + modeRanks[name]=M.score and 0 or 6 + end + end + FILE.saveUnlock() + TEXT.show("DEV:\85\78\76\79\67\75\65\76\76",640,360,60,"stretch",.6) + SFX.play("clear_4") + end +end + function wheelMoved.history(x,y) wheelScroll(y) end diff --git a/Zframework/languages.lua b/Zframework/languages.lua index 5859b2a8..b6685d0b 100644 --- a/Zframework/languages.lua +++ b/Zframework/languages.lua @@ -2,7 +2,7 @@ local langList={ { anykey="按任意键继续", newVersion="检测到更新!存档格式可能更新,设置已重置", - marking="游戏作者:MrZ_26\n任何视频/直播不得出现此水印\n任何视频内声明无效", + marking="游戏作者:MrZ_26\n任何视频/直播不得出现此水印\n任何转述声明无效", lang="中文", atkModeName={"随机","徽章","击杀","反击"}, royale_remain=function(n)return"剩余 "..n.." 名玩家"end, @@ -443,7 +443,7 @@ local langList={ { anykey="按任意键继续", newVersion="检测到更新!存档格式可能更新,设置已重置", - marking="游戏作者:MrZ_26\n任何视频/直播不得出现此水印\n任何视频内声明无效", + marking="游戏作者:MrZ_26\n任何视频/直播不得出现此水印\n任何转述声明无效", lang="全中文", atkModeName={"随机","徽章","击杀","反击"}, royale_remain=function(n)return"剩余 "..n.." 名玩家"end, @@ -881,7 +881,7 @@ local langList={ { anykey="Press any button", newVersion="Updating detected! Save format may have been updated, settings reseted", - marking="Author:MrZ_26\nIllegal recording if see this\nAny explanation invalid", + marking="Game Author:MrZ_26\nIllegal recording if see this\nAny explanation invalid", lang="English", atkModeName={"Random","Badges","K.O.s","Attackers"}, royale_remain=function(n)return n.." Players Remaining"end, @@ -1308,7 +1308,7 @@ local langList={ { anykey="↓□↓", newVersion="&!!! ___/_?_ R", - marking="Author:MrZ_26\nIllegal recording if see this\nAny explanation invalid", + marking="Game Author:MrZ_26\nIllegal recording if see this\nAny explanation invalid", lang="?????", atkModeName={"?","( )","!","←→"}, royale_remain=function(n)return n.."~"end, diff --git a/Zframework/paint.lua b/Zframework/paint.lua index b0f8fe3d..c58af3b5 100644 --- a/Zframework/paint.lua +++ b/Zframework/paint.lua @@ -404,12 +404,9 @@ end function Pnt.play() if marking then setFont(26) - local x=Timer()*46%1680-200 - gc.setColor(1,1,1,abs(.26*(1-x/640))) - mStr(text.marking,x,260+62*sin(Timer())) - -- gc.setColor(1,1,1,.0626) - -- mStr(text.marking,260,62+26*sin(Timer())) - -- mStr(text.marking,1100,460+62*sin(Timer()*1.2)) + local t=Timer() + gc.setColor(1,1,1,.2+.1*(sin(3*t)+sin(2.6*t))) + mStr(text.marking,190,60+26*sin(t)) end for p=1,#players do players[p]:draw() diff --git a/Zframework/scene.lua b/Zframework/scene.lua index be1c8fa6..f2e4b4db 100644 --- a/Zframework/scene.lua +++ b/Zframework/scene.lua @@ -224,6 +224,7 @@ end function sceneInit.stat() local S=stat sceneTemp={ + count=0, chart={ A1=S.spin,A2=S.clear, X1=S.spin_S,X2=S.clear_S, @@ -241,7 +242,7 @@ function sceneInit.stat() format("%d/%.3f%%",S.extraPiece,100*max(1-S.extraRate/S.piece,0)), S.b2b.." "..S.b3b, S.pc.." "..S.hpc, - } + }, } for i=1,11 do sceneTemp.item[i]=text.stat[i].."\t"..sceneTemp.item[i] diff --git a/Zframework/timer.lua b/Zframework/timer.lua index 2a075891..aa384774 100644 --- a/Zframework/timer.lua +++ b/Zframework/timer.lua @@ -20,7 +20,7 @@ function Tmr.load() elseif S.phase==5 then local m=Modes[S.cur]--mode template local M=require("modes/"..m.name)--mode file - Modes[m.name]=M + Modes[m.name],Modes[S.cur]=M for k,v in next,m do M[k]=v end diff --git a/modes/master_adavnce.lua b/modes/master_adavnce.lua index b2688667..e7520f73 100644 --- a/modes/master_adavnce.lua +++ b/modes/master_adavnce.lua @@ -63,16 +63,16 @@ return{ getRank=function(P) local S=P.modeData.point if S==500 then - local L=P.stat.clear_S[4] + local T=P.modeData.time return - L>=30 and 5 or - L>=25 and 4 or - 3 + T<=118 and 5 or + T<=148 and 4 or + T<=183 and 3 or + 2 else return - S>=426 and 3 or - S>=326 and 2 or - S>=226 and 1 or + S>=300 and 2 or + S>=100 and 1 or S>=50 and 0 end end, diff --git a/modes/sprint_1000.lua b/modes/sprint_1000.lua index 0874d17e..61a32f30 100644 --- a/modes/sprint_1000.lua +++ b/modes/sprint_1000.lua @@ -30,10 +30,10 @@ return{ local T=P.stat.time return T<=626 and 5 or - T<=1000 and 4 or - T<=1400 and 3 or - T<=2060 and 2 or - T<=2600 and 1 or + T<=888 and 4 or + T<=1140 and 3 or + T<=1406 and 2 or + T<=1626 and 1 or 0 end, } \ No newline at end of file diff --git a/parts/player.lua b/parts/player.lua index 93c96dbb..acc8d2cd 100644 --- a/parts/player.lua +++ b/parts/player.lua @@ -1935,6 +1935,9 @@ function player.win(P,result) if P.human then gameOver() TASK.new(TICK.autoPause,{0}) + if marking then + P:showTextF(text.marking,0,-226,22,"appear",.4,.0626) + end end P:newTask(TICK.finish) end @@ -2015,6 +2018,9 @@ function player.lose(P) gameOver() P:newTask(#players>1 and TICK.lose or TICK.finish) TASK.new(TICK.autoPause,{0}) + if marking then + P:showTextF(text.marking,0,-226,22,"appear",.4,.0626) + end else P:newTask(TICK.lose) end diff --git a/parts/updateLog.lua b/parts/updateLog.lua index 5feabe2c..9835e776 100644 --- a/parts/updateLog.lua +++ b/parts/updateLog.lua @@ -56,22 +56,19 @@ Future outlook: 2048 (with next (with deadly mode)) mine sweeper tank battle - time-based-rank for master advanced mode(1:58/2:28/3:03/300P/100P) 简易防沉迷系统 - full-key control - dragging control "next" SFX - new layout of player (rectangle so stupid) + full-key control + touch-drag control + cool backgrounds + 'Encrypt'(compile to byte code) better drop FX 60+ fps supporting in-game document - lang setting page game recording new widgets (joystick etc.) splashing block - cool backgrounds more graphic FXs & 3D features & animations - Encrypt source code (compile to byte code) network game new AI: task-Z @@ -82,12 +79,15 @@ Future outlook: many new tips more powerful watermark die animation in non-royale mode + better in-game layout changed: mode name shown at the top of screen faster & harder attacker-ultimate + time-based-rank for master-advanced little easier to get S in PC challenge (easy mode) easier to get S in infinite mode, c4w, PC - harder to unlock sprint 400/1000 + harder to unlock sprint-400/1000 + harder to get high rank of sprint-1000 code: file sorted task system rewrited, now perfect (maybe)