整理代码,保留cc的原始dest数据
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user