调整ai尤其是cc相关代码,捕获窒息的时候可能会有实心行错误并让cc进入自杀模式

This commit is contained in:
MrZ626
2021-08-21 23:43:12 +08:00
parent d818e697e9
commit 5b5afec84d
3 changed files with 67 additions and 32 deletions

View File

@@ -187,16 +187,20 @@ function update.alive(P,dt)
local C=P.AI_keys
P.AI_delay=P.AI_delay-1
if not C[1]then
if P.AI_thread and not pcall(P.AI_thread)then
P.AI_thread=false
if P.AI_thread then
if not pcall(P.AI_thread)then
P.AI_thread=nil
end
else
P:act_hardDrop()
end
elseif P.AI_delay<=0 then
P:pressKey(C[1])P:releaseKey(C[1])
if P.AI_mode~='CC'or C[1]>3 then
P.AI_delay=P.AI_delay0*2
else
P.AI_delay=P.AI_delay0*.5
end
P:pressKey(C[1])P:releaseKey(C[1])
rem(C,1)
end
end