新增物理hold
This commit is contained in:
@@ -160,6 +160,7 @@ CUSTOMENV={--gameEnv for cutsom game
|
|||||||
nextCount=6,
|
nextCount=6,
|
||||||
holdCount=1,
|
holdCount=1,
|
||||||
infHold=false,
|
infHold=false,
|
||||||
|
phyHold=false,
|
||||||
|
|
||||||
--Visual
|
--Visual
|
||||||
bone=false,
|
bone=false,
|
||||||
|
|||||||
@@ -424,6 +424,7 @@ return{
|
|||||||
nextCount="Next",
|
nextCount="Next",
|
||||||
holdCount="Hold",
|
holdCount="Hold",
|
||||||
infHold="Infinite Hold",
|
infHold="Infinite Hold",
|
||||||
|
phyHold="Physical Hold",
|
||||||
bone="Bone Blocks",
|
bone="Bone Blocks",
|
||||||
|
|
||||||
mindas="Min. DAS",
|
mindas="Min. DAS",
|
||||||
|
|||||||
@@ -400,6 +400,7 @@ return{
|
|||||||
nextCount="Prévisualisations de pièces",
|
nextCount="Prévisualisations de pièces",
|
||||||
holdCount="Réserve",
|
holdCount="Réserve",
|
||||||
infHold="Réserver une fois",
|
infHold="Réserver une fois",
|
||||||
|
-- phyHold="Physical Hold",
|
||||||
bone="Crochets",
|
bone="Crochets",
|
||||||
|
|
||||||
mindas="DAS minimum",
|
mindas="DAS minimum",
|
||||||
|
|||||||
@@ -424,6 +424,7 @@ return{
|
|||||||
nextCount="Prox.",
|
nextCount="Prox.",
|
||||||
holdCount="Segurar",
|
holdCount="Segurar",
|
||||||
infHold="Segurar Infinito",
|
infHold="Segurar Infinito",
|
||||||
|
-- phyHold="Physical Hold",
|
||||||
bone="Bone Blocks",
|
bone="Bone Blocks",
|
||||||
|
|
||||||
mindas="Min. DAS",
|
mindas="Min. DAS",
|
||||||
|
|||||||
@@ -400,6 +400,7 @@ return{
|
|||||||
nextCount="Siguiente",
|
nextCount="Siguiente",
|
||||||
holdCount="Reserva",
|
holdCount="Reserva",
|
||||||
-- infHold="Hold Único",
|
-- infHold="Hold Único",
|
||||||
|
-- phyHold="Physical Hold",
|
||||||
bone="Bone Block",
|
bone="Bone Block",
|
||||||
|
|
||||||
mindas="DAS Mínimo",
|
mindas="DAS Mínimo",
|
||||||
|
|||||||
@@ -281,6 +281,7 @@ return{
|
|||||||
nextCount="→",
|
nextCount="→",
|
||||||
holdCount="[ ]",
|
holdCount="[ ]",
|
||||||
infHold="∞*[ ]",
|
infHold="∞*[ ]",
|
||||||
|
phyHold="P-[ ]",
|
||||||
bone="[]",
|
bone="[]",
|
||||||
|
|
||||||
mindas="mDAS",
|
mindas="mDAS",
|
||||||
|
|||||||
@@ -424,6 +424,7 @@ return{
|
|||||||
nextCount="Next",
|
nextCount="Next",
|
||||||
holdCount="Hold",
|
holdCount="Hold",
|
||||||
infHold="无限Hold",
|
infHold="无限Hold",
|
||||||
|
phyHold="物理Hold",
|
||||||
bone="骨块",
|
bone="骨块",
|
||||||
|
|
||||||
mindas="最小DAS",
|
mindas="最小DAS",
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ return{
|
|||||||
nextCount="预览个数",
|
nextCount="预览个数",
|
||||||
holdCount="暂存个数",
|
holdCount="暂存个数",
|
||||||
infHold="无限暂存",
|
infHold="无限暂存",
|
||||||
|
phyHold="物理暂存",
|
||||||
|
|
||||||
mindas="最小首次移动延迟",
|
mindas="最小首次移动延迟",
|
||||||
minarr="最小移动重复延迟",
|
minarr="最小移动重复延迟",
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ return{
|
|||||||
bone=false,
|
bone=false,
|
||||||
fieldH=20,
|
fieldH=20,
|
||||||
nextCount=6,nextStartPos=1,
|
nextCount=6,nextStartPos=1,
|
||||||
holdCount=1,infHold=false,
|
holdCount=1,infHold=false,phyHold=false,
|
||||||
ospin=true,deepDrop=false,
|
ospin=true,deepDrop=false,
|
||||||
RS="TRS",
|
RS="TRS",
|
||||||
sequence="bag",
|
sequence="bag",
|
||||||
|
|||||||
@@ -624,23 +624,50 @@ function Player.hold(P,ifpre)
|
|||||||
else--Hold
|
else--Hold
|
||||||
local C,H=P.cur,P.holdQueue[1]
|
local C,H=P.cur,P.holdQueue[1]
|
||||||
|
|
||||||
--Finesse check
|
if P.gameEnv.phyHold and C and not ifpre then--Physical hold
|
||||||
if H and C and H.id==C.id and H.name==C.name then
|
local success
|
||||||
P.ctrlCount=P.ctrlCount+1
|
local x,y=P.curX,P.curY
|
||||||
elseif P.ctrlCount<=1 then
|
x=x+(#C.bk[1]-#H.bk[1])*.5
|
||||||
P.ctrlCount=0
|
y=y+(#C.bk-#H.bk)*.5
|
||||||
|
for X=int(x-.5),ceil(x+.5)do
|
||||||
|
for Y=int(y),ceil(y)do
|
||||||
|
if not P:ifoverlap(H.bk,X,Y)then
|
||||||
|
x,y=X,Y
|
||||||
|
success=true
|
||||||
|
goto BREAK
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
::BREAK::
|
||||||
|
if success then
|
||||||
|
P.spinLast=false
|
||||||
|
P.spinSeq=0
|
||||||
|
|
||||||
|
ins(P.holdQueue,P:getBlock(C.id))
|
||||||
|
P.cur=rem(P.holdQueue,1)
|
||||||
|
P.curX,P.curY=x,y
|
||||||
|
else
|
||||||
|
SFX.play("finesseError")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
else--Normal hold
|
||||||
|
--Finesse check
|
||||||
|
if H and C and H.id==C.id and H.name==C.name then
|
||||||
|
P.ctrlCount=P.ctrlCount+1
|
||||||
|
elseif P.ctrlCount<=1 then
|
||||||
|
P.ctrlCount=0
|
||||||
|
end
|
||||||
|
|
||||||
|
P.spinLast=false
|
||||||
|
P.spinSeq=0
|
||||||
|
|
||||||
|
if C then
|
||||||
|
ins(P.holdQueue,P:getBlock(C.id))
|
||||||
|
end
|
||||||
|
P.cur=rem(P.holdQueue,1)
|
||||||
|
|
||||||
|
P:resetBlock()
|
||||||
end
|
end
|
||||||
|
|
||||||
P.spinLast=false
|
|
||||||
P.spinSeq=0
|
|
||||||
|
|
||||||
if C then
|
|
||||||
C.bk=BLOCKS[C.id][P.gameEnv.face[C.id]]
|
|
||||||
ins(P.holdQueue,P:getBlock(C.id))
|
|
||||||
end
|
|
||||||
P.cur=rem(P.holdQueue,1)
|
|
||||||
|
|
||||||
P:resetBlock()
|
|
||||||
P:freshBlock("move")
|
P:freshBlock("move")
|
||||||
P.dropDelay=P.gameEnv.drop
|
P.dropDelay=P.gameEnv.drop
|
||||||
P.lockDelay=P.gameEnv.lock
|
P.lockDelay=P.gameEnv.lock
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ scene.widgetList={
|
|||||||
WIDGET.newSlider{name="nextCount", x=180, y=380,w=200,unit=6, disp=lnk_CUSval("nextCount"),code=lnk_CUSsto("nextCount")},
|
WIDGET.newSlider{name="nextCount", x=180, y=380,w=200,unit=6, disp=lnk_CUSval("nextCount"),code=lnk_CUSsto("nextCount")},
|
||||||
WIDGET.newSlider{name="holdCount", x=180, y=450,w=200,unit=6, disp=lnk_CUSval("holdCount"),code=lnk_CUSsto("holdCount")},
|
WIDGET.newSlider{name="holdCount", x=180, y=450,w=200,unit=6, disp=lnk_CUSval("holdCount"),code=lnk_CUSsto("holdCount")},
|
||||||
WIDGET.newSwitch{name="infHold", x=280, y=530, disp=lnk_CUSval("infHold"), code=lnk_CUSrev("infHold"),hide=function()return CUSTOMENV.holdCount==0 end},
|
WIDGET.newSwitch{name="infHold", x=280, y=530, disp=lnk_CUSval("infHold"), code=lnk_CUSrev("infHold"),hide=function()return CUSTOMENV.holdCount==0 end},
|
||||||
|
WIDGET.newSwitch{name="phyHold", x=280, y=620, disp=lnk_CUSval("phyHold"), code=lnk_CUSrev("phyHold"),hide=function()return CUSTOMENV.holdCount==0 end},
|
||||||
|
|
||||||
--Rule
|
--Rule
|
||||||
WIDGET.newSelector{name="fieldH", x=550, y=520, w=260,color="sky", list={1,2,3,4,6,8,10,15,20,30,50,100},disp=lnk_CUSval("fieldH"),code=lnk_CUSsto("fieldH")},
|
WIDGET.newSelector{name="fieldH", x=550, y=520, w=260,color="sky", list={1,2,3,4,6,8,10,15,20,30,50,100},disp=lnk_CUSval("fieldH"),code=lnk_CUSsto("fieldH")},
|
||||||
|
|||||||
Reference in New Issue
Block a user