Add Big Mode (#515)

I even halved the gravity :)
This commit is contained in:
NOT_A_ROBOT
2021-11-30 23:10:00 +07:00
committed by GitHub
parent c0adf5bf0b
commit 83b5e217e5
5 changed files with 144 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
return{
hook_drop=function(P)
if P.lastPiece.row>0 then
for _=1,#P.clearedRow do
local h=#P.field
P.field[h+1]=LINE.new(20)
P.visTime[h+1]=LINE.new(20)
for i=3,7 do P.field[h+1][i]=0 end
end
if P.combo>P.modeData.maxCombo then
P.modeData.maxCombo=P.combo
end
if P.stat.row>=200 then
P:win('finish')
end
end
end
}

38
parts/eventsets/big_h.lua Normal file
View File

@@ -0,0 +1,38 @@
return
{
drop=1,
wait=8,
fall=20,
mesDisp=function(P)
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
PLY.draw.drawTargetLine(P,200-P.stat.row)
end,
task=function(P)
local F=P.field
for i=1,24 do
F[i]=LINE.new(20)
P.visTime[i]=LINE.new(20)
for x=3,7 do F[i][x]=0 end
end
P.modeData.target=50
end,
hook_drop=function(P)
if P.stat.row>=P.modeData.target then
if P.modeData.target==50 then
P.gameEnv.drop=.5
P.modeData.target=100
SFX.play('reach')
elseif P.modeData.target==100 then
P.gameEnv.drop=.25
P.modeData.target=150
SFX.play('reach')
elseif P.modeData.target==150 then
P:set20G(true)
P.modeData.target=200
SFX.play('reach')
else
P:win('finish')
end
end
end
}

32
parts/eventsets/big_n.lua Normal file
View File

@@ -0,0 +1,32 @@
local dropSpeed={100,80,60,48,36,28,20,16,12,10,8,6,4,2,2,1,1,.5,.5}
return
{
drop=120,
wait=8,
fall=20,
mesDisp=function(P)
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
PLY.draw.drawTargetLine(P,200-P.stat.row)
end,
task=function(P)
local F=P.field
for i=1,24 do
F[i]=LINE.new(20)
P.visTime[i]=LINE.new(20)
for x=3,7 do F[i][x]=0 end
end
P.modeData.target=10
end,
hook_drop=function(P)
if P.stat.row>=P.modeData.target then
if P.modeData.target==200 then
P:win('finish')
else
P.gameEnv.drop=dropSpeed[P.modeData.target/10]
P.modeData.target=P.modeData.target+10
SFX.play('reach')
end
end
end
}

28
parts/modes/big_h.lua Normal file
View File

@@ -0,0 +1,28 @@
return{
env={
noTele=true,
mindas=7,minarr=1,minsdarr=1,
sequence="bagES",
hook_drop=require'parts.eventsets.bigWallGen'.hook_drop,
eventSet='big_h',
bg='cubes',bgm='push',
},
score=function(P)return{math.min(P.modeData.maxCombo,100),P.stat.time}end,
scoreDisp=function(D)return D[1].." Combo "..STRING.time(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row
if L>=200 then
local T=P.stat.time
return
T<=160 and 5 or
T<=280 and 4 or
3
else
return
L>=100 and 2 or
L>=50 and 1 or
L>=10 and 0
end
end,
}

28
parts/modes/big_n.lua Normal file
View File

@@ -0,0 +1,28 @@
return{
env={
noTele=true,
mindas=7,minarr=1,minsdarr=1,
sequence="bagES",
hook_drop=require'parts.eventsets.bigWallGen'.hook_drop,
eventSet='big_n',
bg='bg2',bgm='push',
},
score=function(P)return{math.min(P.modeData.maxCombo,100),P.stat.time}end,
scoreDisp=function(D)return D[1].." Combo "..STRING.time(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row
if L>=200 then
local T=P.stat.time
return
T<=180 and 5 or
T<=300 and 4 or
3
else
return
L>=150 and 2 or
L>=100 and 1 or
L>=20 and 0
end
end,
}