玩家lastClear属性升级为lastPiece,自定义模式花样更多了

This commit is contained in:
MrZ626
2020-11-07 01:34:13 +08:00
parent e08aeef6cb
commit 195429c67c
11 changed files with 146 additions and 145 deletions

View File

@@ -1,6 +1,6 @@
local min=math.min
local function check_c4w(P)
if #P.clearedRow>0 then
if #P.lastPiece.row>0 then
for _=1,#P.clearedRow do
P.field[#P.field+1]=FREEROW.get(13)
P.visTime[#P.visTime+1]=FREEROW.get(20)

View File

@@ -1,10 +1,10 @@
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 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.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()
return
end

View File

@@ -1,7 +1,6 @@
local gc=love.graphics
local function check_LVup(P)
if #P.clearedRow>0 then
local p=P.modeData.point+P.lastClear.row
local p=P.modeData.point+P.lastPiece.row
if p>=P.gameEnv.target then
local ENV=P.gameEnv
local T=ENV.target
@@ -128,7 +127,6 @@ local function check_LVup(P)
end
end
P.modeData.point=p
end
end
return{

View File

@@ -1,8 +1,9 @@
local format=string.format
local int=math.floor
local function tech_check_hard(P)
if #P.clearedRow>0 then
if not P.lastClear.special then
local C=P.lastPiece
if C.row>0 then
if not C.special then
P:lose()
return
end

View File

@@ -1,8 +1,9 @@
local format=string.format
local int=math.floor
local function tech_check_hard(P)
if #P.clearedRow>0 then
if not(P.lastClear.spin or P.lastClear.pc)then
local C=P.lastPiece
if C.row>0 then
if not(C.spin or C.pc)then
P:lose()
return
end

View File

@@ -1,8 +1,9 @@
local format=string.format
local int=math.floor
local function tech_check_hard(P)
if #P.clearedRow>0 then
if not(P.lastClear.spin or P.lastClear.pc)then
local C=P.lastPiece
if C.row>0 then
if not(C.spin or C.pc)then
P:lose()
return
end

View File

@@ -1,8 +1,9 @@
local format=string.format
local int=math.floor
local function tech_check_hard(P)
if #P.clearedRow>0 then
if not(P.lastClear.spin or P.lastClear.pc)then
local C=P.lastPiece
if C.row>0 then
if not(C.spin or C.pc)then
P:lose()
return
end

View File

@@ -1,6 +1,6 @@
local function check_tsd(P)
if #P.clearedRow>0 then
local C=P.lastClear
local C=P.lastPiece
if C.row>0 then
if C.id==5 and C.row==2 and C.spin then
P.modeData.event=P.modeData.event+1
else

View File

@@ -1,6 +1,6 @@
local function check_tsd(P)
if #P.clearedRow>0 then
local C=P.lastClear
local C=P.lastPiece
if C.row>0 then
if C.id==5 and C.row==2 and C.spin then
P.modeData.event=P.modeData.event+1
else

View File

@@ -1,6 +1,6 @@
local function check_tsd(P)
if #P.clearedRow>0 then
local C=P.lastClear
local C=P.lastPiece
if C.row>0 then
if C.id==5 and C.row==2 and C.spin then
P.modeData.event=P.modeData.event+1
else

View File

@@ -1408,13 +1408,11 @@ local function newEmptyPlayer(id,x,y,size)
P.freshTime=0
P.spinLast=false
P.lastClear={
id=1,--block id
name=1,--block name
P.lastPiece={
id=0,name=0,--block id/name
row=0,--line cleared
spin=false,--if spin
mini=false,--if mini
pc=false,--if pc
spin=false,mini=false,--if spin/mini
pc=false,hpc=false,--if pc/hpc
special=false,--if special clear (spin, >=4, pc)
}
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
end
if cc>0 then--If lines cleared, about 200 lines below
local C=P.lastClear
local C=P.lastPiece
C.id,C.name=CB.id,CB.name
C.row=cc
C.spin=dospin
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
cmb=cmb+1
if dospin then
cscore=(spinSCR[CB.name]or spinSCR[8])[cc]
@@ -2375,7 +2375,6 @@ do--player.drop(P)--Place piece
end
--PC/HPC bonus
C.pc,C.hpc=false,false
if clear and #P.field==0 then
P:showText(text.PC,0,-80,50,"flicker")
atk=atk*.5+min(8+STAT.pc*2,20)