From dd8b73f5e8121c048f4cb880f0dcd53543e2b6b9 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 10 Nov 2020 20:00:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=AE=8C=E6=88=90=E7=9A=84bug=EF=BC=88=E7=94=A8?= =?UTF-8?q?=E4=BA=8E=E5=88=A4=E5=AE=9A=E7=9A=84=E5=8F=98=E9=87=8F=E8=B5=8B?= =?UTF-8?q?=E5=80=BC=E5=A4=AA=E6=99=9A=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player.lua | 70 ++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/parts/player.lua b/parts/player.lua index 89d008e1..29b318c8 100644 --- a/parts/player.lua +++ b/parts/player.lua @@ -2511,41 +2511,6 @@ do--player:drop()--Place piece end end - --Check clearing task - if P.curMission then - local t=ENV.mission[P.curMission] - local success - if t<5 then - if piece.row==t and(t==4 or not piece.special)then - success=true - end - elseif t<9 then - if piece.row==t-4 and piece.spin then - success=true - end - elseif t==9 then - if piece.pc then - success=true - end - elseif t<90 then - if piece.row==t%10 and piece.name==int(t/10)and piece.spin then - success=true - end - end - if success then - P.curMission=P.curMission+1 - SFX.play("reach") - if P.curMission>#ENV.mission then - P.curMission=nil - P:win("finish") - end - elseif ENV.missionKill then - P:showText(text.missionFailed,0,140,40,"flicker",.5) - SFX.play("finesseError_long",.6) - P:lose(true) - end - end - --SFX & Vibrate if P.sound then SFX.play(clearSFX[cc]or"clear_4") @@ -2599,6 +2564,41 @@ do--player:drop()--Place piece piece.atk,piece.exblock=atk,exblock piece.off,piece.send=off,send + --Check clearing task + if cc>0 and P.curMission then + local t=ENV.mission[P.curMission] + local success + if t<5 then + if piece.row==t and not piece.spin then + success=true + end + elseif t<9 then + if piece.row==t-4 and piece.spin then + success=true + end + elseif t==9 then + if piece.pc then + success=true + end + elseif t<90 then + if piece.row==t%10 and piece.name==int(t/10)and piece.spin then + success=true + end + end + if success then + P.curMission=P.curMission+1 + SFX.play("reach") + if P.curMission>#ENV.mission then + P.curMission=nil + P:win("finish") + end + elseif ENV.missionKill then + P:showText(text.missionFailed,0,140,40,"flicker",.5) + SFX.play("finesseError_long",.6) + P:lose(true) + end + end + --Update stat STAT.score=STAT.score+cscore STAT.piece=STAT.piece+1