From 43d747d421b4a55f7d0ac5f715d5c06fa862a150 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 18 Oct 2020 01:51:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=BA=8F=E5=88=97=E6=A8=A1=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?AI=E5=86=B2=E7=AA=81=E6=9D=A1=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/languages.lua | 17 +++++++++++------ Zframework/widgetList.lua | 6 +++--- parts/scenes.lua | 26 +++++++++++++++----------- 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/Zframework/languages.lua b/Zframework/languages.lua index a112b3cf..fbfa41cd 100644 --- a/Zframework/languages.lua +++ b/Zframework/languages.lua @@ -38,6 +38,7 @@ local langList={ ai_fixed="不能同时开启AI和固定序列", ai_prebag="不能同时开启AI和自定义序列", + ai_mission="不能同时开启AI和自定义任务", settingSaved="设置已保存", settingSavingError="设置保存失败:", keyMapSaved="键位设置已保存", @@ -456,7 +457,7 @@ local langList={ back="返回", }, account={ - username="测试", + title="账户", }, minigame={ p15="15 Puzzle", @@ -620,6 +621,7 @@ local langList={ ai_fixed="不能同时开启电脑玩家和固定序列", ai_prebag="不能同时开启电脑玩家和自定义序列", + ai_mission="不能同时开启电脑玩家和自定义任务", settingSaved="设置已保存", settingSavingError="设置保存失败:", keyMapSaved="键位设置已保存", @@ -631,7 +633,7 @@ local langList={ recSavingError="纪录保存失败:", switchSpawnSFX="请开启方块出生音效", getRank="本局评级:", - ranks={"D","C","B","A","S"}, + ranks={"菜","可","好","强","您"}, needRestart="重新开始以生效", copySuccess="已复制到剪切板", @@ -1040,7 +1042,7 @@ local langList={ back="返回", }, account={ - username="test", + title="账户", }, minigame={ p15="15 Puzzle", @@ -1204,6 +1206,7 @@ local langList={ ai_fixed="The AI is incompatible with fixed sequences.", ai_prebag="The AI is incompatible with custom sequences.", + ai_mission="The AI is incompatible with custom missions.", settingSaved="Settings Saved", settingSavingError="Failed to save settings:", keyMapSaved="Key settings saved", @@ -1614,7 +1617,7 @@ local langList={ back="Back", }, account={ - username="test", + title="Account", }, minigame={ p15="15 Puzzle", @@ -1785,6 +1788,7 @@ local langList={ ai_fixed="X!!!", ai_prebag="X!!!", + ai_mission="X!!!", settingSaved="~~~", settingSavingError="x!:", keyMapSaved="~~~", @@ -2202,7 +2206,7 @@ local langList={ back="X", }, account={ - username="test", + title="@_@", }, minigame={ p15="15 Puzzle", @@ -2364,6 +2368,7 @@ local langList={ ai_fixed="不能同时开启AI和固定序列", ai_prebag="不能同时开启AI和自定义序列", + ai_mission="不能同时开启电脑玩家和自定义任务", settingSaved="设置已保存", settingSavingError="设置保存失败:", keyMapSaved="键位设置已保存", @@ -2783,7 +2788,7 @@ local langList={ back="返回", }, account={ - username="test", + title="账户", }, minigame={ p15="15 Puzzle", diff --git a/Zframework/widgetList.lua b/Zframework/widgetList.lua index 6029f598..1b36a57a 100644 --- a/Zframework/widgetList.lua +++ b/Zframework/widgetList.lua @@ -181,8 +181,8 @@ local Widgets={ customGame={ newText({name="title", x=600,y=5,font=80,align="R"}), newText({name="subTitle", x=610,y=50,font=35,align="L",color="grey"}), - newText({name="defSeq", x=450,y=550,color="grey",hide=function()return preBag[1]end}), - newText({name="noMsn", x=730,y=550,color="grey",hide=function()return preMission[1]end}), + newText({name="defSeq", x=330,y=550,align="L",color="grey",hide=function()return preBag[1]end}), + newText({name="noMsn", x=610,y=550,align="L",color="grey",hide=function()return preMission[1]end}), --Basic newSelector({name="drop", x=170, y=150,w=220,color="orange", list=CUSlist.drop, disp=CUSval("drop"),code=CUSsto("drop")}), @@ -660,7 +660,7 @@ local Widgets={ newButton({name="back", x=640, y=620,w=200,h=80, font=35,code=BACK}), }, account={ - newText({name="username", x=100,y=100,font=60}), + newText({name="title", x=80,y=50,font=70,align="L"}), }, minigame={ newButton({name="p15", x=240, y=250,w=350,h=120,font=40,code=goScene("p15")}), diff --git a/parts/scenes.lua b/parts/scenes.lua index 66a5b9cb..ef91a9e8 100644 --- a/parts/scenes.lua +++ b/parts/scenes.lua @@ -753,6 +753,7 @@ do--mode end end do--customGame + local customEnv=customEnv function sceneInit.customGame() destroyPlayers() BG.set(customEnv.bg) @@ -762,17 +763,19 @@ do--customGame function keyDown.customGame(key) if key=="return"or key=="return2"then if customEnv.opponent>0 then - if customEnv.opponent>5 and customEnv.seq=="fixed"then + if customEnv.opponent>5 and customEnv.sequence=="fixed"then LOG.print(text.ai_fixed,"warn") return elseif customEnv.opponent>0 and #preBag>0 then LOG.print(text.ai_prebag,"warn") return + elseif customEnv.opponent>0 and #preMission>0 then + LOG.print(text.ai_mission,"warn") + return end end SCN.push() - - loadGame(key=="return"and"custom_clear"or"custom_puzzle",true) + loadGame((key=="return2"or kb.isDown("lalt","lctrl","lshift"))and"custom_puzzle"or"custom_clear",true) elseif key=="f"then SCN.go("custom_field","swipeD") elseif key=="s"then @@ -847,19 +850,20 @@ do--customGame gc.pop() --Sequence + setFont(30) + gc.printf(customEnv.sequence,330,550,240,"right") + setFont(40) if #preBag>0 then - setFont(40) - gc.setColor(1,1,int(Timer()*3)%2) - gc.print("#",365,545) - gc.print(#preBag,390,545) + gc.setColor(1,1,int(Timer()*6.26)%2) + gc.print("#",330,545) + gc.print(#preBag,360,545) end --Sequence if #preMission>0 then - setFont(40) - gc.setColor(1,1,int(Timer()*3)%2) - gc.print("#",645,545) - gc.print(#preMission,670,545) + gc.setColor(1,customEnv.missionKill and 0 or 1,int(Timer()*6.26)%2) + gc.print("#",610,545) + gc.print(#preMission,640,545) end end end