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 e18b77b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 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 @@ -1924,7 +1938,7 @@ local baseEnv={
stopMoveWhenSpawn=false, -- Stop moving when piece spawn
stopMoveWhenRotate=false, -- Stop moving when rotate
stopMoveWhenHold=false, -- Stop moving when hold
dblMoveCover=false, -- Use second dir (Press 2)
dblMoveCover=true, -- Use second dir (Press 2)
dblMoveChrg='reset', -- reset/keep/raw/full charge (Press 2)
dblMoveStep=true, -- Move (Press 2)
dblMoveRelChrg='raw', -- reset/keep/raw/full charge (Release 1)
Expand Down
12 changes: 10 additions & 2 deletions 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 Expand Up @@ -1251,7 +1259,7 @@ local baseEnv={
ash=26,
stopMoveWhenSpawn=false,
stopMoveWhenRotate=false,
dblMoveCover=false,
dblMoveCover=true,
dblMoveChrg='reset',
dblMoveStep=true,
dblMoveRelChrg='raw',
Expand Down

0 comments on commit e18b77b

Please sign in to comment.