软降n格的键也可以触发深降
This commit is contained in:
@@ -201,6 +201,20 @@ end
|
|||||||
--------------------------</FX>--------------------------
|
--------------------------</FX>--------------------------
|
||||||
|
|
||||||
--------------------------<Action>--------------------------
|
--------------------------<Action>--------------------------
|
||||||
|
function Player:_deepDrop()
|
||||||
|
local CB=self.cur.bk
|
||||||
|
local y=self.curY-1
|
||||||
|
while self:ifoverlap(CB,self.curX,y)and y>0 do
|
||||||
|
y=y-1
|
||||||
|
end
|
||||||
|
if y>0 then
|
||||||
|
self.ghoY=y
|
||||||
|
self:createDropFX()
|
||||||
|
self.curY=y
|
||||||
|
self:freshBlock('move')
|
||||||
|
SFX.play('swipe')
|
||||||
|
end
|
||||||
|
end
|
||||||
function Player:act_moveLeft(auto)
|
function Player:act_moveLeft(auto)
|
||||||
if not auto then
|
if not auto then
|
||||||
self.ctrlCount=self.ctrlCount+1
|
self.ctrlCount=self.ctrlCount+1
|
||||||
@@ -290,7 +304,6 @@ function Player:act_hardDrop()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Player:act_softDrop()
|
function Player:act_softDrop()
|
||||||
local ENV=self.gameEnv
|
|
||||||
self.downing=1
|
self.downing=1
|
||||||
if self.control and self.waiting==0 and self.cur then
|
if self.control and self.waiting==0 and self.cur then
|
||||||
if self.curY>self.ghoY then
|
if self.curY>self.ghoY then
|
||||||
@@ -298,19 +311,8 @@ function Player:act_softDrop()
|
|||||||
self:freshBlock('fresh')
|
self:freshBlock('fresh')
|
||||||
self.spinLast=false
|
self.spinLast=false
|
||||||
self:checkTouchSound()
|
self:checkTouchSound()
|
||||||
elseif ENV.deepDrop then
|
elseif self.gameEnv.deepdrop then
|
||||||
local CB=self.cur.bk
|
self:_deepdrop()
|
||||||
local y=self.curY-1
|
|
||||||
while self:ifoverlap(CB,self.curX,y)and y>0 do
|
|
||||||
y=y-1
|
|
||||||
end
|
|
||||||
if y>0 then
|
|
||||||
self.ghoY=y
|
|
||||||
self:createDropFX()
|
|
||||||
self.curY=y
|
|
||||||
self:freshBlock('move')
|
|
||||||
SFX.play('swipe')
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -392,31 +394,43 @@ function Player:act_insDown()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Player:act_down1()
|
function Player:act_down1()
|
||||||
if self.cur and self.curY>self.ghoY then
|
if self.cur then
|
||||||
self:createMoveFX('down')
|
if self.curY>self.ghoY then
|
||||||
self.curY=self.curY-1
|
self:createMoveFX('down')
|
||||||
self:freshBlock('fresh')
|
self.curY=self.curY-1
|
||||||
self.spinLast=false
|
self:freshBlock('fresh')
|
||||||
|
self.spinLast=false
|
||||||
|
elseif self.gameEnv.deepdrop then
|
||||||
|
self:_deepdrop()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Player:act_down4()
|
function Player:act_down4()
|
||||||
if self.cur and self.curY>self.ghoY then
|
if self.cur then
|
||||||
local ghoY0=self.ghoY
|
if self.curY>self.ghoY then
|
||||||
self.ghoY=max(self.curY-4,self.ghoY)
|
local ghoY0=self.ghoY
|
||||||
self:createDropFX()
|
self.ghoY=max(self.curY-4,self.ghoY)
|
||||||
self.curY,self.ghoY=self.ghoY,ghoY0
|
self:createDropFX()
|
||||||
self:freshBlock('fresh')
|
self.curY,self.ghoY=self.ghoY,ghoY0
|
||||||
self.spinLast=false
|
self:freshBlock('fresh')
|
||||||
|
self.spinLast=false
|
||||||
|
elseif self.gameEnv.deepdrop then
|
||||||
|
self:_deepdrop()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Player:act_down10()
|
function Player:act_down10()
|
||||||
if self.cur and self.curY>self.ghoY then
|
if self.cur then
|
||||||
local ghoY0=self.ghoY
|
if self.curY>self.ghoY then
|
||||||
self.ghoY=max(self.curY-10,self.ghoY)
|
local ghoY0=self.ghoY
|
||||||
self:createDropFX()
|
self.ghoY=max(self.curY-0,self.ghoY)
|
||||||
self.curY,self.ghoY=self.ghoY,ghoY0
|
self:createDropFX()
|
||||||
self:freshBlock('fresh')
|
self.curY,self.ghoY=self.ghoY,ghoY0
|
||||||
self.spinLast=false
|
self:freshBlock('fresh')
|
||||||
|
self.spinLast=false
|
||||||
|
elseif self.gameEnv.deepdrop then
|
||||||
|
self:_deepdrop()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Player:act_dropLeft()
|
function Player:act_dropLeft()
|
||||||
|
|||||||
Reference in New Issue
Block a user