From d3cc3b16bbedf7ec42fa308bdd5785979f44660b Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 27 Feb 2021 03:08:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0deepDrop=E7=89=B9=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/player.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/parts/player/player.lua b/parts/player/player.lua index c749cf24..5ef6ad4e 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -1866,8 +1866,9 @@ function Player.act_hardDrop(P) end end function Player.act_softDrop(P) + local ENV=P.gameEnv if P.keyPressing[9]then - if P.gameEnv.swap then + if ENV.swap then P:changeAtkMode(4) end else @@ -1877,12 +1878,16 @@ function Player.act_softDrop(P) P.curY=P.curY-1 P:freshBlock("fresh") P.spinLast=false - elseif P.gameEnv.deepDrop then + elseif ENV.deepDrop then + local CB=P.cur.bk local y=P.curY-1 - while P:ifoverlap(P.cur.bk,P.curX,y)and y>0 do + while P:ifoverlap(CB,P.curX,y)and y>0 do y=y-1 end if y>0 then + if ENV.dropFX and ENV.block and P.curY-y-#CB>-1 then + P:createDropFX(P.curX,P.curY-1,#CB[1],P.curY-y-#CB+1) + end P.curY=y P:freshBlock("move") SFX.play("swipe")