From 37a79c767caf6522d668d061b09db17456986dbe Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Thu, 4 Jan 2024 12:10:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5puyo=E7=9A=84actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/game/mechanicLib/puyo/actions.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/assets/game/mechanicLib/puyo/actions.lua b/assets/game/mechanicLib/puyo/actions.lua index 4832f32f..ea45c4e2 100644 --- a/assets/game/mechanicLib/puyo/actions.lua +++ b/assets/game/mechanicLib/puyo/actions.lua @@ -1,3 +1,5 @@ +local ceil=math.ceil + local function getCharge(charge,mode,SET) if mode=='reset' then return 0 @@ -123,7 +125,7 @@ actions.rotate180={ actions.softDrop={ press=function(P) P.downCharge=0 - if P.hand and (P.handY>P.ghostY or P.deathTimer) and P:moveDown() then + if P.hand and (P.handY>(P.ghostY or 1) or P.deathTimer) and P:moveDown() then P:playSound('move_down') end end, @@ -135,9 +137,13 @@ actions.hardDrop={ press=function(P) if P.mhdlTimer~=0 or P.ahdlTimer~=0 then P:playSound('rotate_failed') - elseif P.hand and not P.deathTimer then - P.mhdlTimer=P.settings.mhdl - P:puyoDropped() + elseif P.hand then + if not P.deathTimer then + P.mhdlTimer=P.settings.mhdl + P:puyoDropped() + else + P.deathTimer=ceil(P.deathTimer/2.6) + end else P.keyBuffer.hardDrop=true end