修复ospin锁延刷新时机错误,调整音效

This commit is contained in:
MrZ626
2021-02-27 02:48:08 +08:00
parent c42bb942f1
commit 1e88d8ba46

View File

@@ -121,40 +121,40 @@ do
[31]={{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2},{ 0, 2}}, [31]={{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2},{ 0, 2}},
},--T },--T
function(P,d) function(P,d)
if P.type=="human"then SFX.fieldPlay("rotate",nil,P)end P:freshBlock("fresh")
if not P.gameEnv.ospin then return end if P.gameEnv.ospin then
local x,y=P.curX,P.curY local x,y=P.curX,P.curY
if y==P.ghoY and((P:solid(x-1,y)or P:solid(x-1,y+1)))and(P:solid(x+2,y)or P:solid(x+2,y+1))then if y==P.ghoY and((P:solid(x-1,y)or P:solid(x-1,y+1)))and(P:solid(x+2,y)or P:solid(x+2,y+1))then
local D=P.spinSeq%100*10+d if P.sound then SFX.fieldPlay("rotatekick",nil,P)end
P.spinSeq=D local D=P.spinSeq%100*10+d
if D<100 then P.spinSeq=D
P:freshBlock("fresh") if D<100 then return end
return for i=1,#OspinList do
end local L=OspinList[i]
for i=1,#OspinList do if D==L[1]then
local L=OspinList[i] local id,dir=L[2],L[3]
if D==L[1]then local bk=BLOCKS[id][dir]
local id,dir=L[2],L[3] x,y=P.curX+L[4],P.curY+L[5]
local bk=BLOCKS[id][dir] if not P:ifoverlap(bk,x,y)and(L[6]>0 or P:ifoverlap(bk,x-1,y)and P:ifoverlap(bk,x+1,y))and(L[6]==2 or P:ifoverlap(bk,x,y-1))and P:ifoverlap(bk,x,y+1)then
x,y=P.curX+L[4],P.curY+L[5] local C=P.cur
if not P:ifoverlap(bk,x,y)and(L[6]>0 or P:ifoverlap(bk,x-1,y)and P:ifoverlap(bk,x+1,y))and(L[6]==2 or P:ifoverlap(bk,x,y-1))and P:ifoverlap(bk,x,y+1)then C.id=id
local C=P.cur C.bk=bk
C.id=id P.curX,P.curY=x,y
C.bk=bk P.dir,P.sc=dir,spinCenters[id][dir]
P.curX,P.curY=x,y P.spinLast=2
P.dir,P.sc=dir,spinCenters[id][dir] P.stat.rotate=P.stat.rotate+1
P.spinLast=2 P:freshBlock("move")
P.stat.rotate=P.stat.rotate+1 P.spinSeq=0
P:freshBlock("move") return
P.spinSeq=0 end
SFX.fieldPlay("rotatekick",nil,P)
return
end end
end end
else
if P.sound then SFX.fieldPlay("rotate",nil,P)end
P.spinSeq=0
end end
else else
P.spinSeq=0 if P.sound then SFX.fieldPlay("rotate",nil,P)end
P:freshBlock("fresh")
end end
end,--O end,--O
{ {