Skip to content

Commit

Permalink
修气泡旋转系统小问题
Browse files Browse the repository at this point in the history
方块和气泡添加voidDelay之后备用
整理代码
  • Loading branch information
MrZ626 committed May 5, 2024
1 parent 365fdd6 commit 68f4fec
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
1 change: 1 addition & 0 deletions assets/game/minoPlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,7 @@ local baseEnv={
lockoutH=1e99,
deathH=1e99,
voidH=1260,
voidDelay=260,

-- Clear
clearRule='line',
Expand Down
43 changes: 29 additions & 14 deletions assets/game/puyoPlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ function PP:getPuyo(mat)

local puyo={
id=self.pieceCount,
size=max(#mat,#mat[1]),
size=min(#mat,#mat[1]),
direction=0,
matrix=mat,
}
Expand Down Expand Up @@ -509,24 +509,24 @@ end
local PRS={
[1]={
[0]={
R={target=1,{0,0},{0,1},{-1,0},{-1,1}},
L={target=3,{-1,0},{-1,1},{0,0},{0,1}},
F={target=2,{0,-1},{0,0}},
R={target=1,base={0,0},{0,0},{0,1},{-1,0},{-1,1}},
L={target=3,base={-1,0},{0,0},{0,1},{1,0},{1,1}},
F={target=2,base={0,-1},{0,0},{0,1}},
},
[1]={
R={target=2,{0,-1},{0,0},{1,-1},{1,0}},
L={target=0,{0,0},{1,0},{0,-1},{1,-1}},
F={target=3,{-1,0},{0,0}},
R={target=2,base={0,-1},{0,0},{0,1},{1,0},{1,1}},
L={target=0,base={0,0},{0,0},{1,0},{0,-1},{1,-1}},
F={target=3,base={-1,0},{0,0},{1,0}},
},
[2]={
R={target=3,{-1,1},{0,1},{-1,0},{0,0}},
L={target=1,{0,1},{-1,1},{0,0},{-1,0}},
F={target=0,{0,1},{0,0}},
R={target=3,base={-1,1},{0,0},{1,0},{0,-1},{1,-1}},
L={target=1,base={0,1},{0,0},{-1,0},{0,-1},{-1,-1}},
F={target=0,base={0,1},{0,0},{0,-1}},
},
[3]={
R={target=0,{1,0},{0,0},{1,-1},{0,-1}},
L={target=2,{1,-1},{1,0},{0,-1},{0,0}},
F={target=1,{1,0},{0,0}},
R={target=0,base={1,0},{0,0},{-1,0},{0,-1},{-1,-1}},
L={target=2,base={1,-1},{0,0},{0,1},{-1,0},{-1,1}},
F={target=1,base={1,0},{0,0},{-1,0}},
},
},
[2]={
Expand All @@ -536,6 +536,20 @@ local PRS={
[3]={R={target=0,{0,0}},L={target=2,{0,0}},F={target=1,{0,0}}},
},
}
for size=1,2 do
for _,sizeData in next,PRS[size] do
for _,rotData in next,sizeData do
if rotData.base then
for i=1,#rotData do
local kick=rotData[i]
kick[1]=kick[1]+rotData.base[1]
kick[2]=kick[2]+rotData.base[2]
end
rotData.base=nil
end
end
end
end
function PP:rotate(dir,ifInit)
if self.settings.stopMoveWhenRotate then
self.moveDir=false
Expand Down Expand Up @@ -1226,7 +1240,7 @@ local baseEnv={
spawnH=11,
lockoutH=1e99,
deathH=1e99,
voidH=620,
voidH=16,
connH=4, -- Default to 12

-- Clear
Expand All @@ -1246,6 +1260,7 @@ local baseEnv={
fallDelay=100,
clearDelay=200,
deathDelay=260,
voidDelay=6200,

-- Fresh
freshCondition='fall',
Expand Down

0 comments on commit 68f4fec

Please sign in to comment.