Skip to content

Commit

Permalink
实现旋转/暂存打断das
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Dec 29, 2023
1 parent cf37ce7 commit 812bd9d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
18 changes: 16 additions & 2 deletions assets/game/minoPlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,10 @@ function MP:resetPosCheck()
self:freshDelay('spawn')
end

if self.settings.ash>0 then
if self.settings.stopMoveWhenSpawn then
self.moveDir=false
self.moveCharge=0
elseif self.settings.ash>0 then
self.moveCharge=min(self.moveCharge,self.settings.asd-self.settings.ash)
end
end
Expand Down Expand Up @@ -978,8 +981,14 @@ function MP:moveUp() -- ?
end
end
function MP:rotate(dir,ifInit)
if self.settings.stopMoveWhenRotate then
self.moveDir=false
self.moveCharge=0
end

if not self.hand then return end
if dir~='R' and dir~='L' and dir~='F' then error("WTF why dir isn't R/L/F ("..tostring(dir)..")") end

local minoData=minoRotSys[self.settings.rotSys][self.hand.shape]
if not minoData then return end

Expand Down Expand Up @@ -1033,9 +1042,14 @@ function MP:rotate(dir,ifInit)
end
function MP:hold(ifInit)
if self.holdTime>=self.settings.holdSlot and not self.settings.infHold then return end

if self.settings.particles then
self:createHoldEffect(ifInit)
end
if self.settings.stopMoveWhenHold then
self.moveDir=false
self.moveCharge=0
end

local mode=self.settings.holdMode
if mode=='hold' then self:hold_hold()
Expand Down Expand Up @@ -1922,7 +1936,7 @@ local baseEnv={
adp=26, -- Auto drop period
ash=26, -- Auto Shift Halt, discharge asd when piece spawn
stopMoveWhenSpawn=false, -- Stop moving when piece spawn
stopMoveWhenRotate=false, -- Stop moving when rotate
stopMoveWhenRotate=true, -- Stop moving when rotate
stopMoveWhenHold=false, -- Stop moving when hold
dblMoveCover=false, -- Use second dir (Press 2)
dblMoveChrg='reset', -- reset/keep/raw/full charge (Press 2)
Expand Down
10 changes: 9 additions & 1 deletion assets/game/puyoPlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,10 @@ function PP:resetPosCheck()
self:freshDelay('spawn')
end

if self.settings.ash>0 then
if self.settings.stopMoveWhenSpawn then
self.moveDir=false
self.moveCharge=0
elseif self.settings.ash>0 then
self.moveCharge=min(self.moveCharge,self.settings.asd-self.settings.ash)
end
end
Expand Down Expand Up @@ -611,6 +614,11 @@ local PRS={
},
}
function PP:rotate(dir,ifInit)
if self.settings.stopMoveWhenRotate then
self.moveDir=false
self.moveCharge=0
end

if not self.hand then return end
if dir~='R' and dir~='L' and dir~='F' then error("WTF why dir isn't R/L/F ("..tostring(dir)..")") end
local origY=self.handY -- For IRS pushing up
Expand Down

0 comments on commit 812bd9d

Please sign in to comment.