再调整ZRS(修改过滤条件,最终位移距离不超过√5并且禁止踢墙方向和水平偏移反向)

This commit is contained in:
MrZ626
2021-07-24 03:43:55 +08:00
parent 84b5790ab2
commit 1d64a6b799

View File

@@ -503,13 +503,15 @@ do
while true do while true do
for test=1,#kickList do for test=1,#kickList do
local kick=kickList[test] local kick=kickList[test]
local x,y=ix+kick[1]+dx,iy+kick[2]+dy
if if
(dx==0 and dy==0 or kick[2]<=0)and (dx==0 and dy==0 or kick[2]<=0)and
dx*kick[1]>=0 and
math.abs(dx+kick[1])<=2 and math.abs(dx+kick[1])<=2 and
(P.freshTime>0 or kick[2]+dy<=0)and ((dx+kick[1])^2+(dy+kick[2])^2)<=5 and
not P:ifoverlap(icb,x,y) (P.freshTime>0 or kick[2]+dy<=0)
then then
local x,y=ix+kick[1]+dx,iy+kick[2]+dy
if not P:ifoverlap(icb,x,y)then
if P.gameEnv.moveFX and P.gameEnv.block then if P.gameEnv.moveFX and P.gameEnv.block then
P:createMoveFX() P:createMoveFX()
end end
@@ -547,6 +549,7 @@ do
return return
end end
end end
end
--Try release left/right, then softdrop, failed to rotate otherwise --Try release left/right, then softdrop, failed to rotate otherwise
if dx~=0 then if dx~=0 then