自定义游戏高级设置加入新增功能,最高场地高度机制微调,增加可视化

This commit is contained in:
MrZ626
2021-05-13 14:47:17 +08:00
parent a04438dbf8
commit 70408e4a2e
11 changed files with 97 additions and 65 deletions

View File

@@ -571,6 +571,10 @@ function draw.norm(P)
gc_setLineWidth(4)
gc_line(0,fieldTop-FBN,300,fieldTop-FBN)
--Draw height limit line
gc_setColor(.4,.7+sin(t*12)*.3,1,.7)
gc_rectangle('fill',0,-ENV.heightLimit*30-FBN-2,300,4)
--Draw FXs
drawFXs(P)

View File

@@ -1,15 +1,11 @@
return{
das=10,
arr=2,
das=10,arr=2,
dascut=0,
sddas=2,
sdarr=2,
ihs=true,
irs=true,
ims=true,
sddas=2,sdarr=2,
ihs=true,irs=true,ims=true,
swap=true,
ghost=.3,center=1,
block=true,ghost=.3,center=1,
smooth=false,grid=.16,
upEdge=true,
bagLine=true,
@@ -32,7 +28,7 @@ return{
drop=60,lock=60,
wait=0,fall=0,
bone=false,
fieldH=20,maxOver=1e99,
fieldH=20,heightLimit=1e99,
nextCount=6,nextStartPos=1,
holdCount=1,infHold=false,phyHold=false,
ospin=true,deepDrop=false,initSkip=false,
@@ -45,7 +41,6 @@ return{
life=0,
garbageSpeed=1,
pushSpeed=3,
block=true,
noTele=false,
visible='show',
freshLimit=1e99,easyFresh=true,

View File

@@ -277,7 +277,7 @@ function Player:garbageRise(color,amount,line)--Release n-lines garbage to field
_=self.dropFX[i]
_[3],_[5]=_[3]+amount,_[5]+amount
end
if #self.field>self.gameEnv.fieldH+self.gameEnv.maxOver then self:lose()end
if #self.field>self.gameEnv.heightLimit then self:lose()end
end
local invList={2,1,4,3,5,6,7}
@@ -1444,6 +1444,9 @@ do--Player.drop(self)--Place piece
end
end
--Check height limit
if cc==0 and #self.field>ENV.heightLimit then self:lose()end
--Update stat
Stat.score=Stat.score+cscore
Stat.piece=Stat.piece+1