From 1d64a6b7997ae88cbe1162ac640f1b3ca327aef6 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 24 Jul 2021 03:43:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E8=B0=83=E6=95=B4ZRS=EF=BC=88?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E6=9C=80=E7=BB=88=E4=BD=8D=E7=A7=BB=E8=B7=9D=E7=A6=BB=E4=B8=8D?= =?UTF-8?q?=E8=B6=85=E8=BF=87=E2=88=9A5=E5=B9=B6=E4=B8=94=E7=A6=81?= =?UTF-8?q?=E6=AD=A2=E8=B8=A2=E5=A2=99=E6=96=B9=E5=90=91=E5=92=8C=E6=B0=B4?= =?UTF-8?q?=E5=B9=B3=E5=81=8F=E7=A7=BB=E5=8F=8D=E5=90=91=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/kickList.lua | 75 ++++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/parts/kickList.lua b/parts/kickList.lua index 06a3b1d9..c88c815c 100644 --- a/parts/kickList.lua +++ b/parts/kickList.lua @@ -503,48 +503,51 @@ do while true do for test=1,#kickList do local kick=kickList[test] - local x,y=ix+kick[1]+dx,iy+kick[2]+dy if (dx==0 and dy==0 or kick[2]<=0)and + dx*kick[1]>=0 and math.abs(dx+kick[1])<=2 and - (P.freshTime>0 or kick[2]+dy<=0)and - not P:ifoverlap(icb,x,y) + ((dx+kick[1])^2+(dy+kick[2])^2)<=5 and + (P.freshTime>0 or kick[2]+dy<=0) then - if P.gameEnv.moveFX and P.gameEnv.block then - P:createMoveFX() - end - 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' + 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 + P:createMoveFX() 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 - P.stat.rotate=P.stat.rotate+1 - return end end