整理代码,保留cc的原始dest数据
This commit is contained in:
@@ -285,16 +285,11 @@ return{
|
|||||||
repeat
|
repeat
|
||||||
YIELD()
|
YIELD()
|
||||||
success,result,dest,hold,move=pcall(CC.getMove,P.AI_bot)
|
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 not success then break end
|
||||||
if result==2 then
|
if result==2 then
|
||||||
ins(keys,6)
|
ins(keys,6)
|
||||||
elseif result==0 then
|
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
|
P.AI_dest=dest
|
||||||
if hold then keys[1]=8 end--Hold
|
if hold then keys[1]=8 end--Hold
|
||||||
while move[1]do
|
while move[1]do
|
||||||
|
|||||||
@@ -511,7 +511,7 @@ function Player.lock(P)
|
|||||||
local x=P.curX+j-1
|
local x=P.curX+j-1
|
||||||
if dest then
|
if dest then
|
||||||
for k=1,#dest do
|
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)
|
rem(dest,k)
|
||||||
goto success
|
goto success
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user