玩家lastClear属性升级为lastPiece,自定义模式花样更多了
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
local min=math.min
|
local min=math.min
|
||||||
local function check_c4w(P)
|
local function check_c4w(P)
|
||||||
if #P.clearedRow>0 then
|
if #P.lastPiece.row>0 then
|
||||||
for _=1,#P.clearedRow do
|
for _=1,#P.clearedRow do
|
||||||
P.field[#P.field+1]=FREEROW.get(13)
|
P.field[#P.field+1]=FREEROW.get(13)
|
||||||
P.visTime[#P.visTime+1]=FREEROW.get(20)
|
P.visTime[#P.visTime+1]=FREEROW.get(20)
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local dropSpeed={[0]=60,50,40,30,25,20,15,12,9,7,5,4,3,2,1,1,.5,.5,.25,.25}
|
local dropSpeed={[0]=60,50,40,30,25,20,15,12,9,7,5,4,3,2,1,1,.5,.5,.25,.25}
|
||||||
local function check_LVup(P)
|
local function check_LVup(P)
|
||||||
if P.combo>1 or P.b2b>0 or P.lastClear.row>1 then
|
if P.combo>1 or P.b2b>0 or P.lastPiece.row>1 then
|
||||||
if P.combo>1 then P:showText("2x",0,-220,40,"flicker",.3)end
|
if P.combo>1 then P:showText("2x",0,-220,40,"flicker",.3)end
|
||||||
if P.b2b>0 then P:showText("spin",0,-160,40,"flicker",.3)end
|
if P.b2b>0 then P:showText("spin",0,-160,40,"flicker",.3)end
|
||||||
if P.lastClear.row>1 then P:showText("1+",0,-100,40,"flicker",.3)end
|
if P.lastPiece.row>1 then P:showText("1+",0,-100,40,"flicker",.3)end
|
||||||
P:lose()
|
P:lose()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,134 +1,132 @@
|
|||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local function check_LVup(P)
|
local function check_LVup(P)
|
||||||
if #P.clearedRow>0 then
|
local p=P.modeData.point+P.lastPiece.row
|
||||||
local p=P.modeData.point+P.lastClear.row
|
if p>=P.gameEnv.target then
|
||||||
if p>=P.gameEnv.target then
|
local ENV=P.gameEnv
|
||||||
local ENV=P.gameEnv
|
local T=ENV.target
|
||||||
local T=ENV.target
|
--Stage 1: clear 3 techrash
|
||||||
--Stage 1: clear 3 techrash
|
if T==12 then--Stage 2: swap color of S/Z & J/L
|
||||||
if T==12 then--Stage 2: swap color of S/Z & J/L
|
P.waiting=30
|
||||||
P.waiting=30
|
P.curMission=nil
|
||||||
P.curMission=nil
|
|
||||||
|
|
||||||
ENV.skin[1],ENV.skin[2]=ENV.skin[2],ENV.skin[1]
|
ENV.skin[1],ENV.skin[2]=ENV.skin[2],ENV.skin[1]
|
||||||
ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3]
|
ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3]
|
||||||
|
|
||||||
ENV.lock=14
|
ENV.lock=14
|
||||||
ENV.wait=7
|
ENV.wait=7
|
||||||
ENV.fall=7
|
ENV.fall=7
|
||||||
ENV.next=4
|
ENV.next=4
|
||||||
|
|
||||||
ENV.target=26
|
ENV.target=26
|
||||||
SFX.play("reach")
|
SFX.play("reach")
|
||||||
elseif T==26 then--Stage 3: dig to bottom
|
elseif T==26 then--Stage 3: dig to bottom
|
||||||
if not P.hd then P.life=P.life+1 end--1 up if ban hold
|
if not P.hd then P.life=P.life+1 end--1 up if ban hold
|
||||||
P.waiting=45
|
P.waiting=45
|
||||||
ENV.skin[1],ENV.skin[2]=ENV.skin[2],ENV.skin[1]
|
ENV.skin[1],ENV.skin[2]=ENV.skin[2],ENV.skin[1]
|
||||||
ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3]
|
ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3]
|
||||||
|
|
||||||
for i=1,10 do
|
for i=1,10 do
|
||||||
if P.field[i]then
|
if P.field[i]then
|
||||||
for j=1,10 do
|
for j=1,10 do
|
||||||
if P.field[i][j]>0 then
|
if P.field[i][j]>0 then
|
||||||
P.field[i][j]=17
|
P.field[i][j]=17
|
||||||
P.visTime[i][j]=15
|
P.visTime[i][j]=15
|
||||||
end
|
|
||||||
end
|
|
||||||
for _=1,5 do
|
|
||||||
P.field[i][P:RND(10)]=0
|
|
||||||
end
|
|
||||||
else
|
|
||||||
P.field[i]=FREEROW.get(0)
|
|
||||||
P.visTime[i]=FREEROW.get(30)
|
|
||||||
for j=1,10 do
|
|
||||||
if P:RND()>.9 then
|
|
||||||
P.field[i][j]=math.random(16)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
for _=1,5 do
|
||||||
P.field[i][P:RND(10)]=0
|
P.field[i][P:RND(10)]=0
|
||||||
end
|
end
|
||||||
P.field[i][11]=true
|
|
||||||
end
|
|
||||||
P.garbageBeneath=10
|
|
||||||
for i=1,10 do
|
|
||||||
P:createClearingFX(i,1.5)
|
|
||||||
end
|
|
||||||
sysFX.newShade(.4,1,1,1,P.x+150*P.size,P.y+370*P.size,300*P.size,300*P.size)
|
|
||||||
|
|
||||||
ENV.lock=13
|
|
||||||
ENV.wait=6
|
|
||||||
ENV.fall=6
|
|
||||||
ENV.next=5
|
|
||||||
|
|
||||||
ENV.target=42
|
|
||||||
SFX.play("reach")
|
|
||||||
elseif T==42 then--Stage 4: survive in high speed
|
|
||||||
if P.garbageBeneath==0 then
|
|
||||||
P.waiting=30
|
|
||||||
ENV.lock=11
|
|
||||||
ENV.next=6
|
|
||||||
ENV.hold=false
|
|
||||||
ENV.bone=true
|
|
||||||
|
|
||||||
ENV.target=62
|
|
||||||
else
|
else
|
||||||
p=41
|
P.field[i]=FREEROW.get(0)
|
||||||
|
P.visTime[i]=FREEROW.get(30)
|
||||||
|
for j=1,10 do
|
||||||
|
if P:RND()>.9 then
|
||||||
|
P.field[i][j]=math.random(16)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
P.field[i][P:RND(10)]=0
|
||||||
end
|
end
|
||||||
elseif T==62 then--Stage 5: survive without easy-fresh rule
|
P.field[i][11]=true
|
||||||
P.life=1
|
|
||||||
ENV.lock=13
|
|
||||||
ENV.wait=5
|
|
||||||
ENV.fall=5
|
|
||||||
|
|
||||||
ENV.easyFresh=false
|
|
||||||
|
|
||||||
ENV.target=126
|
|
||||||
SFX.play("reach")
|
|
||||||
elseif T==126 then--Stage 6: speed up
|
|
||||||
P.life=P.life+1
|
|
||||||
|
|
||||||
ENV.lock=11
|
|
||||||
ENV.wait=4
|
|
||||||
ENV.fall=4
|
|
||||||
|
|
||||||
ENV.target=162
|
|
||||||
elseif T==162 then--Stage 7: speed up+++
|
|
||||||
P.life=P.life+1
|
|
||||||
|
|
||||||
ENV.lock=10
|
|
||||||
|
|
||||||
ENV.hold=true
|
|
||||||
P.keepVisible=false
|
|
||||||
P.showTime=180
|
|
||||||
|
|
||||||
ENV.target=226
|
|
||||||
SFX.play("reach")
|
|
||||||
elseif T==226 then--Stage 8: final invisible
|
|
||||||
P.life=P.life+2
|
|
||||||
|
|
||||||
ENV.bone=false
|
|
||||||
P.showTime=90
|
|
||||||
|
|
||||||
ENV.target=259
|
|
||||||
SFX.play("reach")
|
|
||||||
elseif T==259 then--Stage 9: ending
|
|
||||||
P.life=P.life+1
|
|
||||||
for i=1,7 do ENV.skin[i]=math.random(16)end
|
|
||||||
|
|
||||||
P.showTime=40
|
|
||||||
ENV.lock=15
|
|
||||||
P.curMission=1
|
|
||||||
ENV.mission={4,4,4,4,4,4,4,4}
|
|
||||||
ENV.missionKill=false
|
|
||||||
|
|
||||||
ENV.target=260
|
|
||||||
SFX.play("blip_2")
|
|
||||||
else
|
|
||||||
p=P.result=="WIN"and 260 or 259
|
|
||||||
end
|
end
|
||||||
|
P.garbageBeneath=10
|
||||||
|
for i=1,10 do
|
||||||
|
P:createClearingFX(i,1.5)
|
||||||
|
end
|
||||||
|
sysFX.newShade(.4,1,1,1,P.x+150*P.size,P.y+370*P.size,300*P.size,300*P.size)
|
||||||
|
|
||||||
|
ENV.lock=13
|
||||||
|
ENV.wait=6
|
||||||
|
ENV.fall=6
|
||||||
|
ENV.next=5
|
||||||
|
|
||||||
|
ENV.target=42
|
||||||
|
SFX.play("reach")
|
||||||
|
elseif T==42 then--Stage 4: survive in high speed
|
||||||
|
if P.garbageBeneath==0 then
|
||||||
|
P.waiting=30
|
||||||
|
ENV.lock=11
|
||||||
|
ENV.next=6
|
||||||
|
ENV.hold=false
|
||||||
|
ENV.bone=true
|
||||||
|
|
||||||
|
ENV.target=62
|
||||||
|
else
|
||||||
|
p=41
|
||||||
|
end
|
||||||
|
elseif T==62 then--Stage 5: survive without easy-fresh rule
|
||||||
|
P.life=1
|
||||||
|
ENV.lock=13
|
||||||
|
ENV.wait=5
|
||||||
|
ENV.fall=5
|
||||||
|
|
||||||
|
ENV.easyFresh=false
|
||||||
|
|
||||||
|
ENV.target=126
|
||||||
|
SFX.play("reach")
|
||||||
|
elseif T==126 then--Stage 6: speed up
|
||||||
|
P.life=P.life+1
|
||||||
|
|
||||||
|
ENV.lock=11
|
||||||
|
ENV.wait=4
|
||||||
|
ENV.fall=4
|
||||||
|
|
||||||
|
ENV.target=162
|
||||||
|
elseif T==162 then--Stage 7: speed up+++
|
||||||
|
P.life=P.life+1
|
||||||
|
|
||||||
|
ENV.lock=10
|
||||||
|
|
||||||
|
ENV.hold=true
|
||||||
|
P.keepVisible=false
|
||||||
|
P.showTime=180
|
||||||
|
|
||||||
|
ENV.target=226
|
||||||
|
SFX.play("reach")
|
||||||
|
elseif T==226 then--Stage 8: final invisible
|
||||||
|
P.life=P.life+2
|
||||||
|
|
||||||
|
ENV.bone=false
|
||||||
|
P.showTime=90
|
||||||
|
|
||||||
|
ENV.target=259
|
||||||
|
SFX.play("reach")
|
||||||
|
elseif T==259 then--Stage 9: ending
|
||||||
|
P.life=P.life+1
|
||||||
|
for i=1,7 do ENV.skin[i]=math.random(16)end
|
||||||
|
|
||||||
|
P.showTime=40
|
||||||
|
ENV.lock=15
|
||||||
|
P.curMission=1
|
||||||
|
ENV.mission={4,4,4,4,4,4,4,4}
|
||||||
|
ENV.missionKill=false
|
||||||
|
|
||||||
|
ENV.target=260
|
||||||
|
SFX.play("blip_2")
|
||||||
|
else
|
||||||
|
p=P.result=="WIN"and 260 or 259
|
||||||
end
|
end
|
||||||
P.modeData.point=p
|
|
||||||
end
|
end
|
||||||
|
P.modeData.point=p
|
||||||
end
|
end
|
||||||
|
|
||||||
return{
|
return{
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local int=math.floor
|
local int=math.floor
|
||||||
local function tech_check_hard(P)
|
local function tech_check_hard(P)
|
||||||
if #P.clearedRow>0 then
|
local C=P.lastPiece
|
||||||
if not P.lastClear.special then
|
if C.row>0 then
|
||||||
|
if not C.special then
|
||||||
P:lose()
|
P:lose()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local int=math.floor
|
local int=math.floor
|
||||||
local function tech_check_hard(P)
|
local function tech_check_hard(P)
|
||||||
if #P.clearedRow>0 then
|
local C=P.lastPiece
|
||||||
if not(P.lastClear.spin or P.lastClear.pc)then
|
if C.row>0 then
|
||||||
|
if not(C.spin or C.pc)then
|
||||||
P:lose()
|
P:lose()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local int=math.floor
|
local int=math.floor
|
||||||
local function tech_check_hard(P)
|
local function tech_check_hard(P)
|
||||||
if #P.clearedRow>0 then
|
local C=P.lastPiece
|
||||||
if not(P.lastClear.spin or P.lastClear.pc)then
|
if C.row>0 then
|
||||||
|
if not(C.spin or C.pc)then
|
||||||
P:lose()
|
P:lose()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
local format=string.format
|
local format=string.format
|
||||||
local int=math.floor
|
local int=math.floor
|
||||||
local function tech_check_hard(P)
|
local function tech_check_hard(P)
|
||||||
if #P.clearedRow>0 then
|
local C=P.lastPiece
|
||||||
if not(P.lastClear.spin or P.lastClear.pc)then
|
if C.row>0 then
|
||||||
|
if not(C.spin or C.pc)then
|
||||||
P:lose()
|
P:lose()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local function check_tsd(P)
|
local function check_tsd(P)
|
||||||
if #P.clearedRow>0 then
|
local C=P.lastPiece
|
||||||
local C=P.lastClear
|
if C.row>0 then
|
||||||
if C.id==5 and C.row==2 and C.spin then
|
if C.id==5 and C.row==2 and C.spin then
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local function check_tsd(P)
|
local function check_tsd(P)
|
||||||
if #P.clearedRow>0 then
|
local C=P.lastPiece
|
||||||
local C=P.lastClear
|
if C.row>0 then
|
||||||
if C.id==5 and C.row==2 and C.spin then
|
if C.id==5 and C.row==2 and C.spin then
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local function check_tsd(P)
|
local function check_tsd(P)
|
||||||
if #P.clearedRow>0 then
|
local C=P.lastPiece
|
||||||
local C=P.lastClear
|
if C.row>0 then
|
||||||
if C.id==5 and C.row==2 and C.spin then
|
if C.id==5 and C.row==2 and C.spin then
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1408,13 +1408,11 @@ local function newEmptyPlayer(id,x,y,size)
|
|||||||
|
|
||||||
P.freshTime=0
|
P.freshTime=0
|
||||||
P.spinLast=false
|
P.spinLast=false
|
||||||
P.lastClear={
|
P.lastPiece={
|
||||||
id=1,--block id
|
id=0,name=0,--block id/name
|
||||||
name=1,--block name
|
|
||||||
row=0,--line cleared
|
row=0,--line cleared
|
||||||
spin=false,--if spin
|
spin=false,mini=false,--if spin/mini
|
||||||
mini=false,--if mini
|
pc=false,hpc=false,--if pc/hpc
|
||||||
pc=false,--if pc
|
|
||||||
special=false,--if special clear (spin, >=4, 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
|
||||||
@@ -2291,11 +2289,13 @@ do--player.drop(P)--Place piece
|
|||||||
if P.sound then SFX.fieldPlay("lock",nil,P)end
|
if P.sound then SFX.fieldPlay("lock",nil,P)end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local C=P.lastPiece
|
||||||
|
C.id,C.name=CB.id,CB.name
|
||||||
|
C.row=cc
|
||||||
|
C.spin,C.mini=dospin,false
|
||||||
|
C.pc,C.hpc=false,false
|
||||||
|
C.special=false
|
||||||
if cc>0 then--If lines cleared, about 200 lines below
|
if cc>0 then--If lines cleared, about 200 lines below
|
||||||
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]
|
||||||
@@ -2375,7 +2375,6 @@ do--player.drop(P)--Place piece
|
|||||||
end
|
end
|
||||||
|
|
||||||
--PC/HPC bonus
|
--PC/HPC bonus
|
||||||
C.pc,C.hpc=false,false
|
|
||||||
if clear and #P.field==0 then
|
if clear and #P.field==0 then
|
||||||
P:showText(text.PC,0,-80,50,"flicker")
|
P:showText(text.PC,0,-80,50,"flicker")
|
||||||
atk=atk*.5+min(8+STAT.pc*2,20)
|
atk=atk*.5+min(8+STAT.pc*2,20)
|
||||||
|
|||||||
Reference in New Issue
Block a user