新增误硬降打断延迟机制
This commit is contained in:
BIN
media/SFX/drop_cancel.ogg
Normal file
BIN
media/SFX/drop_cancel.ogg
Normal file
Binary file not shown.
@@ -377,7 +377,7 @@ end
|
|||||||
do--function dumpBasicConfig()
|
do--function dumpBasicConfig()
|
||||||
local gameSetting={
|
local gameSetting={
|
||||||
--Tuning
|
--Tuning
|
||||||
'das','arr','dascut','sddas','sdarr',
|
'das','arr','dascut','dropcut','sddas','sdarr',
|
||||||
'ihs','irs','ims','RS','swap',
|
'ihs','irs','ims','RS','swap',
|
||||||
|
|
||||||
--System
|
--System
|
||||||
|
|||||||
@@ -286,7 +286,8 @@ ROOMENV={
|
|||||||
}
|
}
|
||||||
SETTING={--Settings
|
SETTING={--Settings
|
||||||
--Tuning
|
--Tuning
|
||||||
das=10,arr=2,dascut=0,
|
das=10,arr=2,
|
||||||
|
dascut=0,dropcut=0,
|
||||||
sddas=0,sdarr=2,
|
sddas=0,sdarr=2,
|
||||||
ihs=true,irs=true,ims=true,
|
ihs=true,irs=true,ims=true,
|
||||||
RS='TRS',
|
RS='TRS',
|
||||||
|
|||||||
@@ -367,7 +367,9 @@ return{
|
|||||||
title="Control Settings",
|
title="Control Settings",
|
||||||
preview="Preview",
|
preview="Preview",
|
||||||
|
|
||||||
das="DAS",arr="ARR",dascut="DAS cut",
|
das="DAS",arr="ARR",
|
||||||
|
dascut="DAS cut",
|
||||||
|
dropcut="Auto-lock cut",
|
||||||
sddas="Soft Drop DAS",sdarr="Soft Drop ARR",
|
sddas="Soft Drop DAS",sdarr="Soft Drop ARR",
|
||||||
ihs="Initial Hold",
|
ihs="Initial Hold",
|
||||||
irs="Initial Rotation",
|
irs="Initial Rotation",
|
||||||
|
|||||||
@@ -339,7 +339,9 @@ return{
|
|||||||
title="Ajustes de Controles",
|
title="Ajustes de Controles",
|
||||||
preview="Ejemplo",
|
preview="Ejemplo",
|
||||||
|
|
||||||
das="DAS",arr="ARR",dascut="Intrrp. de DAS",
|
das="DAS",arr="ARR",
|
||||||
|
dascut="Intrrp. de DAS",
|
||||||
|
-- dropcut="Auto-lock cut",
|
||||||
sddas="DAS de C. Ráp.",sdarr="ARR de C. Rápida",
|
sddas="DAS de C. Ráp.",sdarr="ARR de C. Rápida",
|
||||||
ihs="Resv. Inicial",
|
ihs="Resv. Inicial",
|
||||||
irs="Rot. Inicial",
|
irs="Rot. Inicial",
|
||||||
|
|||||||
@@ -338,7 +338,9 @@ return{
|
|||||||
title="Paramètres de contrôle",
|
title="Paramètres de contrôle",
|
||||||
preview="Aperçu",
|
preview="Aperçu",
|
||||||
|
|
||||||
das="DAS",arr="ARR",dascut="DAS cut",
|
das="DAS",arr="ARR",
|
||||||
|
dascut="DAS cut",
|
||||||
|
-- dropcut="Auto-lock cut",
|
||||||
sddas="DAS de chute rapide",sdarr="ARR de chute rapide",
|
sddas="DAS de chute rapide",sdarr="ARR de chute rapide",
|
||||||
ihs="Réserve Initiale",
|
ihs="Réserve Initiale",
|
||||||
irs="Rotation Initiale",
|
irs="Rotation Initiale",
|
||||||
|
|||||||
@@ -366,7 +366,9 @@ return{
|
|||||||
title="Config. controles",
|
title="Config. controles",
|
||||||
preview="Preview",
|
preview="Preview",
|
||||||
|
|
||||||
das="DAS",arr="ARR",dascut="DAS cut",
|
das="DAS",arr="ARR",
|
||||||
|
dascut="DAS cut",
|
||||||
|
-- dropcut="Auto-lock cut",
|
||||||
sddas="Soft Drop DAS",sdarr="Soft Drop ARR",
|
sddas="Soft Drop DAS",sdarr="Soft Drop ARR",
|
||||||
ihs="Segurar Inicial",
|
ihs="Segurar Inicial",
|
||||||
irs="Rotação Inicial",
|
irs="Rotação Inicial",
|
||||||
|
|||||||
@@ -193,7 +193,9 @@ return{
|
|||||||
title="[~~]",
|
title="[~~]",
|
||||||
preview="?:",
|
preview="?:",
|
||||||
|
|
||||||
das="x---x x x",arr="x x-x-x",dascut="x x ↓___x x",
|
das="x---x x x",arr="x x-x-x",
|
||||||
|
dascut="x x ↓___x x",
|
||||||
|
dropcut="↓_ !↓↓x",
|
||||||
sddas="↓---↓ ↓ ↓",sdarr="↓ ↓-↓-↓",
|
sddas="↓---↓ ↓ ↓",sdarr="↓ ↓-↓-↓",
|
||||||
ihs="![ ]",
|
ihs="![ ]",
|
||||||
irs="!''",
|
irs="!''",
|
||||||
|
|||||||
@@ -366,7 +366,9 @@ return{
|
|||||||
title="控制设置",
|
title="控制设置",
|
||||||
preview="预览",
|
preview="预览",
|
||||||
|
|
||||||
das="DAS",arr="ARR",dascut="DAS打断",
|
das="DAS",arr="ARR",
|
||||||
|
dascut="DAS打断",
|
||||||
|
dropcut="误硬降打断",
|
||||||
sddas="软降DAS",sdarr="软降ARR",
|
sddas="软降DAS",sdarr="软降ARR",
|
||||||
ihs="提前Hold",
|
ihs="提前Hold",
|
||||||
irs="提前旋转",
|
irs="提前旋转",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
return{
|
return{
|
||||||
das=10,arr=2,
|
das=10,arr=2,
|
||||||
dascut=0,
|
dascut=0,dropcut=0,
|
||||||
sddas=2,sdarr=2,
|
sddas=2,sdarr=2,
|
||||||
ihs=true,irs=true,ims=true,
|
ihs=true,irs=true,ims=true,
|
||||||
swap=true,
|
swap=true,
|
||||||
|
|||||||
@@ -197,6 +197,9 @@ local function newEmptyPlayer(id,mini)
|
|||||||
P.lastPiece={
|
P.lastPiece={
|
||||||
id=0,name=0,--block id/name
|
id=0,name=0,--block id/name
|
||||||
|
|
||||||
|
frame=-1e99,--lock time
|
||||||
|
autoLock=true,--if lock with gravity
|
||||||
|
|
||||||
finePts=0,--finesse Points
|
finePts=0,--finesse Points
|
||||||
|
|
||||||
row=0,dig=0,--lines/garbage cleared
|
row=0,dig=0,--lines/garbage cleared
|
||||||
|
|||||||
@@ -956,7 +956,7 @@ do--Player.drop(self)--Place piece
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Player:drop()
|
function Player:drop(autoLock)
|
||||||
local _
|
local _
|
||||||
local CHN=VOC.getFreeChannel()
|
local CHN=VOC.getFreeChannel()
|
||||||
self.dropTime[11]=ins(self.dropTime,1,self.frameRun)--Update speed dial
|
self.dropTime[11]=ins(self.dropTime,1,self.frameRun)--Update speed dial
|
||||||
@@ -975,6 +975,7 @@ do--Player.drop(self)--Place piece
|
|||||||
local dospin,mini=0
|
local dospin,mini=0
|
||||||
|
|
||||||
piece.id,piece.name=C.id,C.name
|
piece.id,piece.name=C.id,C.name
|
||||||
|
piece.frame,piece.autoLock=self.frameRun,autoLock
|
||||||
self.waiting=ENV.wait
|
self.waiting=ENV.wait
|
||||||
|
|
||||||
--Tri-corner spin check
|
--Tri-corner spin check
|
||||||
@@ -1858,31 +1859,36 @@ function Player:act_rot180()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Player:act_hardDrop()
|
function Player:act_hardDrop()
|
||||||
|
local ENV=self.gameEnv
|
||||||
if self.keyPressing[9]then
|
if self.keyPressing[9]then
|
||||||
if self.gameEnv.swap then
|
if ENV.swap then
|
||||||
self:changeAtkMode(3)
|
self:changeAtkMode(3)
|
||||||
end
|
end
|
||||||
self.keyPressing[6]=false
|
self.keyPressing[6]=false
|
||||||
elseif self.control and self.waiting==-1 and self.cur then
|
elseif self.control and self.waiting==-1 and self.cur then
|
||||||
if self.curY>self.ghoY then
|
if self.lastPiece.autoLock and self.frameRun-self.lastPiece.frame<ENV.dropcut then
|
||||||
local CB=self.cur.bk
|
SFX.play('drop_cancel')
|
||||||
if self.gameEnv.dropFX and self.gameEnv.block and self.curY-self.ghoY-#CB>-1 then
|
else
|
||||||
self:createDropFX(self.curX,self.curY-1,#CB[1],self.curY-self.ghoY-#CB+1)
|
if self.curY>self.ghoY then
|
||||||
|
local CB=self.cur.bk
|
||||||
|
if ENV.dropFX and ENV.block and self.curY-self.ghoY-#CB>-1 then
|
||||||
|
self:createDropFX(self.curX,self.curY-1,#CB[1],self.curY-self.ghoY-#CB+1)
|
||||||
|
end
|
||||||
|
self.curY=self.ghoY
|
||||||
|
self.spinLast=false
|
||||||
|
if self.sound then
|
||||||
|
SFX.play('drop',nil,self:getCenterX()*.15)
|
||||||
|
VIB(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
self.curY=self.ghoY
|
if ENV.shakeFX then
|
||||||
self.spinLast=false
|
self.fieldOff.vy=ENV.shakeFX*.6
|
||||||
if self.sound then
|
self.fieldOff.va=self.fieldOff.va+self:getCenterX()*ENV.shakeFX*6e-4
|
||||||
SFX.play('drop',nil,self:getCenterX()*.15)
|
|
||||||
VIB(1)
|
|
||||||
end
|
end
|
||||||
|
self.lockDelay=-1
|
||||||
|
self:drop(false)
|
||||||
|
self.keyPressing[6]=false
|
||||||
end
|
end
|
||||||
if self.gameEnv.shakeFX then
|
|
||||||
self.fieldOff.vy=self.gameEnv.shakeFX*.6
|
|
||||||
self.fieldOff.va=self.fieldOff.va+self:getCenterX()*self.gameEnv.shakeFX*6e-4
|
|
||||||
end
|
|
||||||
self.lockDelay=-1
|
|
||||||
self:drop()
|
|
||||||
self.keyPressing[6]=false
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Player:act_softDrop()
|
function Player:act_softDrop()
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ function update.alive(P,dt)
|
|||||||
if P.lockDelay>=0 then
|
if P.lockDelay>=0 then
|
||||||
goto THROW_stop
|
goto THROW_stop
|
||||||
end
|
end
|
||||||
P:drop()
|
P:drop(true)
|
||||||
if P.AI_mode=='CC'and P.AI_bot then
|
if P.AI_mode=='CC'and P.AI_bot then
|
||||||
CC.updateField(P)
|
CC.updateField(P)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -51,26 +51,28 @@ function scene.update()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
|
gc.translate(550,600)
|
||||||
|
|
||||||
--Testing grid line
|
--Testing grid line
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
gc.setColor(1,1,1,.4)
|
gc.setColor(1,1,1,.4)
|
||||||
gc.line(550,540,950,540)
|
gc.line(0,0,400,0)
|
||||||
gc.line(550,580,950,580)
|
gc.line(0,40,400,40)
|
||||||
gc.line(550,620,950,620)
|
gc.line(0,80,400,80)
|
||||||
for x=590,910,40 do
|
for x=40,360,40 do
|
||||||
gc.line(x,530,x,630)
|
gc.line(x,-10,x,90)
|
||||||
end
|
end
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.line(550,530,550,630)
|
gc.line(0,-10,0,90)
|
||||||
gc.line(950,530,950,630)
|
gc.line(400,-10,400,90)
|
||||||
|
|
||||||
--O mino animation
|
--O mino animation
|
||||||
local O=SKIN.curText[SETTING.skin[6]]
|
local O=SKIN.curText[SETTING.skin[6]]
|
||||||
local x=550+40*pos
|
gc.draw(O,40*pos,0,nil,40/30)
|
||||||
gc.draw(O,x,540,nil,40/30)
|
gc.draw(O,40*pos,40,nil,40/30)
|
||||||
gc.draw(O,x,580,nil,40/30)
|
gc.draw(O,40*pos+40,0,nil,40/30)
|
||||||
gc.draw(O,x+40,540,nil,40/30)
|
gc.draw(O,40*pos+40,40,nil,40/30)
|
||||||
gc.draw(O,x+40,580,nil,40/30)
|
gc.translate(-550,-600)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function sliderShow(S)
|
local function sliderShow(S)
|
||||||
@@ -79,17 +81,18 @@ local function sliderShow(S)
|
|||||||
end
|
end
|
||||||
scene.widgetList={
|
scene.widgetList={
|
||||||
WIDGET.newText{name="title", x=80, y=50,font=70,align='L'},
|
WIDGET.newText{name="title", x=80, y=50,font=70,align='L'},
|
||||||
WIDGET.newText{name="preview", x=520, y=540,font=40,align='R'},
|
WIDGET.newText{name="preview", x=520, y=610,font=40,align='R'},
|
||||||
|
|
||||||
WIDGET.newSlider{name="das", x=250, y=190,w=600,unit=20,disp=SETval("das"), show=sliderShow,code=SETsto("das")},
|
WIDGET.newSlider{name="das", x=250, y=190,w=600,unit=20,disp=SETval("das"), show=sliderShow,code=SETsto("das")},
|
||||||
WIDGET.newSlider{name="arr", x=250, y=260,w=525,unit=15,disp=SETval("arr"), show=sliderShow,code=SETsto("arr")},
|
WIDGET.newSlider{name="arr", x=250, y=260,w=525,unit=15,disp=SETval("arr"), show=sliderShow,code=SETsto("arr")},
|
||||||
WIDGET.newSlider{name="sddas", x=250, y=330,w=350,unit=10,disp=SETval("sddas"),show=sliderShow,code=SETsto("sddas")},
|
WIDGET.newSlider{name="sddas", x=250, y=330,w=350,unit=10,disp=SETval("sddas"),show=sliderShow,code=SETsto("sddas")},
|
||||||
WIDGET.newSlider{name="sdarr", x=250, y=400,w=140,unit=4, disp=SETval("sdarr"),show=sliderShow,code=SETsto("sdarr")},
|
WIDGET.newSlider{name="sdarr", x=250, y=400,w=140,unit=4, disp=SETval("sdarr"),show=sliderShow,code=SETsto("sdarr")},
|
||||||
WIDGET.newSlider{name="dascut", x=250, y=470,w=600,unit=20,disp=SETval("dascut"),show=sliderShow,code=SETsto("dascut")},
|
WIDGET.newSlider{name="dascut", x=250, y=470,w=600,unit=20,disp=SETval("dascut"),show=sliderShow,code=SETsto("dascut")},
|
||||||
|
WIDGET.newSlider{name="dropcut",x=250, y=540,w=300,unit=10,disp=SETval("dropcut"),show=sliderShow,code=SETsto("dropcut")},
|
||||||
WIDGET.newSwitch{name="ihs", x=1100, y=260, disp=SETval("ihs"), code=SETrev("ihs")},
|
WIDGET.newSwitch{name="ihs", x=1100, y=260, disp=SETval("ihs"), code=SETrev("ihs")},
|
||||||
WIDGET.newSwitch{name="irs", x=1100, y=330, disp=SETval("irs"), code=SETrev("irs")},
|
WIDGET.newSwitch{name="irs", x=1100, y=330, disp=SETval("irs"), code=SETrev("irs")},
|
||||||
WIDGET.newSwitch{name="ims", x=1100, y=400, disp=SETval("ims"), code=SETrev("ims")},
|
WIDGET.newSwitch{name="ims", x=1100, y=400, disp=SETval("ims"), code=SETrev("ims")},
|
||||||
WIDGET.newButton{name="reset", x=160, y=580,w=200,h=100,color='lR',font=40,
|
WIDGET.newButton{name="reset", x=160, y=640,w=200,h=100,color='lR',font=40,
|
||||||
code=function()
|
code=function()
|
||||||
local _=SETTING
|
local _=SETTING
|
||||||
_.das,_.arr,_.dascut=10,2,0
|
_.das,_.arr,_.dascut=10,2,0
|
||||||
|
|||||||
Reference in New Issue
Block a user