玩家上次消行信息lastClear属性改为表,包含更多信息
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
local min=math.min
|
local min=math.min
|
||||||
local function check_c4w(P)
|
local function check_c4w(P)
|
||||||
for i=1,#P.clearedRow do
|
|
||||||
P.field[#P.field+1]=freeRow.get(13)
|
|
||||||
P.visTime[#P.visTime+1]=freeRow.get(20)
|
|
||||||
for i=4,7 do P.field[#P.field][i]=0 end
|
|
||||||
end
|
|
||||||
if #P.clearedRow==0 then
|
if #P.clearedRow==0 then
|
||||||
P:lose()
|
P:lose()
|
||||||
else
|
else
|
||||||
|
for i=1,#P.clearedRow do
|
||||||
|
P.field[#P.field+1]=freeRow.get(13)
|
||||||
|
P.visTime[#P.visTime+1]=freeRow.get(20)
|
||||||
|
for i=4,7 do P.field[#P.field][i]=0 end
|
||||||
|
end
|
||||||
if P.combo>P.modeData.point then
|
if P.combo>P.modeData.point then
|
||||||
P.modeData.point=P.combo
|
P.modeData.point=P.combo
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
local min=math.min
|
local min=math.min
|
||||||
local function check_c4w(P)
|
local function check_c4w(P)
|
||||||
for i=1,#P.clearedRow do
|
|
||||||
P.field[#P.field+1]=freeRow.get(13)
|
|
||||||
P.visTime[#P.visTime+1]=freeRow.get(20)
|
|
||||||
for i=4,7 do P.field[#P.field][i]=0 end
|
|
||||||
end
|
|
||||||
if #P.clearedRow>0 then
|
if #P.clearedRow>0 then
|
||||||
|
for i=1,#P.clearedRow do
|
||||||
|
P.field[#P.field+1]=freeRow.get(13)
|
||||||
|
P.visTime[#P.visTime+1]=freeRow.get(20)
|
||||||
|
for i=4,7 do P.field[#P.field][i]=0 end
|
||||||
|
end
|
||||||
if P.combo>P.modeData.point then
|
if P.combo>P.modeData.point then
|
||||||
P.modeData.point=P.combo
|
P.modeData.point=P.combo
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local function tech_check_hard(P)
|
local function tech_check_hard(P)
|
||||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
if #P.clearedRow>0 then
|
||||||
P:lose()
|
if not(P.lastClear.spin or P.lastClear.pc)then
|
||||||
|
P:lose()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if P.stat.atk>=200 then
|
if P.stat.atk>=200 then
|
||||||
P:win("finish")
|
P:win("finish")
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local function tech_check_hard(P)
|
local function tech_check_hard(P)
|
||||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
if #P.clearedRow>0 then
|
||||||
P:lose()
|
if not(P.lastClear.spin or P.lastClear.pc)then
|
||||||
|
P:lose()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if P.stat.atk>=200 then
|
if P.stat.atk>=200 then
|
||||||
P:win("finish")
|
P:win("finish")
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local function tech_check_hard(P)
|
local function tech_check_hard(P)
|
||||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
if #P.clearedRow>0 then
|
||||||
P:lose()
|
if not(P.lastClear.spin or P.lastClear.pc)then
|
||||||
|
P:lose()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if P.stat.atk>=200 then
|
if P.stat.atk>=200 then
|
||||||
P:win("finish")
|
P:win("finish")
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local function tech_check_hard(P)
|
local function tech_check_hard(P)
|
||||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
if #P.clearedRow>0 then
|
||||||
P:lose()
|
if not(P.lastClear.spin or P.lastClear.pc)then
|
||||||
|
P:lose()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if P.stat.atk>=200 then
|
if P.stat.atk>=200 then
|
||||||
P:win("finish")
|
P:win("finish")
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
local function check_tsd(P)
|
local function check_tsd(P)
|
||||||
if #P.clearedRow>0 then
|
if #P.clearedRow>0 then
|
||||||
if P.lastClear~=52 then
|
if P.lastClear.id~=5 or P.lastClear.row~=2 then
|
||||||
P:lose()
|
P:lose()
|
||||||
elseif #P.clearedRow>0 then
|
else
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
if P.modeData.event==20 then
|
if P.modeData.event==20 then
|
||||||
P:win("finish")
|
P:win("finish")
|
||||||
@@ -24,9 +24,9 @@ return{
|
|||||||
PLY.newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(75)
|
setFont(65)
|
||||||
mStr(P.modeData.event,69,400)
|
mStr(P.modeData.event,69,320)
|
||||||
mText(drawableText.tsd,69,477)
|
mText(drawableText.tsd,69,385)
|
||||||
end,
|
end,
|
||||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||||
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,
|
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
local function check_tsd(P)
|
local function check_tsd(P)
|
||||||
if #P.clearedRow>0 then
|
if #P.clearedRow>0 then
|
||||||
if P.lastClear~=52 then
|
if P.lastClear.id~=5 or P.lastClear.row~=2 then
|
||||||
P:lose()
|
P:lose()
|
||||||
elseif #P.clearedRow>0 then
|
else
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -22,9 +22,9 @@ return{
|
|||||||
PLY.newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(75)
|
setFont(65)
|
||||||
mStr(P.modeData.event,69,400)
|
mStr(P.modeData.event,69,320)
|
||||||
mText(drawableText.tsd,69,477)
|
mText(drawableText.tsd,69,385)
|
||||||
end,
|
end,
|
||||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||||
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,
|
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
local function check_tsd(P)
|
local function check_tsd(P)
|
||||||
if #P.clearedRow>0 then
|
if #P.clearedRow>0 then
|
||||||
if P.lastClear~=52 then
|
local C=P.lastClear
|
||||||
|
if P.lastClear.id~=5 or P.lastClear.row~=2 then
|
||||||
P:lose()
|
P:lose()
|
||||||
elseif #P.clearedRow>0 then
|
else
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -22,9 +23,9 @@ return{
|
|||||||
PLY.newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
mesDisp=function(P,dx,dy)
|
||||||
setFont(75)
|
setFont(65)
|
||||||
mStr(P.modeData.event,69,400)
|
mStr(P.modeData.event,69,320)
|
||||||
mText(drawableText.tsd,69,477)
|
mText(drawableText.tsd,69,385)
|
||||||
end,
|
end,
|
||||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||||
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,
|
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,
|
||||||
|
|||||||
@@ -1305,7 +1305,16 @@ local function newEmptyPlayer(id,x,y,size)
|
|||||||
P.next={}
|
P.next={}
|
||||||
|
|
||||||
P.freshTime=0
|
P.freshTime=0
|
||||||
P.spinLast,P.lastClear=false,nil
|
P.spinLast=false
|
||||||
|
P.lastClear={
|
||||||
|
id=1,--block id
|
||||||
|
name=1,--block name
|
||||||
|
row=0,--line cleared
|
||||||
|
spin=false,--if spin
|
||||||
|
mini=false,--if mini
|
||||||
|
pc=false,--if pc
|
||||||
|
special=false,--if special clear (spin, >=4, pc)
|
||||||
|
}
|
||||||
P.spinSeq=0--For Ospin, each digit mean a spin
|
P.spinSeq=0--For Ospin, each digit mean a spin
|
||||||
P.ctrlCount=0--Key press time, for finesse check
|
P.ctrlCount=0--Key press time, for finesse check
|
||||||
P.pieceCount=0--Count pieces from next, for drawing bagline
|
P.pieceCount=0--Count pieces from next, for drawing bagline
|
||||||
@@ -1401,7 +1410,7 @@ end
|
|||||||
function player.createClearingFX(P,y,spd)
|
function player.createClearingFX(P,y,spd)
|
||||||
ins(P.clearFX,{y,0,spd})
|
ins(P.clearFX,{y,0,spd})
|
||||||
end
|
end
|
||||||
function player.createBeam(P,R,send,time,target,color,clear,spin,combo)
|
function player.createBeam(P,R,send,time,target,color,clear,combo)
|
||||||
local x1,y1,x2,y2
|
local x1,y1,x2,y2
|
||||||
if P.small then x1,y1=P.centerX,P.centerY
|
if P.small then x1,y1=P.centerX,P.centerY
|
||||||
else x1,y1=P.x+(30*(P.curX+P.sc[2])-30+15+150)*P.size,P.y+(600-30*(P.curY+P.sc[1])+15+70)*P.size
|
else x1,y1=P.x+(30*(P.curX+P.sc[2])-30+15+150)*P.size,P.y+(600-30*(P.curY+P.sc[1])+15+70)*P.size
|
||||||
@@ -1412,9 +1421,9 @@ function player.createBeam(P,R,send,time,target,color,clear,spin,combo)
|
|||||||
|
|
||||||
local radius,corner
|
local radius,corner
|
||||||
local a,r,g,b=1,unpack(SKIN.libColor[color])
|
local a,r,g,b=1,unpack(SKIN.libColor[color])
|
||||||
if clear>10 then
|
if clear.special then
|
||||||
radius=10+3*send+100/(target+4)
|
radius=10+3*send+100/(target+4)
|
||||||
local t=clear%10
|
local t=clear.row
|
||||||
if t==1 then
|
if t==1 then
|
||||||
corner=3
|
corner=3
|
||||||
r=.3+r*.4
|
r=.3+r*.4
|
||||||
@@ -2168,6 +2177,10 @@ do--player.drop(P)--Place piece
|
|||||||
end
|
end
|
||||||
|
|
||||||
if cc>0 then
|
if cc>0 then
|
||||||
|
local C=P.lastClear
|
||||||
|
C.id,C.name=CB.id,CB.name
|
||||||
|
C.row=cc
|
||||||
|
C.spin=dospin
|
||||||
cmb=cmb+1
|
cmb=cmb+1
|
||||||
if dospin then
|
if dospin then
|
||||||
cscore=(spinSCR[CB.name]or spinSCR[8])[cc]
|
cscore=(spinSCR[CB.name]or spinSCR[8])[cc]
|
||||||
@@ -2205,7 +2218,8 @@ do--player.drop(P)--Place piece
|
|||||||
else
|
else
|
||||||
P.b2b=P.b2b+b2bPoint[cc]
|
P.b2b=P.b2b+b2bPoint[cc]
|
||||||
end
|
end
|
||||||
P.lastClear=CB.id*10+cc
|
C.mini=mini
|
||||||
|
C.special=true
|
||||||
if P.human then
|
if P.human then
|
||||||
SFX.play(spin_n[cc])
|
SFX.play(spin_n[cc])
|
||||||
VOC.play(spinName[CB.name],CHN)
|
VOC.play(spinName[CB.name],CHN)
|
||||||
@@ -2237,7 +2251,9 @@ do--player.drop(P)--Place piece
|
|||||||
atk=cc
|
atk=cc
|
||||||
end
|
end
|
||||||
P.b2b=P.b2b+cc*80-220
|
P.b2b=P.b2b+cc*80-220
|
||||||
P.lastClear=CB.name*10+cc
|
C.special=true
|
||||||
|
else
|
||||||
|
C.special=false
|
||||||
end
|
end
|
||||||
if P.human then
|
if P.human then
|
||||||
VOC.play(clearName[cc],CHN)
|
VOC.play(clearName[cc],CHN)
|
||||||
@@ -2260,6 +2276,7 @@ do--player.drop(P)--Place piece
|
|||||||
SFX.play("clear")
|
SFX.play("clear")
|
||||||
VOC.play("pc",CHN)
|
VOC.play("pc",CHN)
|
||||||
end
|
end
|
||||||
|
C.special=true
|
||||||
elseif cc>1 or #P.field==P.garbageBeneath then
|
elseif cc>1 or #P.field==P.garbageBeneath then
|
||||||
P:showText(text.HPC,0,-80,50,"fly")
|
P:showText(text.HPC,0,-80,50,"fly")
|
||||||
atk=atk+2
|
atk=atk+2
|
||||||
@@ -2270,23 +2287,20 @@ do--player.drop(P)--Place piece
|
|||||||
if P.human then
|
if P.human then
|
||||||
SFX.play("clear")
|
SFX.play("clear")
|
||||||
end
|
end
|
||||||
else
|
C.special=true
|
||||||
goto checkB2Breduce
|
|
||||||
end
|
end
|
||||||
P.lastClear=CB.name*10+5
|
C.pc=true
|
||||||
goto skipB2Breduce
|
else
|
||||||
|
C.pc=false
|
||||||
end
|
end
|
||||||
|
|
||||||
::checkB2Breduce::
|
if not C.special then
|
||||||
if not(dospin or cc>3)then
|
|
||||||
P.b2b=max(P.b2b-250,0)
|
P.b2b=max(P.b2b-250,0)
|
||||||
P:showText(text.clear[cc],0,-30,27+cc*3,"appear",(8-cc)*.3)
|
P:showText(text.clear[cc],0,-30,27+cc*3,"appear",(8-cc)*.3)
|
||||||
atk=cc-.5
|
atk=cc-.5
|
||||||
sendTime=20+atk*20
|
sendTime=20+atk*20
|
||||||
cscore=cscore+clearSCR[cc]
|
cscore=cscore+clearSCR[cc]
|
||||||
P.lastClear=cc
|
|
||||||
end
|
end
|
||||||
::skipB2Breduce::
|
|
||||||
|
|
||||||
sendTime=sendTime+25*cmb
|
sendTime=sendTime+25*cmb
|
||||||
if cmb>1 then
|
if cmb>1 then
|
||||||
@@ -2330,7 +2344,7 @@ do--player.drop(P)--Place piece
|
|||||||
local M=#P.atker
|
local M=#P.atker
|
||||||
if M>0 then
|
if M>0 then
|
||||||
for i=1,M do
|
for i=1,M do
|
||||||
P:attack(P.atker[i],send,sendTime,M,CB.color,P.lastClear,dospin,cmb)
|
P:attack(P.atker[i],send,sendTime,M,CB.color,C,cmb)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
T=randomTarget(P)
|
T=randomTarget(P)
|
||||||
@@ -2343,7 +2357,7 @@ do--player.drop(P)--Place piece
|
|||||||
T=randomTarget(P)
|
T=randomTarget(P)
|
||||||
end
|
end
|
||||||
if T then
|
if T then
|
||||||
P:attack(T,send,sendTime,1,CB.color,P.lastClear,dospin,cmb)
|
P:attack(T,send,sendTime,1,CB.color,C,cmb)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if P.human and send>3 then SFX.play("emit",min(send,7)*.1)end
|
if P.human and send>3 then SFX.play("emit",min(send,7)*.1)end
|
||||||
|
|||||||
Reference in New Issue
Block a user