新增误硬降打断延迟机制
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
return{
|
||||
das=10,arr=2,
|
||||
dascut=0,
|
||||
dascut=0,dropcut=0,
|
||||
sddas=2,sdarr=2,
|
||||
ihs=true,irs=true,ims=true,
|
||||
swap=true,
|
||||
|
||||
@@ -197,6 +197,9 @@ local function newEmptyPlayer(id,mini)
|
||||
P.lastPiece={
|
||||
id=0,name=0,--block id/name
|
||||
|
||||
frame=-1e99,--lock time
|
||||
autoLock=true,--if lock with gravity
|
||||
|
||||
finePts=0,--finesse Points
|
||||
|
||||
row=0,dig=0,--lines/garbage cleared
|
||||
|
||||
@@ -956,7 +956,7 @@ do--Player.drop(self)--Place piece
|
||||
end
|
||||
end
|
||||
|
||||
function Player:drop()
|
||||
function Player:drop(autoLock)
|
||||
local _
|
||||
local CHN=VOC.getFreeChannel()
|
||||
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
|
||||
|
||||
piece.id,piece.name=C.id,C.name
|
||||
piece.frame,piece.autoLock=self.frameRun,autoLock
|
||||
self.waiting=ENV.wait
|
||||
|
||||
--Tri-corner spin check
|
||||
@@ -1858,31 +1859,36 @@ function Player:act_rot180()
|
||||
end
|
||||
end
|
||||
function Player:act_hardDrop()
|
||||
local ENV=self.gameEnv
|
||||
if self.keyPressing[9]then
|
||||
if self.gameEnv.swap then
|
||||
if ENV.swap then
|
||||
self:changeAtkMode(3)
|
||||
end
|
||||
self.keyPressing[6]=false
|
||||
elseif self.control and self.waiting==-1 and self.cur then
|
||||
if self.curY>self.ghoY then
|
||||
local CB=self.cur.bk
|
||||
if self.gameEnv.dropFX and self.gameEnv.block and self.curY-self.ghoY-#CB>-1 then
|
||||
self:createDropFX(self.curX,self.curY-1,#CB[1],self.curY-self.ghoY-#CB+1)
|
||||
if self.lastPiece.autoLock and self.frameRun-self.lastPiece.frame<ENV.dropcut then
|
||||
SFX.play('drop_cancel')
|
||||
else
|
||||
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
|
||||
self.curY=self.ghoY
|
||||
self.spinLast=false
|
||||
if self.sound then
|
||||
SFX.play('drop',nil,self:getCenterX()*.15)
|
||||
VIB(1)
|
||||
if ENV.shakeFX then
|
||||
self.fieldOff.vy=ENV.shakeFX*.6
|
||||
self.fieldOff.va=self.fieldOff.va+self:getCenterX()*ENV.shakeFX*6e-4
|
||||
end
|
||||
self.lockDelay=-1
|
||||
self:drop(false)
|
||||
self.keyPressing[6]=false
|
||||
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
|
||||
function Player:act_softDrop()
|
||||
|
||||
@@ -363,7 +363,7 @@ function update.alive(P,dt)
|
||||
if P.lockDelay>=0 then
|
||||
goto THROW_stop
|
||||
end
|
||||
P:drop()
|
||||
P:drop(true)
|
||||
if P.AI_mode=='CC'and P.AI_bot then
|
||||
CC.updateField(P)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user