再调整ZRS(修改过滤条件,最终位移距离不超过√5并且禁止踢墙方向和水平偏移反向)
This commit is contained in:
@@ -503,48 +503,51 @@ 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
|
||||||
if P.gameEnv.moveFX and P.gameEnv.block then
|
local x,y=ix+kick[1]+dx,iy+kick[2]+dy
|
||||||
P:createMoveFX()
|
if not P:ifoverlap(icb,x,y)then
|
||||||
end
|
if P.gameEnv.moveFX and P.gameEnv.block then
|
||||||
P.curX,P.curY,cur.dir=x,y,idir
|
P:createMoveFX()
|
||||||
cur.sc,cur.bk=isc,icb
|
|
||||||
P.spinLast=test==2 and 0 or 1
|
|
||||||
|
|
||||||
local t=P.freshTime
|
|
||||||
if not ifpre then
|
|
||||||
P:freshBlock('move')
|
|
||||||
end
|
|
||||||
if kick[2]+dy>0 and P.freshTime==t and P.curY~=P.imgY then
|
|
||||||
P.freshTime=P.freshTime-1
|
|
||||||
end
|
|
||||||
|
|
||||||
if P.sound then
|
|
||||||
local sfx
|
|
||||||
if ifpre then
|
|
||||||
sfx='prerotate'
|
|
||||||
elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then
|
|
||||||
sfx='rotatekick'
|
|
||||||
if P.gameEnv.shakeFX then
|
|
||||||
if d==1 or d==3 then
|
|
||||||
P.fieldOff.va=P.fieldOff.va+(2-d)*P.gameEnv.shakeFX*6e-3
|
|
||||||
else
|
|
||||||
P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
sfx='rotate'
|
|
||||||
end
|
end
|
||||||
SFX.play(sfx,nil,P:getCenterX()*.15)
|
P.curX,P.curY,cur.dir=x,y,idir
|
||||||
|
cur.sc,cur.bk=isc,icb
|
||||||
|
P.spinLast=test==2 and 0 or 1
|
||||||
|
|
||||||
|
local t=P.freshTime
|
||||||
|
if not ifpre then
|
||||||
|
P:freshBlock('move')
|
||||||
|
end
|
||||||
|
if kick[2]+dy>0 and P.freshTime==t and P.curY~=P.imgY then
|
||||||
|
P.freshTime=P.freshTime-1
|
||||||
|
end
|
||||||
|
|
||||||
|
if P.sound then
|
||||||
|
local sfx
|
||||||
|
if ifpre then
|
||||||
|
sfx='prerotate'
|
||||||
|
elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then
|
||||||
|
sfx='rotatekick'
|
||||||
|
if P.gameEnv.shakeFX then
|
||||||
|
if d==1 or d==3 then
|
||||||
|
P.fieldOff.va=P.fieldOff.va+(2-d)*P.gameEnv.shakeFX*6e-3
|
||||||
|
else
|
||||||
|
P.fieldOff.va=P.fieldOff.va+P:getCenterX()*P.gameEnv.shakeFX*3e-3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
sfx='rotate'
|
||||||
|
end
|
||||||
|
SFX.play(sfx,nil,P:getCenterX()*.15)
|
||||||
|
end
|
||||||
|
P.stat.rotate=P.stat.rotate+1
|
||||||
|
return
|
||||||
end
|
end
|
||||||
P.stat.rotate=P.stat.rotate+1
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user