remove a goto
This commit is contained in:
@@ -795,28 +795,23 @@ function Player.popNext(P,ifhold)--Pop nextQueue to hand
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Player.cancel(P,N)--Cancel Garbage
|
function Player.cancel(P,N)--Cancel Garbage
|
||||||
local k=0 --Pointer, attack bar selected
|
|
||||||
local off=0 --Lines offseted
|
local off=0 --Lines offseted
|
||||||
local bf=P.atkBuffer
|
local bf=P.atkBuffer
|
||||||
::R::
|
for _, A in ipairs(bf) do
|
||||||
if bf.sum>0 then
|
if bf.sum <= 0 then break end
|
||||||
local A
|
if not A.sent then
|
||||||
repeat
|
local O = min(A.amount, N) -- Cur Offset
|
||||||
k=k+1
|
off, bf.sum = off + O, bf.sum - O
|
||||||
A=bf[k]
|
if N >= A.amount then
|
||||||
if not A then return off end
|
A.sent, A.time = true, 0
|
||||||
until not A.sent
|
else
|
||||||
if N>=A.amount then
|
A.amount = A.amount - O
|
||||||
local O=A.amount--Cur Offset
|
end
|
||||||
N=N-O
|
if N <= A.amount then
|
||||||
off=off+O
|
break
|
||||||
bf.sum=bf.sum-O
|
else
|
||||||
A.sent,A.time=true,0
|
N = N - O
|
||||||
if N>0 then goto R end
|
end
|
||||||
else
|
|
||||||
off=off+N
|
|
||||||
A.amount=A.amount-N
|
|
||||||
bf.sum=bf.sum-N
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return off
|
return off
|
||||||
@@ -973,12 +968,12 @@ do--Player.drop(P)--Place piece
|
|||||||
local c=0
|
local c=0
|
||||||
if P:solid(x-1,y+1)then c=c+1 end
|
if P:solid(x-1,y+1)then c=c+1 end
|
||||||
if P:solid(x+1,y+1)then c=c+1 end
|
if P:solid(x+1,y+1)then c=c+1 end
|
||||||
if c==0 then goto NTC end
|
if c~=0 then
|
||||||
if P:solid(x-1,y-1)then c=c+1 end
|
if P:solid(x-1,y-1)then c=c+1 end
|
||||||
if P:solid(x+1,y-1)then c=c+1 end
|
if P:solid(x+1,y-1)then c=c+1 end
|
||||||
if c>2 then dospin=dospin+2 end
|
if c>2 then dospin=dospin+2 end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
::NTC::
|
|
||||||
end
|
end
|
||||||
--Immovable spin check
|
--Immovable spin check
|
||||||
if P:ifoverlap(CB,CX,CY+1)and P:ifoverlap(CB,CX-1,CY)and P:ifoverlap(CB,CX+1,CY)then
|
if P:ifoverlap(CB,CX,CY+1)and P:ifoverlap(CB,CX-1,CY)and P:ifoverlap(CB,CX+1,CY)then
|
||||||
|
|||||||
Reference in New Issue
Block a user