From 91b2e0b9dbdddd7ca6d081718aa2f98ac54b6b47 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 31 Aug 2020 16:41:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E5=80=92=E8=AE=A1=E6=97=B6=E9=98=B6?= =?UTF-8?q?=E6=AE=B5=E6=8C=89=E4=B8=80=E4=BA=9B=E6=8C=89=E9=94=AE=E4=BC=9A?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player.lua | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/parts/player.lua b/parts/player.lua index cd62dca4..714dd480 100644 --- a/parts/player.lua +++ b/parts/player.lua @@ -2510,19 +2510,21 @@ function player.act.insRight(P,auto) end end function player.act.insDown(P) - if P.curY>P.imgY and P.cur then + if P.cur and P.curY>P.imgY then if P.gameEnv.dropFX and P.gameEnv.block and P.curY-P.imgY-P.r>-1 then P:creatDropFX(P.curX,P.curY-1,P.c,P.curY-P.imgY-P.r+1) end if P.gameEnv.shakeFX then P.fieldOff.vy=P.gameEnv.shakeFX*.5 end - P.curY,P.lockDelay,P.spinLast=P.imgY,P.gameEnv.lock,false + P.curY=P.imgY + P.lockDelay=P.gameEnv.lock + P.spinLast=false P:freshBlock(true,true) end end function player.act.down1(P) - if P.curY>P.imgY and P.cur then + if P.cur and P.curY>P.imgY then if P.gameEnv.moveFX and P.gameEnv.block then P:createMoveFX("down") end @@ -2532,27 +2534,25 @@ function player.act.down1(P) end end function player.act.down4(P) - for _=1,4 do - if P.curY>P.imgY and P.cur then - P.curY=P.curY-1 - P:freshBlock(true,true) - P.spinLast=false - else - return + if P.cur and P.curY>P.imgY then + local y=max(P.cur-4,P.imgY) + if P.gameEnv.dropFX and P.gameEnv.block and P.curY-y-P.r>-1 then + P:creatDropFX(P.curX,P.curY-1,P.c,P.curY-y-P.r+1) end + P.curY=y + P:freshBlock(true,true) + P.spinLast=false end end function player.act.down10(P) - if P.cur then - for _=1,10 do - if P.curY>P.imgY then - P.curY=P.curY-1 - P:freshBlock(true,true) - P.spinLast=false - else - return - end + if P.cur and P.curY>P.imgY then + local y=max(P.cur-10,P.imgY) + if P.gameEnv.dropFX and P.gameEnv.block and P.curY-y-P.r>-1 then + P:creatDropFX(P.curX,P.curY-1,P.c,P.curY-y-P.r+1) end + P.curY=y + P:freshBlock(true,true) + P.spinLast=false end end function player.act.dropLeft(P)