Skip to content

Commit

Permalink
同步puyo的actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Jan 4, 2024
1 parent 3543983 commit 37a79c7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions assets/game/mechanicLib/puyo/actions.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local ceil=math.ceil

local function getCharge(charge,mode,SET)
if mode=='reset' then
return 0
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 37a79c7

Please sign in to comment.