From 9714ba11139dc7dc1dad4e783b7f6d9c15372703 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 5 Mar 2021 17:34:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E4=BF=9D=E7=95=99cc=E7=9A=84=E5=8E=9F=E5=A7=8Bdest=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/ai.lua | 7 +------ parts/player/player.lua | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/parts/ai.lua b/parts/ai.lua index 786a3a06..37a5786e 100644 --- a/parts/ai.lua +++ b/parts/ai.lua @@ -285,16 +285,11 @@ return{ repeat YIELD() success,result,dest,hold,move=pcall(CC.getMove,P.AI_bot) - until not success or result == 0 or result == 2 + until not success or result==0 or result==2 if not success then break end if result==2 then ins(keys,6) elseif result==0 then - for i=1,#dest do - for j=1,#dest[i]do - dest[i][j]=dest[i][j]+1 - end - end P.AI_dest=dest if hold then keys[1]=8 end--Hold while move[1]do diff --git a/parts/player/player.lua b/parts/player/player.lua index b0655c87..00758114 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -511,7 +511,7 @@ function Player.lock(P) local x=P.curX+j-1 if dest then for k=1,#dest do - if x==dest[k][1]and y==dest[k][2]then + if x==dest[k][1]+1 and y==dest[k][2]+1 then rem(dest,k) goto success end