模式和语言文件移入parts文件夹
This commit is contained in:
57
parts/modes/GM.lua
Normal file
57
parts/modes/GM.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
local int,min=math.floor,math.min
|
||||
local sectionName={"M7","M8","M9","M","MK","MV","MO","MM","GM"}
|
||||
local function score(P)
|
||||
--If Less then MM
|
||||
if P.modeData.point<70 then
|
||||
local R=#P.clearedRow
|
||||
if R==0 then return end
|
||||
if R==4 then R=10 end
|
||||
P.modeData.point=P.modeData.point+R
|
||||
P.modeData.event=sectionName[int(P.modeData.point*.1)+1]
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.lBlue,
|
||||
env={
|
||||
noTele=true,
|
||||
minarr=1,
|
||||
drop=0,lock=15,
|
||||
wait=15,fall=6,
|
||||
next=3,
|
||||
visible="fast",
|
||||
freshLimit=15,
|
||||
dropPiece=score,
|
||||
task=function(P)
|
||||
if P.stat.time>=53.5 then
|
||||
P.modeData.point=min(P.modeData.point+16,80)
|
||||
P.modeData.event=sectionName[int(P.modeData.point*.1)+1]
|
||||
P:win("finish")
|
||||
return true
|
||||
end
|
||||
end,
|
||||
bg="tunnel",bgm="far",
|
||||
},
|
||||
slowMark=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
PLAYERS[1].modeData.event="M7"
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
mText(drawableText.line,69,370)
|
||||
mText(drawableText.techrash,69,490)
|
||||
mText(drawableText.grade,69,240)
|
||||
setFont(55)
|
||||
mStr(P.modeData.event,69,180)
|
||||
setFont(75)
|
||||
mStr(P.stat.row,69,290)
|
||||
mStr(P.stat.clears[4],69,410)
|
||||
end,
|
||||
score=function(P)return{P.modeData.point,P.stat.score}end,
|
||||
scoreDisp=function(D)return sectionName[int(D[1]*.1)+1].." "..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)
|
||||
P=P.modeData.point
|
||||
return P==80 and 5 or P>=70 and 4 or P>=60 and 3 or P>=40 and 2 or P>=20 and 1 or P>=5 and 0
|
||||
end,
|
||||
}
|
||||
68
parts/modes/PCbase.lua
Normal file
68
parts/modes/PCbase.lua
Normal file
@@ -0,0 +1,68 @@
|
||||
return{
|
||||
{
|
||||
{
|
||||
{4,4,4,3,3,3,7,0,0,0},
|
||||
{4,1,6,6,2,3,7,0,0,0},
|
||||
{1,1,6,6,2,2,7,0,0,0},
|
||||
{1,7,7,7,7,2,7,0,0,0},
|
||||
},
|
||||
{
|
||||
{4,4,4,3,3,3,0,0,0,7},
|
||||
{4,1,6,6,2,3,0,0,0,7},
|
||||
{1,1,6,6,2,2,0,0,0,7},
|
||||
{1,7,7,7,7,2,0,0,0,7},
|
||||
},
|
||||
{
|
||||
{2,7,7,7,7,1,7,0,0,0},
|
||||
{2,2,6,6,1,1,7,0,0,0},
|
||||
{3,2,6,6,1,4,7,0,0,0},
|
||||
{3,3,3,4,4,4,7,0,0,0},
|
||||
},
|
||||
{
|
||||
{2,7,7,7,7,1,0,0,0,7},
|
||||
{2,2,6,6,1,1,0,0,0,7},
|
||||
{3,2,6,6,1,4,0,0,0,7},
|
||||
{3,3,3,4,4,4,0,0,0,7},
|
||||
},
|
||||
},--3*4 shape
|
||||
{
|
||||
{
|
||||
{1,1,0,0,0,0,0,3,3,3},
|
||||
{5,1,1,0,0,0,0,6,6,3},
|
||||
{5,5,2,2,0,0,0,6,6,4},
|
||||
{5,2,2,0,0,0,0,4,4,4},
|
||||
},
|
||||
{
|
||||
{1,1,0,0,0,0,0,4,4,4},
|
||||
{5,1,1,0,0,0,0,4,6,6},
|
||||
{5,5,2,2,0,0,0,3,6,6},
|
||||
{5,2,2,0,0,0,0,3,3,3},
|
||||
},
|
||||
{
|
||||
{3,3,3,1,1,0,0,0,0,0},
|
||||
{6,6,3,5,1,1,0,0,0,0},
|
||||
{6,6,4,5,5,2,2,0,0,0},
|
||||
{4,4,4,5,2,2,0,0,0,0},
|
||||
},
|
||||
{
|
||||
{4,4,4,1,1,0,0,0,0,0},
|
||||
{4,6,6,5,1,1,0,0,0,0},
|
||||
{3,6,6,5,5,2,2,0,0,0},
|
||||
{3,3,3,5,2,2,0,0,0,0},
|
||||
},
|
||||
},--7 piece opener(right>)(without i)
|
||||
{
|
||||
{
|
||||
{4,4,4,3,3,3,0,0,0,0},
|
||||
{4,1,6,6,2,3,0,0,0,0},
|
||||
{1,1,6,6,2,2,0,0,0,0},
|
||||
{1,7,7,7,7,2,0,0,0,0},
|
||||
},
|
||||
{
|
||||
{2,7,7,7,7,1,0,0,0,0},
|
||||
{2,2,6,6,1,1,0,0,0,0},
|
||||
{3,2,6,6,1,4,0,0,0,0},
|
||||
{3,3,3,4,4,4,0,0,0,0},
|
||||
},
|
||||
},--6 piece opener
|
||||
}
|
||||
77
parts/modes/PClist.lua
Normal file
77
parts/modes/PClist.lua
Normal file
@@ -0,0 +1,77 @@
|
||||
return{
|
||||
{
|
||||
{1,3,3},{1,3,4},{1,5,3},{3,1,3},{3,1,4},{3,2,4},{3,3,2},{3,3,5},{3,3,6},{3,3,7},
|
||||
{3,4,1},{3,4,5},{3,4,6},{3,5,3},{3,5,4},{3,5,5},{3,6,3},{3,6,4},{3,7,3},{3,7,4},
|
||||
{5,3,4},{5,3,5},{5,5,1},{5,5,3},{5,7,3},{6,3,3},{6,3,4},{6,6,7},{6,7,6},{7,3,3},
|
||||
{7,3,4},{7,5,3},{7,6,6},{7,7,7},
|
||||
},--3*4 shape
|
||||
{
|
||||
{5,3,4,4},{5,3,7,7},{5,7,4,4},{4,2,4,4},{3,5,4,4},{3,4,5,4},{3,3,7,4},{7,5,4,4},{1,5,1,1},{1,5,5,5},
|
||||
{1,5,7,4},{1,2,4,5},{1,4,5,5},{1,4,5,2},{1,4,2,5},{1,4,4,4},{5,1,4,5},{5,5,4,1},{5,5,4,2},{5,5,4,4},
|
||||
{5,4,5,4},{5,4,4,5},{5,4,4,3},{5,7,4,6},{5,7,4,3},{2,5,4,4},{6,4,4,4},{6,7,4,6},{4,1,2,5},{4,1,4,4},
|
||||
{4,5,4,5},{4,5,7,7},{4,6,4,4},{4,4,6,4},{4,4,3,5},{4,4,3,6},{4,3,4,5},{4,3,4,6},{4,7,3,4},{4,7,7,5},
|
||||
{3,1,4,4},{3,1,4,3},{3,1,3,4},{3,5,5,4},{3,5,4,5},{3,5,7,7},{3,2,5,2},{3,2,4,4},{3,6,4,4},{3,6,3,3},
|
||||
{3,4,1,3},{3,4,4,5},{3,4,4,6},{3,4,3,7},{3,3,6,3},{3,7,5,7},{3,7,4,3},{3,7,3,4},{7,5,4,6},{7,5,4,3},
|
||||
{7,5,3,4},{7,5,7,1},{7,6,4,6},{7,4,1,5},{7,4,5,6},{7,4,3,4},{7,4,7,5},{7,3,1,5},{7,3,5,7},{7,3,4,4},
|
||||
{7,3,3,4},{7,3,7,5},{7,7,4,5},{7,7,7,4},{1,1,5,2},{1,1,7,4},{1,5,1,2},{1,5,1,3},{1,5,5,2},{1,5,2,1},
|
||||
{1,5,2,3},{1,5,6,3},{1,5,6,7},{1,5,4,1},{1,5,4,5},{1,5,4,2},{1,5,4,3},{1,5,4,7},{1,5,3,1},{1,5,3,4},
|
||||
{1,5,7,2},{1,5,7,6},{1,5,7,7},{1,2,5,1},{1,2,5,4},{1,2,7,4},{1,4,1,5},{1,4,5,1},{1,4,5,4},{1,4,6,5},
|
||||
{1,4,4,3},{1,4,3,3},{1,3,1,2},{1,3,5,2},{1,3,4,4},{1,3,4,3},{1,3,3,4},{1,7,1,4},{1,7,5,6},{1,7,5,4},
|
||||
{1,7,5,3},{1,7,5,7},{1,7,2,3},{1,7,6,4},{1,7,4,1},{1,7,4,5},{1,7,4,7},{1,7,3,1},{1,7,7,4},{5,1,5,5},
|
||||
{5,1,5,2},{5,1,5,4},{5,1,2,3},{5,1,6,3},{5,1,4,1},{5,1,4,2},{5,1,4,7},{5,1,7,2},{5,1,7,4},{5,5,1,5},
|
||||
{5,5,1,2},{5,5,1,4},{5,5,5,1},{5,5,5,2},{5,5,5,4},{5,5,5,7},{5,5,2,1},{5,5,2,5},{5,5,6,7},{5,5,4,5},
|
||||
{5,5,4,3},{5,5,3,1},{5,5,3,4},{5,5,7,5},{5,5,7,6},{5,2,1,3},{5,2,5,4},{5,2,4,5},{5,2,3,1},{5,2,3,6},
|
||||
{5,2,7,1},{5,6,1,3},{5,6,5,7},{5,6,6,1},{5,4,1,5},{5,4,1,7},{5,4,5,1},{5,4,5,5},{5,4,5,2},{5,4,5,3},
|
||||
{5,4,2,5},{5,4,4,1},{5,4,4,4},{5,4,3,1},{5,4,3,5},{5,4,3,4},{5,4,7,1},{5,3,5,4},{5,3,5,3},{5,3,2,2},
|
||||
{5,3,6,6},{5,3,4,1},{5,3,4,5},{5,3,4,3},{5,3,3,1},{5,3,3,4},{5,3,3,3},{5,7,1,2},{5,7,1,4},{5,7,1,3},
|
||||
{5,7,5,5},{5,7,5,7},{5,7,2,1},{5,7,6,4},{5,7,6,7},{5,7,4,1},{5,7,4,2},{5,7,4,7},{5,7,3,1},{5,7,3,2},
|
||||
{5,7,3,6},{5,7,3,4},{5,7,3,7},{5,7,7,1},{5,7,7,6},{5,7,7,4},{5,7,7,3},{2,1,5,1},{2,1,4,5},{2,1,7,4},
|
||||
{2,5,1,1},{2,5,4,5},{2,5,3,6},{2,4,1,5},{2,4,4,4},{2,4,4,3},{2,3,5,6},{2,7,1,4},{2,7,5,5},{2,7,4,1},
|
||||
{2,7,3,7},{2,7,7,3},{6,5,6,1},{6,5,3,1},{6,6,5,1},{6,6,4,5},{6,6,7,4},{6,4,6,5},{6,4,7,5},{6,3,4,3},
|
||||
{6,3,3,4},{6,7,6,4},{6,7,4,1},{6,7,4,5},{6,7,4,7},{6,7,7,4},{4,1,1,5},{4,1,5,1},{4,1,5,5},{4,1,5,2},
|
||||
{4,1,5,7},{4,1,6,5},{4,1,4,3},{4,1,3,4},{4,1,3,3},{4,1,7,5},{4,5,5,4},{4,5,4,1},{4,5,4,4},{4,5,4,3},
|
||||
{4,5,3,1},{4,5,3,5},{4,2,1,5},{4,2,4,3},{4,2,3,4},{4,6,6,5},{4,6,4,3},{4,6,3,4},{4,4,1,4},{4,4,1,3},
|
||||
{4,4,5,1},{4,4,5,4},{4,4,5,3},{4,4,2,4},{4,4,4,1},{4,4,4,5},{4,4,4,6},{4,4,7,4},{4,4,7,3},{4,3,6,4},
|
||||
{4,3,4,7},{4,3,3,5},{4,3,7,4},{4,7,1,5},{4,7,5,6},{4,7,5,7},{4,7,2,1},{4,7,2,5},{4,7,6,5},{4,7,4,4},
|
||||
{4,7,4,3},{3,1,1,2},{3,1,5,1},{3,1,5,2},{3,1,2,1},{3,1,6,5},{3,1,6,7},{3,1,7,6},{3,5,1,2},{3,5,5,1},
|
||||
{3,5,5,6},{3,5,5,3},{3,5,2,1},{3,5,2,2},{3,5,6,5},{3,5,6,6},{3,5,4,1},{3,5,4,3},{3,5,3,1},{3,5,3,5},
|
||||
{3,5,3,4},{3,5,3,3},{3,2,1,5},{3,2,5,1},{3,2,2,5},{3,6,1,5},{3,6,1,7},{3,6,5,5},{3,6,5,6},{3,6,6,5},
|
||||
{3,6,4,3},{3,6,3,4},{3,4,5,3},{3,4,2,4},{3,4,6,4},{3,4,6,3},{3,4,3,1},{3,4,3,5},{3,4,3,2},{3,4,3,6},
|
||||
{3,4,7,3},{3,3,1,4},{3,3,5,1},{3,3,5,4},{3,3,5,3},{3,3,6,4},{3,3,4,1},{3,3,4,5},{3,3,4,2},{3,3,4,6},
|
||||
{3,3,4,7},{3,3,3,1},{3,3,3,5},{3,3,3,6},{3,7,1,5},{3,7,5,1},{3,7,5,2},{3,7,2,5},{3,7,6,5},{3,7,7,5},
|
||||
{7,1,1,4},{7,1,5,6},{7,1,5,4},{7,1,5,3},{7,1,5,7},{7,1,2,3},{7,1,6,4},{7,1,4,1},{7,1,4,5},{7,1,4,7},
|
||||
{7,1,3,1},{7,1,7,4},{7,5,1,2},{7,5,1,6},{7,5,1,4},{7,5,1,3},{7,5,1,7},{7,5,5,5},{7,5,5,7},{7,5,2,1},
|
||||
{7,5,6,4},{7,5,6,7},{7,5,4,1},{7,5,4,2},{7,5,4,7},{7,5,3,1},{7,5,3,2},{7,5,3,6},{7,5,3,7},{7,5,7,6},
|
||||
{7,5,7,4},{7,5,7,3},{7,2,1,4},{7,2,1,3},{7,2,5,5},{7,2,4,1},{7,2,3,7},{7,2,7,3},{7,6,1,4},{7,6,5,4},
|
||||
{7,6,6,4},{7,6,4,1},{7,6,4,5},{7,6,4,7},{7,6,7,4},{7,4,5,1},{7,4,5,2},{7,4,5,7},{7,4,2,1},{7,4,2,5},
|
||||
{7,4,6,5},{7,4,4,4},{7,4,4,3},{7,3,5,1},{7,3,5,2},{7,3,5,6},{7,3,5,4},{7,3,2,5},{7,3,2,7},{7,3,6,1},
|
||||
{7,3,6,5},{7,3,4,3},{7,3,7,2},{7,3,7,6},{7,7,1,4},{7,7,5,1},{7,7,5,6},{7,7,5,4},{7,7,5,3},{7,7,2,3},
|
||||
{7,7,6,4},{7,7,6,3},{7,7,4,7},{7,7,3,6},
|
||||
},--7 piece opener (right>)
|
||||
{
|
||||
{1,1,3,4},{1,1,4,3},{1,2,5,3},{1,2,5,4},{1,3,4,7},{1,3,5,5},{1,3,7,3},{1,3,7,4},{1,4,1,4},{1,4,4,6},
|
||||
{1,5,2,3},{1,5,3,2},{1,5,3,5},{1,5,4,7},{1,5,5,2},{1,5,5,4},{1,5,5,5},{1,5,7,3},{1,5,7,4},{1,6,3,3},
|
||||
{1,6,5,3},{1,7,3,3},{1,7,3,4},{1,7,5,3},{1,7,5,4},{3,1,3,7},{3,1,4,7},{3,1,5,5},{3,1,6,3},{3,1,7,3},
|
||||
{3,1,7,4},{3,2,2,3},{3,2,3,2},{3,2,3,6},{3,2,4,5},{3,2,4,7},{3,2,5,5},{3,2,6,3},{3,2,6,4},{3,2,7,4},
|
||||
{3,3,1,5},{3,3,2,6},{3,3,2,7},{3,3,3,3},{3,3,3,4},{3,3,4,3},{3,3,4,4},{3,3,5,3},{3,3,5,4},{3,3,6,1},
|
||||
{3,3,6,6},{3,3,6,7},{3,3,7,2},{3,3,7,5},{3,3,7,6},{3,3,7,7},{3,4,1,2},{3,4,1,5},{3,4,1,7},{3,4,2,1},
|
||||
{3,4,2,5},{3,4,2,7},{3,4,3,3},{3,4,3,4},{3,4,4,3},{3,4,4,4},{3,4,5,3},{3,4,5,4},{3,4,5,7},{3,4,6,1},
|
||||
{3,4,6,2},{3,4,6,7},{3,4,7,1},{3,4,7,2},{3,4,7,5},{3,4,7,6},{3,5,1,2},{3,5,2,3},{3,5,2,5},{3,5,3,2},
|
||||
{3,5,3,3},{3,5,3,4},{3,5,4,3},{3,5,4,6},{3,5,4,7},{3,5,5,5},{3,5,5,7},{3,5,6,4},{3,5,7,3},{3,5,7,4},
|
||||
{3,5,7,5},{3,6,1,3},{3,6,2,3},{3,6,2,4},{3,6,3,1},{3,6,3,5},{3,6,3,6},{3,6,3,7},{3,6,4,2},{3,6,4,7},
|
||||
{3,6,5,4},{3,6,6,3},{3,6,6,4},{3,6,7,3},{3,6,7,4},{3,7,1,3},{3,7,1,4},{3,7,2,4},{3,7,3,2},{3,7,3,5},
|
||||
{3,7,3,6},{3,7,3,7},{3,7,4,1},{3,7,4,2},{3,7,4,5},{3,7,4,6},{3,7,5,3},{3,7,5,4},{3,7,5,5},{3,7,6,3},
|
||||
{3,7,6,4},{3,7,7,3},{3,7,7,4},{5,1,2,3},{5,1,3,2},{5,1,3,4},{5,1,4,1},{5,1,4,7},{5,1,5,4},{5,1,5,5},
|
||||
{5,1,7,4},{5,3,1,2},{5,3,1,4},{5,3,2,5},{5,3,3,3},{5,3,3,4},{5,3,3,6},{5,3,4,3},{5,3,5,2},{5,3,5,4},
|
||||
{5,3,5,5},{5,3,5,7},{5,3,7,4},{5,3,7,5},{5,5,1,2},{5,5,1,4},{5,5,3,2},{5,5,3,3},{5,5,3,4},{5,5,3,5},
|
||||
{5,5,3,7},{5,5,5,1},{5,5,5,5},{5,5,6,3},{5,5,6,7},{5,5,7,1},{5,5,7,3},{5,5,7,6},{5,6,3,5},{5,6,3,6},
|
||||
{5,6,3,7},{5,6,5,3},{5,6,6,3},{5,6,7,3},{5,7,1,4},{5,7,3,4},{5,7,3,5},{5,7,5,1},{5,7,5,3},{5,7,5,6},
|
||||
{5,7,6,3},{5,7,7,3},{6,1,3,3},{6,3,3,5},{6,3,3,6},{6,3,3,7},{6,3,4,7},{6,3,6,3},{6,3,6,4},{6,3,7,3},
|
||||
{6,3,7,4},{6,5,3,5},{6,5,3,6},{6,5,3,7},{6,5,6,3},{6,5,7,3},{6,6,3,3},{6,6,3,4},{6,6,5,3},{6,6,6,6},
|
||||
{6,6,7,7},{6,7,3,3},{6,7,3,4},{6,7,5,3},{6,7,6,7},{6,7,7,6},{7,1,3,3},{7,1,3,4},{7,1,5,3},{7,1,5,4},
|
||||
{7,3,1,3},{7,3,1,4},{7,3,2,4},{7,3,3,2},{7,3,3,5},{7,3,3,6},{7,3,3,7},{7,3,4,1},{7,3,4,2},{7,3,4,5},
|
||||
{7,3,4,6},{7,3,5,3},{7,3,5,4},{7,3,5,5},{7,3,6,3},{7,3,6,4},{7,3,7,3},{7,3,7,4},{7,5,1,4},{7,5,3,4},
|
||||
{7,5,3,5},{7,5,5,1},{7,5,5,3},{7,5,5,6},{7,5,6,3},{7,5,7,3},{7,6,3,3},{7,6,3,4},{7,6,5,3},{7,6,6,7},
|
||||
{7,6,7,6},{7,7,3,3},{7,7,3,4},{7,7,5,3},{7,7,6,6},{7,7,7,7},
|
||||
},--6 piece opener
|
||||
}
|
||||
62
parts/modes/attacker_hard.lua
Normal file
62
parts/modes/attacker_hard.lua
Normal file
@@ -0,0 +1,62 @@
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
drop=30,lock=60,
|
||||
fall=12,
|
||||
freshLimit=15,
|
||||
pushSpeed=2,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
if P.atkBuffer.sum==0 then
|
||||
local p=#P.atkBuffer+1
|
||||
local B,D=P.atkBuffer,P.modeData
|
||||
local t
|
||||
if D.event<20 then
|
||||
t=1500-30*D.event--1500~900
|
||||
B[p]= {pos=P:RND(4,7),amount=12,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
B[p+1]= {pos=P:RND(3,8),amount=10,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
else
|
||||
t=900-10*(D.event-20)--900~600
|
||||
B[p]= {pos=P:RND(10),amount=14,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
B[p+1]= {pos=P:RND(4,7),amount=8,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||
end
|
||||
B.sum=B.sum+22
|
||||
P.stat.recv=P.stat.recv+22
|
||||
D.event=D.event+1
|
||||
if D.event%10==0 then
|
||||
if D.event==20 then
|
||||
P:showTextF(text.great,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=3
|
||||
elseif D.event==50 then
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="rainbow2",bgm="shining terminal",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(P.modeData.event,69,270)
|
||||
mStr("22",69,390)
|
||||
mText(drawableText.wave,69,330)
|
||||
mText(drawableText.nextWave,69,450)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..toTime(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 W=P.modeData.event
|
||||
return
|
||||
W>=100 and 5 or
|
||||
W>=80 and 4 or
|
||||
W>=60 and 3 or
|
||||
W>=40 and 2 or
|
||||
W>=20 and 1 or
|
||||
W>=5 and 0
|
||||
end,
|
||||
}
|
||||
76
parts/modes/attacker_ultimate.lua
Normal file
76
parts/modes/attacker_ultimate.lua
Normal file
@@ -0,0 +1,76 @@
|
||||
local min=math.min
|
||||
return{
|
||||
color=COLOR.lYellow,
|
||||
env={
|
||||
drop=5,lock=60,
|
||||
fall=8,
|
||||
freshLimit=15,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
if P.atkBuffer.sum<4 then
|
||||
local p=#P.atkBuffer+1
|
||||
local B,D=P.atkBuffer,P.modeData
|
||||
local s,t
|
||||
if D.event<10 then
|
||||
t=800-10*D.event--800~700
|
||||
B[p]= {pos=P:RND(5,6),amount=9,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
B[p+1]= {pos=P:RND(4,7),amount=11,countdown=t,cd0=t+62,time=0,sent=false,lv=4}
|
||||
s=20
|
||||
elseif D.event<20 then
|
||||
t=800-10*D.event--700~600
|
||||
B[p]= {pos=P:RND(3,8),amount=11,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
B[p+1]= {pos=P:RND(4,7),amount=13,countdown=t,cd0=t+62,time=0,sent=false,lv=5}
|
||||
s=24
|
||||
else
|
||||
t=600-15*(min(D.event-20,10))--600~450
|
||||
B[p]= {pos=P:RND(2)*9-8,amount=14,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||
B[p+1]= {pos=P:RND(3,8),amount=14,countdown=t+62,cd0=t,time=0,sent=false,lv=5}
|
||||
s=28
|
||||
end
|
||||
B.sum=B.sum+s
|
||||
P.stat.recv=P.stat.recv+s
|
||||
D.event=D.event+1
|
||||
if D.event%10==0 then
|
||||
if D.event==10 then
|
||||
P:showTextF(text.great,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=4
|
||||
elseif D.event==20 then
|
||||
P:showTextF(text.awesome,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=5
|
||||
elseif D.event==30 then
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="rainbow2",bgm="shining terminal",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(P.modeData.event,69,270)
|
||||
mStr(
|
||||
P.modeData.event<10 and 20
|
||||
or P.modeData.event<20 and 24
|
||||
or 28
|
||||
,69,390)
|
||||
mText(drawableText.wave,69,330)
|
||||
mText(drawableText.nextWave,69,450)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..toTime(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 W=P.modeData.event
|
||||
return
|
||||
W>=50 and 5 or
|
||||
W>=40 and 4 or
|
||||
W>=30 and 3 or
|
||||
W>=20 and 2 or
|
||||
W>=10 and 1 or
|
||||
W>=5 and 0
|
||||
end,
|
||||
}
|
||||
28
parts/modes/bigbang.lua
Normal file
28
parts/modes/bigbang.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
local format=string.format
|
||||
return{
|
||||
color=COLOR.lGrey,
|
||||
env={
|
||||
drop=1e99,lock=1e99,
|
||||
hold=false,
|
||||
dropPiece=function(P)P:lose()end,
|
||||
task=nil,
|
||||
bg="bg1",bgm="new era",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.finesseRate*25/P.stat.piece}end,
|
||||
scoreDisp=function(D)return D[1].."Stage "..format("%.2f",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 W=P.modeData.event
|
||||
return
|
||||
W>=150 and 5 or
|
||||
W>=100 and 4 or
|
||||
W>=70 and 3 or
|
||||
W>=40 and 2 or
|
||||
W>=20 and 1 or
|
||||
1
|
||||
end,
|
||||
}
|
||||
42
parts/modes/blind_easy.lua
Normal file
42
parts/modes/blind_easy.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
local min=math.min
|
||||
return{
|
||||
color=COLOR.cyan,
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
visible="time",
|
||||
dropPiece=PLY.check_lineReach,
|
||||
freshLimit=10,
|
||||
target=200,
|
||||
bg="glow",bgm="reason",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
mText(drawableText.line,69,370)
|
||||
mText(drawableText.techrash,69,490)
|
||||
setFont(75)
|
||||
mStr(P.stat.row,69,290)
|
||||
mStr(P.stat.clears[4],69,410)
|
||||
end,
|
||||
score=function(P)return{min(P.stat.row,200),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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<=140 and 5 or
|
||||
T<=200 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=40 and 1 or
|
||||
L>=1 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
48
parts/modes/blind_hard.lua
Normal file
48
parts/modes/blind_hard.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
local gc=love.graphics
|
||||
local min=math.min
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
drop=15,lock=45,
|
||||
fall=10,
|
||||
dropFX=0,lockFX=0,
|
||||
visible="none",
|
||||
score=false,
|
||||
dropPiece=PLY.check_lineReach,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
bg="rgb",bgm="reason",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
mText(drawableText.line,69,370)
|
||||
mText(drawableText.techrash,69,490)
|
||||
setFont(75)
|
||||
mStr(P.stat.row,69,290)
|
||||
mStr(P.stat.clears[4],69,410)
|
||||
gc.setColor(1,1,1,.2)
|
||||
gc.draw(IMG.electric,124,176,0,2.6)
|
||||
end,
|
||||
score=function(P)return{min(P.stat.row,200),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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<=150 and 5 or
|
||||
T<=210 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=90 and 2 or
|
||||
L>=40 and 1 or
|
||||
L>=1 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
49
parts/modes/blind_lunatic.lua
Normal file
49
parts/modes/blind_lunatic.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
local gc=love.graphics
|
||||
local min=math.min
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
drop=10,lock=60,
|
||||
fall=5,
|
||||
ghost=0,
|
||||
dropFX=0,lockFX=0,
|
||||
visible="none",
|
||||
score=false,
|
||||
dropPiece=PLY.check_lineReach,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
bg="rgb",bgm="reason",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
mText(drawableText.line,69,370)
|
||||
mText(drawableText.techrash,69,490)
|
||||
setFont(75)
|
||||
mStr(P.stat.row,69,290)
|
||||
mStr(P.stat.clears[4],69,410)
|
||||
gc.setColor(1,1,1,.2)
|
||||
gc.draw(IMG.electric,124,176,0,2.6)
|
||||
end,
|
||||
score=function(P)return{min(P.stat.row,200),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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<=240 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=40 and 1 or
|
||||
L>=1 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
45
parts/modes/blind_normal.lua
Normal file
45
parts/modes/blind_normal.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
local gc=love.graphics
|
||||
local min=math.min
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=15,lock=45,
|
||||
freshLimit=10,
|
||||
visible="fast",
|
||||
dropPiece=PLY.check_lineReach,
|
||||
target=200,
|
||||
bg="glow",bgm="reason",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
mText(drawableText.line,69,370)
|
||||
mText(drawableText.techrash,69,490)
|
||||
setFont(75)
|
||||
mStr(P.stat.row,69,290)
|
||||
mStr(P.stat.clears[4],69,410)
|
||||
gc.setColor(1,1,1,.2)
|
||||
gc.draw(IMG.electric,124,176,0,2.6)
|
||||
end,
|
||||
score=function(P)return{min(P.stat.row,200),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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<=150 and 5 or
|
||||
T<=210 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=126 and 3 or
|
||||
L>=80 and 2 or
|
||||
L>=40 and 1 or
|
||||
L>=1 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
42
parts/modes/blind_ultimate.lua
Normal file
42
parts/modes/blind_ultimate.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
local gc=love.graphics
|
||||
local min=math.min
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
drop=30,lock=60,
|
||||
block=false,center=0,ghost=0,
|
||||
dropFX=0,lockFX=0,
|
||||
visible="none",
|
||||
score=false,
|
||||
dropPiece=PLY.check_lineReach,
|
||||
freshLimit=15,
|
||||
target=100,
|
||||
bg="rgb",bgm="push",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
mText(drawableText.line,69,370)
|
||||
mText(drawableText.techrash,69,490)
|
||||
setFont(75)
|
||||
mStr(P.stat.row,69,290)
|
||||
mStr(P.stat.clears[4],69,410)
|
||||
gc.setColor(1,1,1,.2)
|
||||
gc.draw(IMG.electric,124,176,0,2.6)
|
||||
end,
|
||||
score=function(P)return{min(P.stat.row,100),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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
|
||||
return
|
||||
L>=100 and 5 or
|
||||
L>=75 and 4 or
|
||||
L>=50 and 3 or
|
||||
L>=26 and 2 or
|
||||
L>=10 and 1 or
|
||||
L>=1 and 0
|
||||
end,
|
||||
}
|
||||
72
parts/modes/blind_wtf.lua
Normal file
72
parts/modes/blind_wtf.lua
Normal file
@@ -0,0 +1,72 @@
|
||||
local gc=love.graphics
|
||||
local sin,min=math.sin,math.min
|
||||
local Timer=love.timer.getTime
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
drop=30,lock=60,
|
||||
next=1,
|
||||
block=false,center=0,ghost=0,
|
||||
dropFX=0,lockFX=0,
|
||||
visible="none",
|
||||
dropPiece=PLY.check_lineReach,
|
||||
freshLimit=15,
|
||||
target=40,
|
||||
bg="none",bgm="push",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
if SETTING.spawn==0 then
|
||||
LOG.print(text.switchSpawnSFX,COLOR.yellow)
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
if not GAME.result then
|
||||
if GAME.replaying then
|
||||
gc.setColor(.3,.3,.3,.7)
|
||||
gc.push("transform")
|
||||
gc.origin()
|
||||
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
||||
gc.pop()
|
||||
else
|
||||
gc.clear(.26,.26,.26)
|
||||
--Frame
|
||||
gc.setColor(.5,.5,.5)
|
||||
gc.push("transform")
|
||||
gc.translate(150,70)
|
||||
gc.rectangle("line",-1,-11,302,612)--Boarder
|
||||
gc.rectangle("line",301,-3,15,604)--AtkBuffer boarder
|
||||
gc.rectangle("line",-16,-3,15,604)--B2b bar boarder
|
||||
gc.pop()
|
||||
end
|
||||
end
|
||||
|
||||
--Figures
|
||||
local t=Timer()
|
||||
gc.setColor(1,1,1,.5+.2*sin(t))
|
||||
gc.draw(IMG.hbm,-276,-16,0,1.5)
|
||||
gc.draw(IMG.electric,476,212,0,2.6)
|
||||
|
||||
--Texts
|
||||
gc.setColor(.8,.8,.8)
|
||||
mText(drawableText.line,69,370)
|
||||
mText(drawableText.techrash,69,490)
|
||||
setFont(75)
|
||||
mStr(P.stat.row,69,290)
|
||||
mStr(P.stat.clears[4],69,410)
|
||||
end,
|
||||
score=function(P)return{min(P.stat.row,40),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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
|
||||
return
|
||||
L>=40 and 5 or
|
||||
L>=30 and 4 or
|
||||
L>=20 and 3 or
|
||||
L>=10 and 2 or
|
||||
L>=5 and 1 or
|
||||
L>=1 and 0
|
||||
end,
|
||||
}
|
||||
73
parts/modes/c4wtrain_lunatic.lua
Normal file
73
parts/modes/c4wtrain_lunatic.lua
Normal file
@@ -0,0 +1,73 @@
|
||||
local min=math.min
|
||||
local function check_c4w(P)
|
||||
if P.lastPiece.row==0 then
|
||||
P:lose()
|
||||
else
|
||||
for _=1,P.lastPiece.row do
|
||||
P.field[#P.field+1]=FREEROW.get(20)
|
||||
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
|
||||
P.modeData.point=P.combo
|
||||
end
|
||||
if P.stat.row>=100 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
drop=5,lock=30,
|
||||
dropPiece=check_c4w,
|
||||
freshLimit=15,ospin=false,
|
||||
bg="rgb",bgm="oxygen",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
local P=PLAYERS[1]
|
||||
local F=P.field
|
||||
for i=1,24 do
|
||||
F[i]=FREEROW.get(20)
|
||||
P.visTime[i]=FREEROW.get(20)
|
||||
for x=4,7 do F[i][x]=0 end
|
||||
end
|
||||
local r=P:RND(6)
|
||||
if r==1 then F[1][5],F[1][4],F[2][4]=20,20,20
|
||||
elseif r==2 then F[1][6],F[1][7],F[2][7]=20,20,20
|
||||
elseif r==3 then F[1][4],F[2][4],F[2][5]=20,20,20
|
||||
elseif r==4 then F[1][7],F[2][7],F[2][6]=20,20,20
|
||||
elseif r==5 then F[1][4],F[1][5],F[1][6]=20,20,20
|
||||
elseif r==6 then F[1][7],F[1][6],F[1][5]=20,20,20
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(P.combo,69,380)
|
||||
mStr(P.modeData.point,69,470)
|
||||
mText(drawableText.combo,69,428)
|
||||
mText(drawableText.maxcmb,69,520)
|
||||
end,
|
||||
score=function(P)return{min(P.modeData.point,100),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Combo "..toTime(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.modeData.point
|
||||
if L==100 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=40 and 5 or
|
||||
T<=60 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=70 and 3 or
|
||||
L>=40 and 2 or
|
||||
L>=20 and 1 or
|
||||
L>=5 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
71
parts/modes/c4wtrain_normal.lua
Normal file
71
parts/modes/c4wtrain_normal.lua
Normal file
@@ -0,0 +1,71 @@
|
||||
local min=math.min
|
||||
local function check_c4w(P)
|
||||
if P.lastPiece.row>0 then
|
||||
for _=1,#P.clearedRow do
|
||||
P.field[#P.field+1]=FREEROW.get(20)
|
||||
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
|
||||
P.modeData.point=P.combo
|
||||
end
|
||||
if P.stat.row>=100 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=30,lock=60,oncehold=false,
|
||||
dropPiece=check_c4w,
|
||||
freshLimit=15,ospin=false,
|
||||
bg="rgb",bgm="oxygen",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
local P=PLAYERS[1]
|
||||
local F=P.field
|
||||
for i=1,24 do
|
||||
F[i]=FREEROW.get(20)
|
||||
P.visTime[i]=FREEROW.get(20)
|
||||
for x=4,7 do F[i][x]=0 end
|
||||
end
|
||||
local r=P:RND(6)
|
||||
if r==1 then F[1][5],F[1][4],F[2][4]=20,20,20
|
||||
elseif r==2 then F[1][6],F[1][7],F[2][7]=20,20,20
|
||||
elseif r==3 then F[1][4],F[2][4],F[2][5]=20,20,20
|
||||
elseif r==4 then F[1][7],F[2][7],F[2][6]=20,20,20
|
||||
elseif r==5 then F[1][4],F[1][5],F[1][6]=20,20,20
|
||||
elseif r==6 then F[1][7],F[1][6],F[1][5]=20,20,20
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(P.combo,69,380)
|
||||
mStr(P.modeData.point,69,470)
|
||||
mText(drawableText.combo,69,428)
|
||||
mText(drawableText.maxcmb,69,520)
|
||||
end,
|
||||
score=function(P)return{min(P.modeData.point,100),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Combo "..toTime(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==100 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=32 and 5 or
|
||||
T<=50 and 4 or
|
||||
T<=80 and 3 or
|
||||
2
|
||||
else
|
||||
return
|
||||
L>=60 and 2 or
|
||||
L>=30 and 1 or
|
||||
L>=10 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
62
parts/modes/classic_fast.lua
Normal file
62
parts/modes/classic_fast.lua
Normal file
@@ -0,0 +1,62 @@
|
||||
local gc=love.graphics
|
||||
local format=string.format
|
||||
local function check_LVup(P)
|
||||
if P.stat.row>=P.gameEnv.target then
|
||||
P.gameEnv.target=P.gameEnv.target+10
|
||||
if P.gameEnv.target==110 then
|
||||
P.gameEnv.drop,P.gameEnv.lock=2,2
|
||||
SFX.play("blip_1")
|
||||
elseif P.gameEnv.target==200 then
|
||||
P.gameEnv.drop,P.gameEnv.lock=1,1
|
||||
SFX.play("blip_1")
|
||||
else
|
||||
SFX.play("reach")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.lBlue,
|
||||
env={
|
||||
smooth=false,
|
||||
noTele=true,keyCancel={6},
|
||||
das=16,arr=6,sddas=2,sdarr=2,
|
||||
irs=false,ims=false,
|
||||
center=0,ghost=0,
|
||||
drop=3,lock=3,wait=10,fall=25,
|
||||
next=1,hold=false,
|
||||
sequence="rnd",
|
||||
RS="Classic",
|
||||
freshLimit=0,
|
||||
face={0,0,2,2,2,0,0},
|
||||
target=10,dropPiece=check_LVup,
|
||||
bg="rgb",bgm="rockblock",
|
||||
},
|
||||
slowMark=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
local r=P.gameEnv.target*.1
|
||||
mStr(r<11 and 18 or r<22 and r+8 or r==22 and"00"or r==23 and"0a"or format("%x",r*10-220),69,280)
|
||||
mText(drawableText.speedLV,69,360)
|
||||
setFont(45)
|
||||
mStr(P.stat.row,69,390)
|
||||
mStr(P.gameEnv.target,69,440)
|
||||
gc.rectangle("fill",25,445,90,4)
|
||||
end,
|
||||
score=function(P)return{P.stat.score,P.stat.row}end,
|
||||
scoreDisp=function(D)return D[1].." "..D[2].." Lines"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
|
||||
return
|
||||
L>=200 and 5 or
|
||||
L>=191 and 4 or
|
||||
L>=110 and 3 or
|
||||
L>=50 and 2 or
|
||||
L>=5 and 1 or
|
||||
L>=1 and 0
|
||||
end,
|
||||
}
|
||||
99
parts/modes/custom_clear.lua
Normal file
99
parts/modes/custom_clear.lua
Normal file
@@ -0,0 +1,99 @@
|
||||
local int=math.floor
|
||||
|
||||
local function notAir(L)
|
||||
for i=1,10 do
|
||||
if L[i]>0 then return true end
|
||||
end
|
||||
end
|
||||
local function setField(P,page)
|
||||
local F=FIELD[page]
|
||||
local height=0
|
||||
for y=20,1,-1 do
|
||||
if notAir(F[y])then
|
||||
height=y
|
||||
break
|
||||
end
|
||||
end
|
||||
local t=P.showTime*3
|
||||
for y=1,height do
|
||||
local solid=notAir(F[y])
|
||||
P.field[y]=FREEROW.get(0,solid)
|
||||
P.visTime[y]=FREEROW.get(t)
|
||||
if solid then
|
||||
for x=1,10 do
|
||||
P.field[y][x]=F[y][x]
|
||||
end
|
||||
P.garbageBeneath=P.garbageBeneath+1
|
||||
end
|
||||
end
|
||||
end
|
||||
local function checkClear(P)
|
||||
if P.garbageBeneath==0 then
|
||||
P.modeData.point=P.modeData.point+1
|
||||
if FIELD[P.modeData.point+1]then
|
||||
P.waiting=26
|
||||
for _=#P.field,1,-1 do
|
||||
FREEROW.discard(P.field[_])
|
||||
FREEROW.discard(P.visTime[_])
|
||||
P.field[_],P.visTime[_]=nil
|
||||
end
|
||||
setField(P,P.modeData.point+1)
|
||||
sysFX.newShade(.7,.6,.8,.6,P.x+150*P.size,P.y+60*P.size,300*P.size,610*P.size)
|
||||
SFX.play("blip_1")
|
||||
else
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
end
|
||||
return{
|
||||
color=COLOR.white,
|
||||
env={},
|
||||
load=function()
|
||||
for k,v in next,CUSTOMENV do
|
||||
modeEnv[k]=v
|
||||
end
|
||||
if BAG[1]then
|
||||
modeEnv.bag=BAG
|
||||
else
|
||||
modeEnv.bag=nil
|
||||
end
|
||||
if MISSION[1]then
|
||||
modeEnv.mission=MISSION
|
||||
else
|
||||
modeEnv.mission=nil
|
||||
end
|
||||
modeEnv.dropPiece=PLY.check_lineReach
|
||||
for y=1,20 do
|
||||
if notAir(FIELD[1][y])then
|
||||
--Switch clear mode on
|
||||
modeEnv.dropPiece=checkClear
|
||||
break
|
||||
end
|
||||
end
|
||||
PLY.newPlayer(1,340,15)
|
||||
local L=modeEnv.opponent
|
||||
if L~=0 then
|
||||
modeEnv.target=nil
|
||||
if L<6 then
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("9S",2*L))
|
||||
else
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("CC",2*L-11,int(L*.5-1.5),modeEnv.hold,4000*L))
|
||||
end
|
||||
end
|
||||
for _,P in next,PLAYERS.alive do
|
||||
setField(P,1)
|
||||
end
|
||||
modeEnv.bg=CUSTOMENV.bg
|
||||
modeEnv.bgm=CUSTOMENV.bgm
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
if P.gameEnv.target>1e10 then
|
||||
mStr(P.stat.row,69,295)
|
||||
mText(drawableText.line,69,360)
|
||||
else
|
||||
local R=P.gameEnv.target-P.stat.row
|
||||
mStr(R>=0 and R or 0,69,310)
|
||||
end
|
||||
end,
|
||||
}
|
||||
83
parts/modes/custom_puzzle.lua
Normal file
83
parts/modes/custom_puzzle.lua
Normal file
@@ -0,0 +1,83 @@
|
||||
local gc=love.graphics
|
||||
local int=math.floor
|
||||
local function puzzleCheck(P)
|
||||
local F=FIELD[P.modeData.point+1]
|
||||
for y=1,20 do
|
||||
local L=P.field[y]
|
||||
for x=1,10 do
|
||||
local a,b=F[y][x],L and L[x]or 0
|
||||
if a~=0 then
|
||||
if a==-1 then if b>0 then return end
|
||||
elseif a<12 then if a~=b then return end
|
||||
elseif a>7 then if b==0 then return end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
P.modeData.point=P.modeData.point+1
|
||||
if FIELD[P.modeData.point+1]then
|
||||
P.waiting=26
|
||||
for _=#P.field,1,-1 do
|
||||
FREEROW.discard(P.field[_])
|
||||
FREEROW.discard(P.visTime[_])
|
||||
P.field[_],P.visTime[_]=nil
|
||||
end
|
||||
sysFX.newShade(.7,.3,1,.3,P.x+150*P.size,P.y+60*P.size,300*P.size,610*P.size)
|
||||
SFX.play("reach")
|
||||
P.modeData.event=0
|
||||
else
|
||||
P.modeData.event=1
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.white,
|
||||
env={
|
||||
Fkey=function(P)P.modeData.event=1-P.modeData.event end,
|
||||
dropPiece=puzzleCheck,
|
||||
},
|
||||
load=function()
|
||||
for k,v in next,CUSTOMENV do
|
||||
modeEnv[k]=v
|
||||
end
|
||||
if BAG[1]then
|
||||
modeEnv.bag=BAG
|
||||
else
|
||||
modeEnv.bag=nil
|
||||
end
|
||||
if MISSION[1]then
|
||||
modeEnv.mission=MISSION
|
||||
else
|
||||
modeEnv.mission=nil
|
||||
end
|
||||
PLY.newPlayer(1,340,15)
|
||||
local L=modeEnv.opponent
|
||||
if L~=0 then
|
||||
modeEnv.target=nil
|
||||
if L<6 then
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("9S",2*L))
|
||||
else
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("CC",2*L-11,int(L*.5-1.5),modeEnv.hold,4000*L))
|
||||
end
|
||||
end
|
||||
modeEnv.bg=CUSTOMENV.bg
|
||||
modeEnv.bgm=CUSTOMENV.bgm
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
||||
setFont(55)
|
||||
mStr(P.stat.row,69,295)
|
||||
mText(drawableText.line,69,360)
|
||||
if P.modeData.event==0 then
|
||||
local m=puzzleMark
|
||||
local F=FIELD[P.modeData.point+1]
|
||||
for y=1,20 do for x=1,10 do
|
||||
local T=F[y][x]
|
||||
if T~=0 then
|
||||
gc.draw(m[T],150+30*x-30+dx,70+600-30*y+dy)
|
||||
end
|
||||
end end
|
||||
end
|
||||
end,
|
||||
}
|
||||
66
parts/modes/defender_lunatic.lua
Normal file
66
parts/modes/defender_lunatic.lua
Normal file
@@ -0,0 +1,66 @@
|
||||
local int=math.floor
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
drop=5,lock=60,
|
||||
fall=6,
|
||||
next=3,
|
||||
freshLimit=15,
|
||||
pushSpeed=2,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
local t=240-2*P.modeData.event
|
||||
if P.modeData.counter>=t then
|
||||
P.modeData.counter=0
|
||||
for _=1,4 do
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(10),amount=1,countdown=5*t,cd0=5*t,time=0,sent=false,lv=2}
|
||||
end
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+4
|
||||
P.stat.recv=P.stat.recv+4
|
||||
local D=P.modeData
|
||||
if D.event<75 then
|
||||
D.event=D.event+1
|
||||
D.point=int(144e3/(240-2*D.event))*.1
|
||||
if D.event==25 then
|
||||
P:showTextF(text.great,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=3
|
||||
P.dropDelay,P.gameEnv.drop=4,4
|
||||
elseif D.event==50 then
|
||||
P:showTextF(text.awesome,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=4
|
||||
P.dropDelay,P.gameEnv.drop=3,3
|
||||
elseif D.event==75 then
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
P.dropDelay,P.gameEnv.drop=2,2
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="rainbow2",bgm="storm",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(P.modeData.event,69,270)
|
||||
mStr(P.modeData.point,69,390)
|
||||
mText(drawableText.wave,69,330)
|
||||
mText(drawableText.rpm,69,450)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..toTime(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 W=P.modeData.event
|
||||
return
|
||||
W>=100 and 5 or
|
||||
W>=80 and 4 or
|
||||
W>=55 and 3 or
|
||||
W>=30 and 2 or
|
||||
W>=20 and 1 or
|
||||
W>=5 and 0
|
||||
end,
|
||||
}
|
||||
66
parts/modes/defender_normal.lua
Normal file
66
parts/modes/defender_normal.lua
Normal file
@@ -0,0 +1,66 @@
|
||||
local int=math.floor
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=30,lock=60,
|
||||
fall=10,
|
||||
next=3,
|
||||
freshLimit=15,
|
||||
pushSpeed=1,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
local t=360-P.modeData.event*2
|
||||
if P.modeData.counter>=t then
|
||||
P.modeData.counter=0
|
||||
for _=1,3 do
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(2,9),amount=1,countdown=2*t,cd0=2*t,time=0,sent=false,lv=1}
|
||||
end
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+3
|
||||
P.stat.recv=P.stat.recv+3
|
||||
local D=P.modeData
|
||||
if D.event<90 then
|
||||
D.event=D.event+1
|
||||
D.point=int(108e3/(360-D.event*2))*.1
|
||||
if D.event==25 then
|
||||
P:showTextF(text.great,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=2
|
||||
P.dropDelay,P.gameEnv.drop=20,20
|
||||
elseif D.event==50 then
|
||||
P:showTextF(text.awesome,0,-140,100,"appear",.6)
|
||||
P.gameEnv.pushSpeed=3
|
||||
P.dropDelay,P.gameEnv.drop=10,10
|
||||
elseif D.event==90 then
|
||||
P.dropDelay,P.gameEnv.drop=5,5
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="rainbow2",bgm="storm",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(P.modeData.event,69,270)
|
||||
mStr(P.modeData.point,69,390)
|
||||
mText(drawableText.wave,69,330)
|
||||
mText(drawableText.rpm,69,450)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..toTime(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 W=P.modeData.event
|
||||
return
|
||||
W>=120 and 5 or
|
||||
W>=100 and 4 or
|
||||
W>=70 and 3 or
|
||||
W>=40 and 2 or
|
||||
W>=10 and 1 or
|
||||
W>=3 and 0
|
||||
end,
|
||||
}
|
||||
40
parts/modes/dig_10.lua
Normal file
40
parts/modes/dig_10.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
local function check_rise(P)
|
||||
if P.stat.dig==10 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.cyan,
|
||||
env={
|
||||
pushSpeed=6,
|
||||
dropPiece=check_rise,
|
||||
bg="bg1",bgm="way",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
local P=PLAYERS[1]
|
||||
for _=1,10 do
|
||||
P:garbageRise(21,1,P:getHolePos())
|
||||
end
|
||||
P.fieldBeneath=0
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(10-P.stat.dig,69,335)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
if P.stat.dig<10 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=7 and 5 or
|
||||
T<=12 and 4 or
|
||||
T<=20 and 3 or
|
||||
T<=40 and 2 or
|
||||
T<=60 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
43
parts/modes/dig_100.lua
Normal file
43
parts/modes/dig_100.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
local function check_rise(P)
|
||||
for _=1,math.min(8,100-P.stat.dig)-P.garbageBeneath do
|
||||
P:garbageRise(21,1,P:getHolePos())
|
||||
end
|
||||
if P.stat.dig==100 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
pushSpeed=6,
|
||||
dropPiece=check_rise,
|
||||
bg="bg2",bgm="way",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
local P=PLAYERS[1]
|
||||
for _=1,10 do
|
||||
P:garbageRise(21,1,P:getHolePos())
|
||||
end
|
||||
P.fieldBeneath=0
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(100-P.stat.dig,69,335)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
if P.stat.dig<100 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=120 and 5 or
|
||||
T<=160 and 4 or
|
||||
T<=240 and 3 or
|
||||
T<=360 and 2 or
|
||||
T<=480 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
43
parts/modes/dig_40.lua
Normal file
43
parts/modes/dig_40.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
local function check_rise(P)
|
||||
for _=1,math.min(8,40-P.stat.dig)-P.garbageBeneath do
|
||||
P:garbageRise(21,1,P:getHolePos())
|
||||
end
|
||||
if P.stat.dig==40 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.lBlue,
|
||||
env={
|
||||
pushSpeed=6,
|
||||
dropPiece=check_rise,
|
||||
bg="bg1",bgm="way",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
local P=PLAYERS[1]
|
||||
for _=1,10 do
|
||||
P:garbageRise(21,1,P:getHolePos())
|
||||
end
|
||||
P.fieldBeneath=0
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(40-P.stat.dig,69,335)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
if P.stat.dig<40 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=50 and 5 or
|
||||
T<=70 and 4 or
|
||||
T<=90 and 3 or
|
||||
T<=120 and 2 or
|
||||
T<=180 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
43
parts/modes/dig_400.lua
Normal file
43
parts/modes/dig_400.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
local function check_rise(P)
|
||||
for _=1,math.min(8,400-P.stat.dig)-P.garbageBeneath do
|
||||
P:garbageRise(21,1,P:getHolePos())
|
||||
end
|
||||
if P.stat.dig==400 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.orange,
|
||||
env={
|
||||
pushSpeed=6,
|
||||
dropPiece=check_rise,
|
||||
bg="bg2",bgm="way",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
local P=PLAYERS[1]
|
||||
for _=1,10 do
|
||||
P:garbageRise(21,1,P:getHolePos())
|
||||
end
|
||||
P.fieldBeneath=0
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
mStr(400-P.stat.dig,69,335)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
if P.stat.dig<400 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=540 and 5 or
|
||||
T<=720 and 4 or
|
||||
T<=960 and 3 or
|
||||
T<=1500 and 2 or
|
||||
T<=1800 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
43
parts/modes/dig_hard.lua
Normal file
43
parts/modes/dig_hard.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
drop=60,lock=120,
|
||||
fall=20,
|
||||
freshLimit=15,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
local D=P.modeData
|
||||
D.counter=D.counter+1
|
||||
if D.counter>=max(90,180-D.event)then
|
||||
P:garbageRise(21,1,P:getHolePos())
|
||||
P.stat.recv=P.stat.recv+1
|
||||
D.counter=0
|
||||
D.event=D.event+1
|
||||
end
|
||||
end,
|
||||
bg="bg2",bgm="down",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,380)
|
||||
mText(drawableText.wave,69,445)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.row}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..D[2].." Lines"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 W=P.modeData.event
|
||||
return
|
||||
W>=150 and 5 or
|
||||
W>=110 and 4 or
|
||||
W>=80 and 3 or
|
||||
W>=50 and 2 or
|
||||
W>=20 and 1 or
|
||||
P.stat.row>=5 and 0
|
||||
end,
|
||||
}
|
||||
42
parts/modes/dig_ultimate.lua
Normal file
42
parts/modes/dig_ultimate.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.lYellow,
|
||||
env={
|
||||
drop=10,lock=30,
|
||||
freshLimit=15,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
local D=P.modeData
|
||||
D.counter=D.counter+1
|
||||
if D.counter>=max(30,80-.3*D.event)then
|
||||
P:garbageRise(20+D.event%5,1,P:getHolePos())
|
||||
P.stat.recv=P.stat.recv+1
|
||||
D.counter=0
|
||||
D.event=D.event+1
|
||||
end
|
||||
end,
|
||||
bg="bg2",bgm="down",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,380)
|
||||
mText(drawableText.wave,69,445)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.row}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..D[2].." Lines"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 W=P.modeData.event
|
||||
return
|
||||
W>=150 and 5 or
|
||||
W>=110 and 4 or
|
||||
W>=80 and 3 or
|
||||
W>=50 and 2 or
|
||||
W>=20 and 1 or
|
||||
P.stat.row>=5 and 0
|
||||
end,
|
||||
}
|
||||
128
parts/modes/drought_lunatic.lua
Normal file
128
parts/modes/drought_lunatic.lua
Normal file
@@ -0,0 +1,128 @@
|
||||
local min=math.min
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
drop=20,lock=60,
|
||||
sequence=function(P)
|
||||
for _=1,3 do P:getNext(7)end
|
||||
end,
|
||||
freshMethod=function(P)
|
||||
if not P.next[1] then
|
||||
local height=FREEROW.get(0)
|
||||
local max=#P.field
|
||||
if max>0 then
|
||||
--Get heights
|
||||
for x=1,10 do
|
||||
local h=max
|
||||
while P.field[h][x]==0 and h>1 do
|
||||
h=h-1
|
||||
end
|
||||
height[x]=h
|
||||
end
|
||||
else
|
||||
for x=1,10 do
|
||||
height[x]=0
|
||||
end
|
||||
end
|
||||
height[11]=999
|
||||
|
||||
local res={1,1,2,2,3,4}
|
||||
local d=0
|
||||
local A
|
||||
for i=1,10 do
|
||||
d=d+height[i]
|
||||
end
|
||||
if d<40 or P.stat.row>2*42 then
|
||||
A=#res+1
|
||||
for _=1,4 do
|
||||
res[A]=1
|
||||
res[A+1]=2
|
||||
res[A+2]=6
|
||||
A=A+3
|
||||
end
|
||||
goto END
|
||||
end
|
||||
|
||||
--Give I when no hole
|
||||
d=-999--Height difference
|
||||
--A=hole mark
|
||||
for x=2,11 do
|
||||
local _=height[x]-height[x-1]
|
||||
if d<-2 and _>2 then
|
||||
A=true
|
||||
end
|
||||
d=_
|
||||
end
|
||||
if not A then
|
||||
A=#res+1
|
||||
res[A]=7
|
||||
res[A+1]=7
|
||||
res[A+2]=7
|
||||
end
|
||||
|
||||
--Give O when no d=0/give T when no d=1
|
||||
d=0--d=0 count
|
||||
A=0--d=1 count
|
||||
for x=2,10 do
|
||||
local _=height[x]-height[x-1]
|
||||
if _==0 then
|
||||
d=d+1
|
||||
elseif _==1 or _==-1 then
|
||||
A=A+1
|
||||
end
|
||||
end
|
||||
if d<3 then
|
||||
A=#res+1
|
||||
res[A]=6
|
||||
res[A+1]=6
|
||||
res[A+2]=6
|
||||
end
|
||||
if A<3 then
|
||||
A=#res+1
|
||||
res[A]=5
|
||||
res[A+1]=5
|
||||
res[A+2]=5
|
||||
res[A+3]=5
|
||||
res[A+4]=5
|
||||
end
|
||||
|
||||
::END::
|
||||
FREEROW.discard(height)
|
||||
P:getNext(res[P:RND(#res)])
|
||||
end
|
||||
end,
|
||||
target=100,dropPiece=PLY.check_lineReach,
|
||||
next=1,hold=false,
|
||||
ospin=false,
|
||||
freshLimit=15,
|
||||
bg="glow",bgm="reason",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(70)
|
||||
local R=100-P.stat.row
|
||||
mStr(R>=0 and R or 0,69,335)
|
||||
end,
|
||||
score=function(P)return{min(P.stat.row,100),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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>=100 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=90 and 5 or
|
||||
T<=105 and 4 or
|
||||
T<=160 and 3 or
|
||||
T<=240 and 2 or
|
||||
1
|
||||
else
|
||||
return
|
||||
L>=50 and 1 or
|
||||
L>=10 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
42
parts/modes/drought_normal.lua
Normal file
42
parts/modes/drought_normal.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
local min=math.min
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=20,lock=60,
|
||||
sequence="bag",
|
||||
bag={1,1,2,2,3,3,4,4,5,5,6,6},
|
||||
target=100,dropPiece=PLY.check_lineReach,
|
||||
next=3,
|
||||
ospin=false,
|
||||
freshLimit=15,
|
||||
bg="glow",bgm="reason",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(70)
|
||||
local R=100-P.stat.row
|
||||
mStr(R>=0 and R or 0,69,335)
|
||||
end,
|
||||
score=function(P)return{min(P.stat.row,100),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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>=100 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=65 and 5 or
|
||||
T<=100 and 4 or
|
||||
T<=145 and 3 or
|
||||
T<=220 and 2 or
|
||||
1
|
||||
else
|
||||
return
|
||||
L>=50 and 1 or
|
||||
L>=10 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
19
parts/modes/infinite.lua
Normal file
19
parts/modes/infinite.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
local format=string.format
|
||||
return{
|
||||
color=COLOR.lGrey,
|
||||
env={
|
||||
drop=1e99,lock=1e99,
|
||||
oncehold=false,
|
||||
bg="glow",bgm="infinite",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
}
|
||||
54
parts/modes/infinite_dig.lua
Normal file
54
parts/modes/infinite_dig.lua
Normal file
@@ -0,0 +1,54 @@
|
||||
local format=string.format
|
||||
local function check_rise(P)
|
||||
local L=P.garbageBeneath
|
||||
if #P.clearedRow==0 then
|
||||
if L>0 then
|
||||
if L<3 then
|
||||
P:showTextF(text.almost,0,-120,80,"beat",.8)
|
||||
elseif L<5 then
|
||||
P:showTextF(text.great,0,-120,80,"fly",.8)
|
||||
end
|
||||
end
|
||||
for _=1,8-L do
|
||||
P:garbageRise(13,1,P:RND(10))
|
||||
end
|
||||
else
|
||||
if L==0 then
|
||||
P:showTextF(text.awesome,0,-120,80,"beat",.6)
|
||||
SFX.play("clear")
|
||||
BG.send(26)
|
||||
for _=1,8 do
|
||||
P:garbageRise(13,1,P:RND(10))
|
||||
end
|
||||
else
|
||||
BG.send(#P.clearedRow)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.white,
|
||||
env={
|
||||
drop=1e99,lock=1e99,
|
||||
oncehold=false,
|
||||
dropPiece=check_rise,
|
||||
pushSpeed=1.2,
|
||||
bg="wing",bgm="infinite",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
local P=PLAYERS[1]
|
||||
for _=1,8 do
|
||||
P:garbageRise(13,1,P:RND(10))
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(P.stat.dig,69,260)
|
||||
mStr(P.stat.atk,69,380)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,490)
|
||||
mText(drawableText.line,69,313)
|
||||
mText(drawableText.atk,69,433)
|
||||
mText(drawableText.eff,69,545)
|
||||
end,
|
||||
}
|
||||
57
parts/modes/marathon_hard.lua
Normal file
57
parts/modes/marathon_hard.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
local gc=love.graphics
|
||||
local function check(P)
|
||||
if P.stat.row>=P.gameEnv.target then
|
||||
local T=P.gameEnv.target
|
||||
if T==50 then
|
||||
P.gameEnv.drop=.25
|
||||
P.gameEnv.target=100
|
||||
SFX.play("reach")
|
||||
elseif T==100 then
|
||||
P:set20G(true)
|
||||
P.gameEnv.target=200
|
||||
SFX.play("reach")
|
||||
else
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
noTele=true,
|
||||
mindas=7,minarr=1,minsdarr=1,
|
||||
drop=.5,wait=8,fall=20,
|
||||
target=50,dropPiece=check,
|
||||
bg="bg2",bgm="push",
|
||||
},
|
||||
pauseLimit=true,
|
||||
slowMark=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(P.stat.row,69,390)
|
||||
mStr(P.gameEnv.target,69,440)
|
||||
gc.rectangle("fill",25,445,90,4)
|
||||
end,
|
||||
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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<=230 and 5 or
|
||||
T<=270 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=100 and 2 or
|
||||
L>=50 and 1 or
|
||||
L>=10 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
54
parts/modes/marathon_normal.lua
Normal file
54
parts/modes/marathon_normal.lua
Normal file
@@ -0,0 +1,54 @@
|
||||
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)
|
||||
local T=P.modeData.point+10
|
||||
if P.stat.row>=T then
|
||||
if T==200 then
|
||||
P:win("finish")
|
||||
else
|
||||
P.gameEnv.drop=dropSpeed[T/10]
|
||||
P.modeData.point=T
|
||||
SFX.play("reach")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
noTele=true,
|
||||
wait=8,fall=20,
|
||||
dropPiece=check_LVup,
|
||||
mindas=7,minarr=1,minsdarr=1,
|
||||
bg="bg2",bgm="push",
|
||||
},
|
||||
pauseLimit=true,
|
||||
slowMark=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(P.stat.row,69,390)
|
||||
mStr(P.modeData.point+10,69,440)
|
||||
gc.rectangle("fill",25,445,90,4)
|
||||
end,
|
||||
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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<=230 and 5 or
|
||||
T<=270 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 2 or
|
||||
L>=100 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
61
parts/modes/marathon_ultimate.lua
Normal file
61
parts/modes/marathon_ultimate.lua
Normal file
@@ -0,0 +1,61 @@
|
||||
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.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.lastPiece.row>1 then P:showText("1+",0,-100,40,"flicker",.3)end
|
||||
P:lose()
|
||||
return
|
||||
end
|
||||
local T=P.modeData.point+10
|
||||
if P.stat.row>=T then
|
||||
if T==200 then
|
||||
P:win("finish")
|
||||
else
|
||||
P.gameEnv.drop=dropSpeed[T/10]
|
||||
P.modeData.point=T
|
||||
SFX.play("reach")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.yellow,
|
||||
env={
|
||||
noTele=true,
|
||||
wait=8,fall=20,
|
||||
target=10,dropPiece=check_LVup,
|
||||
mindas=7,minarr=1,minsdarr=1,
|
||||
bg="bg2",bgm="sugar fairy",
|
||||
},
|
||||
pauseLimit=true,
|
||||
slowMark=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(P.stat.row,69,390)
|
||||
mStr(P.modeData.point+10,69,440)
|
||||
gc.rectangle("fill",25,445,90,4)
|
||||
end,
|
||||
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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<=400 and 5 or
|
||||
T<=600 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 2 or
|
||||
L>=80 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
86
parts/modes/master_advance.lua
Normal file
86
parts/modes/master_advance.lua
Normal file
@@ -0,0 +1,86 @@
|
||||
local gc=love.graphics
|
||||
local int=math.floor
|
||||
local death_lock={12,11,10,9,8}
|
||||
local death_wait={10,9,8,7,6}
|
||||
local death_fall={10,9,8,7,6}
|
||||
local function score(P)
|
||||
local MD=P.modeData
|
||||
|
||||
local c=#P.clearedRow
|
||||
if c==0 and MD.point%100==99 then return end
|
||||
local s=c<3 and c+1 or c==3 and 5 or 7
|
||||
if P.combo>7 then s=s+2
|
||||
elseif P.combo>3 then s=s+1
|
||||
end
|
||||
MD.point=MD.point+s
|
||||
|
||||
if MD.point%100==99 then
|
||||
SFX.play("blip_1")
|
||||
elseif MD.point>=100*(MD.event+1)then
|
||||
--Level up!
|
||||
s=MD.event+1
|
||||
MD.event=s
|
||||
local E=P.gameEnv
|
||||
BG.set(s==1 and"rainbow"or s==2 and"rainbow2"or s==3 and"lightning"or s==4 and"lightning2"or"lightning")
|
||||
E.lock=death_lock[s]
|
||||
E.wait=death_wait[s]
|
||||
E.fall=death_fall[s]
|
||||
E.das=int(6.9-s*.4)
|
||||
if s==3 then
|
||||
P.gameEnv.bone=true
|
||||
end
|
||||
if s==5 then
|
||||
MD.point,MD.event=500,4
|
||||
P:win("finish")
|
||||
else
|
||||
P:showTextF(text.stage:gsub("$1",s),0,-120,80,"fly")
|
||||
end
|
||||
SFX.play("reach")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
noTele=true,
|
||||
das=6,arr=1,
|
||||
drop=0,
|
||||
lock=death_lock[1],
|
||||
wait=death_wait[1],
|
||||
fall=death_fall[1],
|
||||
dropPiece=score,
|
||||
freshLimit=15,
|
||||
bg="bg2",bgm="secret7th",
|
||||
},
|
||||
slowMark=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(P.modeData.point,69,390)
|
||||
mStr((P.modeData.event+1)*100,69,440)
|
||||
gc.rectangle("fill",25,445,90,4)
|
||||
end,
|
||||
score=function(P)return{P.modeData.point,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].."P "..toTime(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 S=P.modeData.point
|
||||
if S==500 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=118 and 5 or
|
||||
T<=148 and 4 or
|
||||
T<=183 and 3 or
|
||||
2
|
||||
else
|
||||
return
|
||||
S>=300 and 2 or
|
||||
S>=100 and 1 or
|
||||
S>=50 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
88
parts/modes/master_beginner.lua
Normal file
88
parts/modes/master_beginner.lua
Normal file
@@ -0,0 +1,88 @@
|
||||
local gc=love.graphics
|
||||
local rush_lock={20,18,16,15,14}
|
||||
local rush_wait={12,10,9,8,7}
|
||||
local rush_fall={18,16,14,13,12}
|
||||
local function score(P)
|
||||
local MD=P.modeData
|
||||
|
||||
local c=#P.clearedRow
|
||||
if c==0 and MD.point%100==99 then return end
|
||||
local s=c<3 and c+1 or c==3 and 5 or 7
|
||||
if P.combo>7 then s=s+2
|
||||
elseif P.combo>3 then s=s+1
|
||||
end
|
||||
MD.point=MD.point+s
|
||||
|
||||
if MD.point%100==99 then
|
||||
SFX.play("blip_1")
|
||||
elseif MD.point>=100*(MD.event+1)then
|
||||
--Level up!
|
||||
s=MD.event+1
|
||||
MD.event=s
|
||||
local E=P.gameEnv
|
||||
BG.set(s==1 and"bg1"or s==2 and"bg2"or s==3 and"rainbow"or "rainbow2")
|
||||
E.lock=rush_lock[s]
|
||||
E.wait=rush_wait[s]
|
||||
E.fall=rush_fall[s]
|
||||
E.das=10-s
|
||||
if s==2 then
|
||||
P.gameEnv.arr=2
|
||||
elseif s==4 then
|
||||
P.gameEnv.bone=true
|
||||
end
|
||||
|
||||
if s==5 then
|
||||
MD.point,MD.event=500,4
|
||||
P:win("finish")
|
||||
else
|
||||
P:showTextF(text.stage:gsub("$1",s),0,-120,80,"fly")
|
||||
end
|
||||
SFX.play("reach")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
noTele=true,
|
||||
das=9,arr=3,
|
||||
drop=0,
|
||||
lock=rush_lock[1],
|
||||
wait=rush_wait[1],
|
||||
fall=rush_fall[1],
|
||||
dropPiece=score,
|
||||
freshLimit=15,
|
||||
bg="bg1",bgm="secret8th",
|
||||
},
|
||||
slowMark=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(P.modeData.point,69,390)
|
||||
mStr((P.modeData.event+1)*100,69,440)
|
||||
gc.rectangle("fill",25,445,90,4)
|
||||
end,
|
||||
score=function(P)return{P.modeData.point,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].."P "..toTime(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 S=P.modeData.point
|
||||
if S==500 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=170 and 5 or
|
||||
T<=200 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
S>=460 and 3 or
|
||||
S>=350 and 2 or
|
||||
S>=200 and 1 or
|
||||
S>=50 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
77
parts/modes/master_final.lua
Normal file
77
parts/modes/master_final.lua
Normal file
@@ -0,0 +1,77 @@
|
||||
local gc=love.graphics
|
||||
local int=math.floor
|
||||
local function score(P)
|
||||
local MD=P.modeData
|
||||
|
||||
local c=#P.clearedRow
|
||||
if c==0 and MD.point%100==99 then return end
|
||||
local s=c<3 and c+1 or c==3 and 5 or 7
|
||||
if P.combo>7 then s=s+2
|
||||
elseif P.combo>3 then s=s+1
|
||||
end
|
||||
MD.point=MD.point+s
|
||||
|
||||
if MD.point%100==99 then SFX.play("blip_1")end
|
||||
if int(MD.point*.01)>MD.event then
|
||||
--Level up!
|
||||
s=MD.event+1
|
||||
MD.event=s
|
||||
local E=P.gameEnv
|
||||
if s<4 then
|
||||
P:showTextF(text.stage:gsub("$1",s),0,-120,80,"fly")
|
||||
--First 300
|
||||
if s~=1 then E.lock=E.lock-1 end
|
||||
if s~=2 then E.wait=E.wait-1 end
|
||||
if s~=3 then E.fall=E.fall-1 end
|
||||
elseif s<10 then
|
||||
P:showTextF(text.stage:gsub("$1",s),0,-120,60,"fly",1.26)
|
||||
if s==4 or s==7 then E.das=E.das-1 end
|
||||
s=s%3
|
||||
if s==0 then E.lock=E.lock-1
|
||||
elseif s==1 then E.wait=E.wait-1
|
||||
elseif s==2 then E.fall=E.fall-1
|
||||
end
|
||||
else
|
||||
MD.point,MD.event=1000,9
|
||||
P:win("finish")
|
||||
end
|
||||
SFX.play("reach")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.lGrey,
|
||||
env={
|
||||
noTele=true,
|
||||
das=5,arr=1,
|
||||
drop=0,lock=12,
|
||||
wait=10,fall=10,
|
||||
dropPiece=score,
|
||||
freshLimit=15,
|
||||
easyFresh=false,bone=true,
|
||||
bg="lightning",bgm="distortion",
|
||||
},
|
||||
slowMark=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(P.modeData.point,69,390)
|
||||
mStr((P.modeData.event+1)*100,69,440)
|
||||
gc.rectangle("fill",25,445,90,4)
|
||||
end,
|
||||
score=function(P)return{P.modeData.point,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].."P "..toTime(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 S=P.modeData.point
|
||||
return
|
||||
S>=1000 and 5 or
|
||||
S>=800 and 4 or
|
||||
S>=600 and 3 or
|
||||
S>=400 and 2 or
|
||||
S>=200 and 1 or
|
||||
S>=50 and 0
|
||||
end,
|
||||
}
|
||||
169
parts/modes/master_phantasm.lua
Normal file
169
parts/modes/master_phantasm.lua
Normal file
@@ -0,0 +1,169 @@
|
||||
local gc=love.graphics
|
||||
local function check_LVup(P)
|
||||
local p=P.modeData.point+P.lastPiece.row
|
||||
if p>=P.gameEnv.target then
|
||||
local ENV=P.gameEnv
|
||||
local T=ENV.target
|
||||
--Stage 1: clear 3 techrash
|
||||
if T==12 then--Stage 2: swap color of S/Z & J/L
|
||||
P.waiting=30
|
||||
P.curMission=nil
|
||||
|
||||
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.lock=14
|
||||
ENV.wait=7
|
||||
ENV.fall=7
|
||||
P:setNext(4)
|
||||
|
||||
ENV.target=26
|
||||
SFX.play("reach")
|
||||
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
|
||||
P.waiting=45
|
||||
ENV.skin[1],ENV.skin[2]=ENV.skin[2],ENV.skin[1]
|
||||
ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3]
|
||||
|
||||
for i=1,10 do
|
||||
if P.field[i]then
|
||||
for j=1,10 do
|
||||
if P.field[i][j]>0 then
|
||||
P.field[i][j]=17
|
||||
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
|
||||
P.field[i][P:RND(10)]=0
|
||||
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
|
||||
P:setNext(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
|
||||
P:setNext(6)
|
||||
P:setHold(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
|
||||
|
||||
P:setHold(true)
|
||||
P:setInvisible(180)
|
||||
|
||||
ENV.target=226
|
||||
SFX.play("reach")
|
||||
elseif T==226 then--Stage 8: final invisible
|
||||
P.life=P.life+2
|
||||
|
||||
ENV.bone=false
|
||||
P:setInvisible(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:setInvisible(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
|
||||
|
||||
return{
|
||||
color=COLOR.black,
|
||||
env={
|
||||
noTele=true,
|
||||
das=5,arr=1,
|
||||
drop=0,lock=15,
|
||||
wait=10,fall=10,
|
||||
next=2,
|
||||
sequence="his4",
|
||||
target=12,dropPiece=check_LVup,
|
||||
mission={4,4,4,64},
|
||||
missionKill=true,
|
||||
freshLimit=12,
|
||||
bg="none",bgm="distortion",
|
||||
},
|
||||
slowMark=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(P.modeData.point,69,390)
|
||||
mStr(P.gameEnv.target,69,440)
|
||||
gc.rectangle("fill",25,445,90,4)
|
||||
end,
|
||||
score=function(P)return{P.result=="WIN"and 260 or P.modeData.point,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].."P "..toTime(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)
|
||||
P=P.modeData.point
|
||||
return
|
||||
P==260 and 5 or
|
||||
P>=226 and 4 or
|
||||
P>=162 and 3 or
|
||||
P>=62 and 2 or
|
||||
P>=42 and 1 or
|
||||
P>=26 and 0
|
||||
end,
|
||||
}
|
||||
37
parts/modes/pcchallenge_hard.lua
Normal file
37
parts/modes/pcchallenge_hard.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
drop=60,lock=120,
|
||||
fall=10,
|
||||
target=100,dropPiece=PLY.check_lineReach,
|
||||
freshLimit=15,
|
||||
ospin=false,
|
||||
bg="rgb",bgm="truth",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
local R=100-P.stat.row
|
||||
mStr(R>=0 and R or 0,69,320)
|
||||
|
||||
setFont(75)
|
||||
mStr(P.stat.pc,69,420)
|
||||
mText(drawableText.pc,69,502)
|
||||
end,
|
||||
score=function(P)return{P.stat.pc,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." PCs "..toTime(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.pc
|
||||
return
|
||||
L>=16 and 5 or
|
||||
L>=13 and 4 or
|
||||
L>=10 and 3 or
|
||||
L>=7 and 2 or
|
||||
L>=4 and 1 or
|
||||
L>=1 and 0
|
||||
end,
|
||||
}
|
||||
37
parts/modes/pcchallenge_lunatic.lua
Normal file
37
parts/modes/pcchallenge_lunatic.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
drop=20,lock=60,
|
||||
fall=20,
|
||||
target=100,dropPiece=PLY.check_lineReach,
|
||||
freshLimit=15,
|
||||
ospin=false,
|
||||
bg="rgb",bgm="truth",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
local R=100-P.stat.row
|
||||
mStr(R>=0 and R or 0,69,320)
|
||||
|
||||
setFont(75)
|
||||
mStr(P.stat.pc,69,420)
|
||||
mText(drawableText.pc,69,502)
|
||||
end,
|
||||
score=function(P)return{P.stat.pc,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." PCs "..toTime(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.pc
|
||||
return
|
||||
L>=15 and 5 or
|
||||
L>=12 and 4 or
|
||||
L>=9 and 3 or
|
||||
L>=6 and 2 or
|
||||
L>=3 and 1 or
|
||||
L>=1 and 0
|
||||
end,
|
||||
}
|
||||
36
parts/modes/pcchallenge_normal.lua
Normal file
36
parts/modes/pcchallenge_normal.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
oncehold=false,
|
||||
drop=300,lock=1e99,
|
||||
target=100,dropPiece=PLY.check_lineReach,
|
||||
ospin=false,
|
||||
bg="rgb",bgm="truth",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
local R=100-P.stat.row
|
||||
mStr(R>=0 and R or 0,69,320)
|
||||
|
||||
setFont(75)
|
||||
mStr(P.stat.pc,69,420)
|
||||
mText(drawableText.pc,69,502)
|
||||
end,
|
||||
score=function(P)return{P.stat.pc,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." PCs "..toTime(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.pc
|
||||
return
|
||||
L>=24 and 5 or
|
||||
L>=20 and 4 or
|
||||
L>=16 and 3 or
|
||||
L>=13 and 2 or
|
||||
L>=10 and 1 or
|
||||
L>=1 and 0
|
||||
end,
|
||||
}
|
||||
85
parts/modes/pctrain_lunatic.lua
Normal file
85
parts/modes/pctrain_lunatic.lua
Normal file
@@ -0,0 +1,85 @@
|
||||
local int=math.floor
|
||||
local pc_drop={50,45,40,35,30,26,22,18,15,12}
|
||||
local pc_lock={55,50,45,40,36,32,30}
|
||||
local pc_fall={18,16,14,12,10,9,8,7,6}
|
||||
local PCbase=require("parts/modes/PCbase")
|
||||
local PClist=require("parts/modes/PClist")
|
||||
local PCtype={[0]=1,2,3,2,3}
|
||||
|
||||
local function task_PC(P)
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter==26 then
|
||||
local base=PCbase[P.modeData.type]
|
||||
P:pushLine(base[P:RND(#base)],P.modeData.symmetry)
|
||||
return true
|
||||
end
|
||||
end
|
||||
local function newPC(P)
|
||||
local r=P.field
|
||||
if r[1]then
|
||||
r=r[#r]
|
||||
local c=0
|
||||
for i=1,10 do if r[i]>0 then c=c+1 end end
|
||||
if c<5 then P:lose()end
|
||||
end
|
||||
if #P.field==0 then
|
||||
local type=PCtype[P.stat.pc]or P:RND(2,3)
|
||||
local L=PClist[type][P:RND(#PClist[1])]
|
||||
local symmetry=P:RND()>.5
|
||||
P.modeData.type=type
|
||||
P.modeData.symmetry=symmetry
|
||||
P:pushNext(L,symmetry)
|
||||
P.modeData.counter=P.stat.piece==0 and 20 or 0
|
||||
P:newTask(task_PC)
|
||||
|
||||
local s=P.stat.pc*.25
|
||||
if int(s)==s and s>0 then
|
||||
P.gameEnv.drop=pc_drop[s]or 10
|
||||
P.gameEnv.lock=pc_lock[s]or 20
|
||||
P.gameEnv.fall=pc_fall[s]or 5
|
||||
if s==10 then
|
||||
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
|
||||
else
|
||||
P:showTextF(text.speedup,0,-140,40,"appear",.8)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
next=4,
|
||||
hold=false,
|
||||
drop=60,lock=60,
|
||||
fall=20,
|
||||
sequence="none",
|
||||
freshLimit=15,
|
||||
dropPiece=newPC,
|
||||
ospin=false,
|
||||
bg="rgb",bgm="oxygen",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
newPC(PLAYERS[1])
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
mStr(P.stat.pc,69,400)
|
||||
mText(drawableText.pc,69,482)
|
||||
end,
|
||||
score=function(P)return{P.stat.pc,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." PCs "..toTime(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.pc
|
||||
return
|
||||
L>=62 and 5 or
|
||||
L>=42 and 4 or
|
||||
L>=26 and 3 or
|
||||
L>=18 and 2 or
|
||||
L>=10 and 1 or
|
||||
L>=2 and 0
|
||||
end,
|
||||
}
|
||||
77
parts/modes/pctrain_normal.lua
Normal file
77
parts/modes/pctrain_normal.lua
Normal file
@@ -0,0 +1,77 @@
|
||||
local PCbase=require("parts/modes/PCbase")
|
||||
local PClist=require("parts/modes/PClist")
|
||||
local PCtype={
|
||||
[0]=1,1,1,1,2,
|
||||
1,1,1,1,3,
|
||||
1,1,1,2,
|
||||
1,1,1,3,
|
||||
1,1,2,
|
||||
1,1,3,
|
||||
1,2,
|
||||
1,3,
|
||||
2,
|
||||
3,
|
||||
}
|
||||
local function task_PC(P)
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter==26 then
|
||||
local base=PCbase[P.modeData.type]
|
||||
P:pushLine(base[P:RND(#base)],P.modeData.symmetry)
|
||||
return true
|
||||
end
|
||||
end
|
||||
local function newPC(P)
|
||||
local r=P.field
|
||||
if r[1]then
|
||||
r=r[#r]
|
||||
local c=0
|
||||
for i=1,10 do if r[i]>0 then c=c+1 end end
|
||||
if c<5 then P:lose()end
|
||||
end
|
||||
if #P.field==0 then
|
||||
local type=PCtype[P.stat.pc]or P:RND(2,3)
|
||||
local L=PClist[type][P:RND(#PClist[1])]
|
||||
local symmetry=P:RND()>.5
|
||||
P.modeData.type=type
|
||||
P.modeData.symmetry=symmetry
|
||||
P:pushNext(L,symmetry)
|
||||
P.modeData.counter=P.stat.piece==0 and 20 or 0
|
||||
P:newTask(task_PC)
|
||||
end
|
||||
end
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
next=4,
|
||||
hold=false,
|
||||
drop=120,lock=180,
|
||||
fall=20,
|
||||
sequence="none",
|
||||
dropPiece=newPC,
|
||||
ospin=false,
|
||||
bg="rgb",bgm="oxygen",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
newPC(PLAYERS[1])
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
mStr(P.stat.pc,69,400)
|
||||
mText(drawableText.pc,69,482)
|
||||
end,
|
||||
score=function(P)return{P.stat.pc,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." PCs "..toTime(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.pc
|
||||
return
|
||||
L>=126 and 5 or
|
||||
L>=62 and 4 or
|
||||
L>=42 and 3 or
|
||||
L>=26 and 2 or
|
||||
L>=12 and 1 or
|
||||
L>=2 and 0
|
||||
end,
|
||||
}
|
||||
40
parts/modes/round_1.lua
Normal file
40
parts/modes/round_1.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
local function update_round(P)
|
||||
if #PLAYERS.alive>1 then
|
||||
P.control=false
|
||||
local ID=P.id
|
||||
repeat
|
||||
ID=ID+1
|
||||
if not PLAYERS[ID]then ID=1 end
|
||||
until PLAYERS[ID].alive or ID==P.id
|
||||
PLAYERS[ID].control=true
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.cyan,
|
||||
env={
|
||||
drop=300,lock=300,
|
||||
oncehold=false,
|
||||
dropPiece=update_round,
|
||||
bg="rainbow",bgm="push",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("CC",10,1,true,10000))
|
||||
GAME.garbageSpeed=1e99
|
||||
end,
|
||||
score=function(P)return{P.stat.piece,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Pieces "..toTime(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)
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.piece
|
||||
return
|
||||
T<=23 and 5 or
|
||||
T<=26 and 4 or
|
||||
T<=40 and 3 or
|
||||
T<=60 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
}
|
||||
40
parts/modes/round_2.lua
Normal file
40
parts/modes/round_2.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
local function update_round(P)
|
||||
if #PLAYERS.alive>1 then
|
||||
P.control=false
|
||||
local ID=P.id
|
||||
repeat
|
||||
ID=ID+1
|
||||
if not PLAYERS[ID]then ID=1 end
|
||||
until PLAYERS[ID].alive or ID==P.id
|
||||
PLAYERS[ID].control=true
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=300,lock=300,
|
||||
oncehold=false,
|
||||
dropPiece=update_round,
|
||||
bg="rainbow",bgm="push",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("CC",10,1,true,13000))
|
||||
GAME.garbageSpeed=1e99
|
||||
end,
|
||||
score=function(P)return{P.stat.piece,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Pieces "..toTime(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)
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.piece
|
||||
return
|
||||
T<=23 and 5 or
|
||||
T<=26 and 4 or
|
||||
T<=40 and 3 or
|
||||
T<=60 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
}
|
||||
40
parts/modes/round_3.lua
Normal file
40
parts/modes/round_3.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
local function update_round(P)
|
||||
if #PLAYERS.alive>1 then
|
||||
P.control=false
|
||||
local ID=P.id
|
||||
repeat
|
||||
ID=ID+1
|
||||
if not PLAYERS[ID]then ID=1 end
|
||||
until PLAYERS[ID].alive or ID==P.id
|
||||
PLAYERS[ID].control=true
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
drop=300,lock=300,
|
||||
oncehold=false,
|
||||
dropPiece=update_round,
|
||||
bg="rainbow",bgm="push",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("CC",10,2,true,16000))
|
||||
GAME.garbageSpeed=1e99
|
||||
end,
|
||||
score=function(P)return{P.stat.piece,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Pieces "..toTime(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)
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.piece
|
||||
return
|
||||
T<=30 and 5 or
|
||||
T<=40 and 4 or
|
||||
T<=55 and 3 or
|
||||
T<=75 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
}
|
||||
40
parts/modes/round_4.lua
Normal file
40
parts/modes/round_4.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
local function update_round(P)
|
||||
if #PLAYERS.alive>1 then
|
||||
P.control=false
|
||||
local ID=P.id
|
||||
repeat
|
||||
ID=ID+1
|
||||
if not PLAYERS[ID]then ID=1 end
|
||||
until PLAYERS[ID].alive or ID==P.id
|
||||
PLAYERS[ID].control=true
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
drop=300,lock=300,
|
||||
oncehold=false,
|
||||
dropPiece=update_round,
|
||||
bg="rainbow",bgm="push",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("CC",10,3,true,26000))
|
||||
GAME.garbageSpeed=1e99
|
||||
end,
|
||||
score=function(P)return{P.stat.piece,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Pieces "..toTime(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)
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.piece
|
||||
return
|
||||
T<=30 and 5 or
|
||||
T<=40 and 4 or
|
||||
T<=55 and 3 or
|
||||
T<=75 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
}
|
||||
40
parts/modes/round_5.lua
Normal file
40
parts/modes/round_5.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
local function update_round(P)
|
||||
if #PLAYERS.alive>1 then
|
||||
P.control=false
|
||||
local ID=P.id
|
||||
repeat
|
||||
ID=ID+1
|
||||
if not PLAYERS[ID]then ID=1 end
|
||||
until PLAYERS[ID].alive or ID==P.id
|
||||
PLAYERS[ID].control=true
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.lYellow,
|
||||
env={
|
||||
drop=300,lock=300,
|
||||
oncehold=false,
|
||||
dropPiece=update_round,
|
||||
bg="rainbow",bgm="push",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("CC",10,3,true,40000))
|
||||
GAME.garbageSpeed=1e99
|
||||
end,
|
||||
score=function(P)return{P.stat.piece,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Pieces "..toTime(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)
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.piece
|
||||
return
|
||||
T<=30 and 5 or
|
||||
T<=40 and 4 or
|
||||
T<=55 and 3 or
|
||||
T<=75 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
}
|
||||
28
parts/modes/solo_1.lua
Normal file
28
parts/modes/solo_1.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return{
|
||||
color=COLOR.cyan,
|
||||
env={
|
||||
life=2,
|
||||
drop=60,lock=60,
|
||||
freshLimit=15,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("9S",4))
|
||||
end,
|
||||
score=function(P)return{P.stat.time}end,
|
||||
scoreDisp=function(D)return toTime(D[1])end,
|
||||
comp=function(a,b)return a[1]<b[1]end,
|
||||
getRank=function(P)
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=50 and 5 or
|
||||
T<=80 and 4 or
|
||||
T<=120 and 3 or
|
||||
T<=180 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
}
|
||||
28
parts/modes/solo_2.lua
Normal file
28
parts/modes/solo_2.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
life=2,
|
||||
drop=60,lock=60,
|
||||
freshLimit=15,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("9S",5))
|
||||
end,
|
||||
score=function(P)return{P.stat.time}end,
|
||||
scoreDisp=function(D)return toTime(D[1])end,
|
||||
comp=function(a,b)return a[1]<b[1]end,
|
||||
getRank=function(P)
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=50 and 5 or
|
||||
T<=80 and 4 or
|
||||
T<=120 and 3 or
|
||||
T<=180 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
}
|
||||
28
parts/modes/solo_3.lua
Normal file
28
parts/modes/solo_3.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
life=2,
|
||||
drop=60,lock=60,
|
||||
freshLimit=15,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("9S",6))
|
||||
end,
|
||||
score=function(P)return{P.stat.time}end,
|
||||
scoreDisp=function(D)return toTime(D[1])end,
|
||||
comp=function(a,b)return a[1]<b[1]end,
|
||||
getRank=function(P)
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=50 and 5 or
|
||||
T<=80 and 4 or
|
||||
T<=120 and 3 or
|
||||
T<=180 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
}
|
||||
28
parts/modes/solo_4.lua
Normal file
28
parts/modes/solo_4.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
life=2,
|
||||
drop=60,lock=60,
|
||||
freshLimit=15,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("CC",6,2,true,30000))
|
||||
end,
|
||||
score=function(P)return{P.stat.time}end,
|
||||
scoreDisp=function(D)return toTime(D[1])end,
|
||||
comp=function(a,b)return a[1]<b[1]end,
|
||||
getRank=function(P)
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=60 and 5 or
|
||||
T<=90 and 4 or
|
||||
T<=130 and 3 or
|
||||
T<=200 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
}
|
||||
28
parts/modes/solo_5.lua
Normal file
28
parts/modes/solo_5.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return{
|
||||
color=COLOR.lYellow,
|
||||
env={
|
||||
life=2,
|
||||
drop=60,lock=60,
|
||||
freshLimit=15,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
PLY.newAIPlayer(2,965,360,.5,AIBUILDER("CC",7,3,true,50000))
|
||||
end,
|
||||
score=function(P)return{P.stat.time}end,
|
||||
scoreDisp=function(D)return toTime(D[1])end,
|
||||
comp=function(a,b)return a[1]<b[1]end,
|
||||
getRank=function(P)
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=80 and 5 or
|
||||
T<=110 and 4 or
|
||||
T<=150 and 3 or
|
||||
T<=240 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
}
|
||||
37
parts/modes/sprintFix.lua
Normal file
37
parts/modes/sprintFix.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=60,lock=180,
|
||||
noTele=true,
|
||||
keyCancel={1,2},
|
||||
target=40,dropPiece=PLY.check_lineReach,
|
||||
bg="aura",bgm="waterfall",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
local r=40-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,69,335)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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<40 then
|
||||
return
|
||||
L>25 and 2 or
|
||||
L>10 and 1 or
|
||||
L>5 and 0
|
||||
end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=260 and 5 or
|
||||
T<=420 and 4 or
|
||||
3
|
||||
end,
|
||||
}
|
||||
36
parts/modes/sprintLock.lua
Normal file
36
parts/modes/sprintLock.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=60,lock=180,
|
||||
keyCancel={3,4,5},
|
||||
target=40,dropPiece=PLY.check_lineReach,
|
||||
bg="aura",bgm="waterfall",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
local r=40-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,69,335)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(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<40 then
|
||||
return
|
||||
L>25 and 2 or
|
||||
L>10 and 1 or
|
||||
L>2 and 0
|
||||
end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=60 and 5 or
|
||||
T<=100 and 4 or
|
||||
3
|
||||
end,
|
||||
}
|
||||
34
parts/modes/sprintMPH.lua
Normal file
34
parts/modes/sprintMPH.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
next=0,hold=false,
|
||||
sequence="rnd",
|
||||
target=40,dropPiece=PLY.check_lineReach,
|
||||
bg="aura",bgm="waterfall",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
local r=40-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,69,335)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or(a[1]==b[1] and a[2]<b[2])end,
|
||||
getRank=function(P)
|
||||
if P.stat.row<40 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=60 and 5 or
|
||||
T<=70 and 4 or
|
||||
T<=90 and 3 or
|
||||
T<=110 and 2 or
|
||||
T<=140 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
33
parts/modes/sprintPenta.lua
Normal file
33
parts/modes/sprintPenta.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
sequence="bag",bag={8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25},
|
||||
target=40,dropPiece=PLY.check_lineReach,
|
||||
bg="aura",bgm="waterfall",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
local r=40-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,69,335)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or(a[1]==b[1] and a[2]<b[2])end,
|
||||
getRank=function(P)
|
||||
if P.stat.row<40 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=76 and 5 or
|
||||
T<=90 and 4 or
|
||||
T<=150 and 3 or
|
||||
T<=260 and 2 or
|
||||
T<=500 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
32
parts/modes/sprint_10.lua
Normal file
32
parts/modes/sprint_10.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
return{
|
||||
color=COLOR.cyan,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
target=10,dropPiece=PLY.check_lineReach,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
local r=10-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,69,335)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
if P.stat.row<10 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=7 and 5 or
|
||||
T<=10 and 4 or
|
||||
T<=25 and 3 or
|
||||
T<=40 and 2 or
|
||||
T<=62 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
32
parts/modes/sprint_100.lua
Normal file
32
parts/modes/sprint_100.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
target=100,dropPiece=PLY.check_lineReach,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
local r=100-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,69,335)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
if P.stat.row<100 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=70 and 5 or
|
||||
T<=90 and 4 or
|
||||
T<=120 and 3 or
|
||||
T<=150 and 2 or
|
||||
T<=200 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
32
parts/modes/sprint_1000.lua
Normal file
32
parts/modes/sprint_1000.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
return{
|
||||
color=COLOR.lGrey,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
target=1000,dropPiece=PLY.check_lineReach,
|
||||
bg="rainbow",bgm="push",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
local r=1000-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,69,335)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
if P.stat.row<1000 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=626 and 5 or
|
||||
T<=800 and 4 or
|
||||
T<=900 and 3 or
|
||||
T<=1050 and 2 or
|
||||
T<=1200 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
32
parts/modes/sprint_20.lua
Normal file
32
parts/modes/sprint_20.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
return{
|
||||
color=COLOR.lBlue,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
target=20,dropPiece=PLY.check_lineReach,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
local r=20-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,69,335)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
if P.stat.row<20 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=13 and 5 or
|
||||
T<=18 and 4 or
|
||||
T<=32.6 and 3 or
|
||||
T<=62.6 and 2 or
|
||||
T<=126 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
32
parts/modes/sprint_40.lua
Normal file
32
parts/modes/sprint_40.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
target=40,dropPiece=PLY.check_lineReach,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
local r=40-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,69,335)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
if P.stat.row<40 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=26 and 5 or
|
||||
T<=32.6 and 4 or
|
||||
T<=52.6 and 3 or
|
||||
T<=92.9 and 2 or
|
||||
T<=183 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
32
parts/modes/sprint_400.lua
Normal file
32
parts/modes/sprint_400.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
return{
|
||||
color=COLOR.dRed,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
target=400,dropPiece=PLY.check_lineReach,
|
||||
bg="rainbow",bgm="push",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
local r=400-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,69,335)
|
||||
PLY.draw.drawTargetLine(P,r)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
if P.stat.row<400 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=300 and 5 or
|
||||
T<=330 and 4 or
|
||||
T<=360 and 3 or
|
||||
T<=390 and 2 or
|
||||
T<=420 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
43
parts/modes/survivor_easy.lua
Normal file
43
parts/modes/survivor_easy.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.cyan,
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
freshLimit=10,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=max(60,150-2*P.modeData.event)and P.atkBuffer.sum<4 then
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+1
|
||||
P.stat.recv=P.stat.recv+1
|
||||
if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
end,
|
||||
bg="glow",bgm="new era",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,380)
|
||||
mText(drawableText.wave,69,445)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..toTime(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 W=P.modeData.event
|
||||
return
|
||||
W>=100 and 5 or
|
||||
W>=60 and 4 or
|
||||
W>=45 and 3 or
|
||||
W>=30 and 2 or
|
||||
W>=15 and 1 or
|
||||
W>=5 and 0
|
||||
end,
|
||||
}
|
||||
49
parts/modes/survivor_hard.lua
Normal file
49
parts/modes/survivor_hard.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
freshLimit=10,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
local B=P.atkBuffer
|
||||
if P.modeData.counter>=max(60,180-2*P.modeData.event)and B.sum<15 then
|
||||
B[#B+1]=
|
||||
P.modeData.event%3<2 and
|
||||
{pos=P:RND(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1}
|
||||
or
|
||||
{pos=P:RND(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2}
|
||||
local R=(P.modeData.event%3<2 and 1 or 3)
|
||||
B.sum=B.sum+R
|
||||
P.stat.recv=P.stat.recv+R
|
||||
if P.modeData.event==60 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
end,
|
||||
bg="glow",bgm="secret7th",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,380)
|
||||
mText(drawableText.wave,69,445)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..toTime(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 W=P.modeData.event
|
||||
return
|
||||
W>=90 and 5 or
|
||||
W>=60 and 4 or
|
||||
W>=45 and 3 or
|
||||
W>=30 and 2 or
|
||||
W>=15 and 1 or
|
||||
W>=5 and 0
|
||||
end,
|
||||
}
|
||||
44
parts/modes/survivor_lunatic.lua
Normal file
44
parts/modes/survivor_lunatic.lua
Normal file
@@ -0,0 +1,44 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
freshLimit=10,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=max(60,150-P.modeData.event)and P.atkBuffer.sum<20 then
|
||||
local t=max(60,90-P.modeData.event)
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+4
|
||||
P.stat.recv=P.stat.recv+4
|
||||
if P.modeData.event==60 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
end,
|
||||
bg="glow",bgm="storm",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,380)
|
||||
mText(drawableText.wave,69,445)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..toTime(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 W=P.modeData.event
|
||||
return
|
||||
W>=110 and 5 or
|
||||
W>=80 and 4 or
|
||||
W>=55 and 3 or
|
||||
W>=30 and 2 or
|
||||
W>=15 and 1 or
|
||||
W>=5 and 0
|
||||
end,
|
||||
}
|
||||
48
parts/modes/survivor_normal.lua
Normal file
48
parts/modes/survivor_normal.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
freshLimit=10,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=max(90,180-2*P.modeData.event)and P.atkBuffer.sum<8 then
|
||||
local d=P.modeData.event+1
|
||||
P.atkBuffer[#P.atkBuffer+1]=
|
||||
d%4==0 and{pos=P:RND(10),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1}or
|
||||
d%4==1 and{pos=P:RND(10),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1}or
|
||||
d%4==2 and{pos=P:RND(10),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2}or
|
||||
d%4==3 and{pos=P:RND(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+d%4+1
|
||||
P.stat.recv=P.stat.recv+d%4+1
|
||||
if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=d
|
||||
end
|
||||
end,
|
||||
bg="glow",bgm="secret8th",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,380)
|
||||
mText(drawableText.wave,69,445)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..toTime(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 W=P.modeData.event
|
||||
return
|
||||
W>=80 and 5 or
|
||||
W>=55 and 4 or
|
||||
W>=45 and 3 or
|
||||
W>=30 and 2 or
|
||||
W>=15 and 1 or
|
||||
W>=5 and 0
|
||||
end,
|
||||
}
|
||||
50
parts/modes/survivor_ultimate.lua
Normal file
50
parts/modes/survivor_ultimate.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
local max=math.max
|
||||
return{
|
||||
color=COLOR.lYellow,
|
||||
env={
|
||||
drop=5,lock=60,
|
||||
fall=10,
|
||||
freshLimit=15,
|
||||
pushSpeed=2,
|
||||
task=function(P)
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=max(300,600-10*P.modeData.event)and P.atkBuffer.sum<20 then
|
||||
local t=max(300,480-12*P.modeData.event)
|
||||
local p=#P.atkBuffer+1
|
||||
P.atkBuffer[p] ={pos=P:RND(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=2}
|
||||
P.atkBuffer[p+1]={pos=P:RND(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
P.atkBuffer[p+2]={pos=P:RND(10),amount=6,countdown=1.2*t,cd0=1.2*t,time=0,sent=false,lv=4}
|
||||
P.atkBuffer[p+3]={pos=P:RND(10),amount=6,countdown=1.5*t,cd0=1.5*t,time=0,sent=false,lv=5}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+20
|
||||
P.stat.recv=P.stat.recv+20
|
||||
if P.modeData.event==31 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
end,
|
||||
bg="welcome",bgm="storm",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,380)
|
||||
mText(drawableText.wave,69,445)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..toTime(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 W=P.modeData.event
|
||||
return
|
||||
W>=35 and 5 or
|
||||
W>=26 and 4 or
|
||||
W>=20 and 3 or
|
||||
W>=10 and 2 or
|
||||
W>=5 and 1 or
|
||||
W>=1 and 0
|
||||
end,
|
||||
}
|
||||
44
parts/modes/tech_finesse.lua
Normal file
44
parts/modes/tech_finesse.lua
Normal file
@@ -0,0 +1,44 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
return{
|
||||
color=COLOR.lYellow,
|
||||
env={
|
||||
arr=0,
|
||||
drop=1e99,lock=60,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
dropPiece=PLY.check_attackReach,
|
||||
fineKill=true,
|
||||
bg="flink",bgm="infinite",
|
||||
},
|
||||
slowMark=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(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.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<120 and 5 or
|
||||
T<150 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
56
parts/modes/tech_finesse2.lua
Normal file
56
parts/modes/tech_finesse2.lua
Normal file
@@ -0,0 +1,56 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_hard(P)
|
||||
local C=P.lastPiece
|
||||
if C.row>0 then
|
||||
if not C.special then
|
||||
P:lose()
|
||||
return
|
||||
end
|
||||
end
|
||||
if P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.grey,
|
||||
env={
|
||||
arr=0,
|
||||
drop=1e99,lock=60,
|
||||
freshLimit=15,
|
||||
fineKill=true,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="flink",bgm="infinite",
|
||||
},
|
||||
slowMark=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(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.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<120 and 5 or
|
||||
T<150 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
48
parts/modes/tech_hard.lua
Normal file
48
parts/modes/tech_hard.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_easy(P)
|
||||
if #P.clearedRow>0 and P.b2b<40 then
|
||||
P:lose()
|
||||
elseif P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
drop=20,lock=60,
|
||||
freshLimit=15,
|
||||
dropPiece=tech_check_easy,
|
||||
bg="matrix",bgm="down",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(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.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<120 and 5 or
|
||||
T<150 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
53
parts/modes/tech_hard2.lua
Normal file
53
parts/modes/tech_hard2.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_hard(P)
|
||||
local C=P.lastPiece
|
||||
if C.row>0 then
|
||||
if not(C.spin or C.pc)then
|
||||
P:lose()
|
||||
return
|
||||
end
|
||||
end
|
||||
if P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.dMagenta,
|
||||
env={
|
||||
drop=30,lock=60,
|
||||
freshLimit=15,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="matrix",bgm="down",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(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.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<130 and 5 or
|
||||
T<160 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
48
parts/modes/tech_lunatic.lua
Normal file
48
parts/modes/tech_lunatic.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_easy(P)
|
||||
if #P.clearedRow>0 and P.b2b<40 then
|
||||
P:lose()
|
||||
elseif P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.red,
|
||||
env={
|
||||
drop=0,lock=60,
|
||||
freshLimit=15,
|
||||
dropPiece=tech_check_easy,
|
||||
bg="matrix",bgm="down",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(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.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<130 and 5 or
|
||||
T<160 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
53
parts/modes/tech_lunatic2.lua
Normal file
53
parts/modes/tech_lunatic2.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_hard(P)
|
||||
local C=P.lastPiece
|
||||
if C.row>0 then
|
||||
if not(C.spin or C.pc)then
|
||||
P:lose()
|
||||
return
|
||||
end
|
||||
end
|
||||
if P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.dRed,
|
||||
env={
|
||||
drop=0,lock=60,
|
||||
freshLimit=15,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="matrix",bgm="down",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(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.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<140 and 5 or
|
||||
T<180 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
48
parts/modes/tech_normal.lua
Normal file
48
parts/modes/tech_normal.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_easy(P)
|
||||
if #P.clearedRow>0 and P.b2b<40 then
|
||||
P:lose()
|
||||
elseif P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
oncehold=false,
|
||||
drop=1e99,lock=1e99,
|
||||
dropPiece=tech_check_easy,
|
||||
bg="matrix",bgm="new era",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(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.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<120 and 5 or
|
||||
T<150 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
53
parts/modes/tech_normal2.lua
Normal file
53
parts/modes/tech_normal2.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_hard(P)
|
||||
local C=P.lastPiece
|
||||
if C.row>0 then
|
||||
if not(C.spin or C.pc)then
|
||||
P:lose()
|
||||
return
|
||||
end
|
||||
end
|
||||
if P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.dGreen,
|
||||
env={
|
||||
oncehold=false,
|
||||
drop=1e99,lock=1e99,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="matrix",bgm="new era",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(45)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(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.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<130 and 5 or
|
||||
T<160 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
87
parts/modes/techmino49_easy.lua
Normal file
87
parts/modes/techmino49_easy.lua
Normal file
@@ -0,0 +1,87 @@
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
||||
local function selectTarget(P)
|
||||
if SETTING.swap then
|
||||
for i=1,#P.keyPressing do
|
||||
if P.keyPressing[i]then
|
||||
P.keyPressing[i]=false
|
||||
end
|
||||
end
|
||||
P.keyPressing[9]=true
|
||||
else
|
||||
P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode)
|
||||
P.swappingAtkMode=30
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.cyan,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
fall=20,
|
||||
royaleMode=true,
|
||||
Fkey=selectTarget,
|
||||
pushSpeed=2,
|
||||
freshLimit=15,
|
||||
bg="rainbow",bgm="rockblock",
|
||||
},
|
||||
load=function()
|
||||
royaleData={
|
||||
powerUp={2,5,10,20},
|
||||
stage={30,20,15,10,5},
|
||||
}
|
||||
PLY.newPlayer(1,340,15)
|
||||
local L={}for i=1,49 do L[i]=true end
|
||||
local t=CC and 2 or 0
|
||||
while t>0 do
|
||||
local r=rnd(2,49)
|
||||
if L[r]then L[r],t=false,t-1 end
|
||||
end
|
||||
local n=2
|
||||
for i=1,4 do for j=1,6 do
|
||||
if L[n]then
|
||||
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AIBUILDER("9S",rnd(4,6)))
|
||||
else
|
||||
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AIBUILDER("CC",rnd(2,4),2,true,20000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
for i=9,12 do for j=1,6 do
|
||||
if L[n]then
|
||||
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AIBUILDER("9S",rnd(4,5)))
|
||||
else
|
||||
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AIBUILDER("CC",rnd(3,5),2,true,20000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(35)
|
||||
mStr(#PLAYERS.alive.."/49",69,245)
|
||||
mStr(P.modeData.point,80,285)
|
||||
gc.draw(drawableText.ko,23,295)
|
||||
setFont(20)
|
||||
gc.setColor(1,.5,0,.6)
|
||||
gc.print(P.badge,103,297)
|
||||
gc.setColor(1,1,1)
|
||||
setFont(25)
|
||||
gc.print(powerUp[P.strength],18,360)
|
||||
for i=1,P.strength do
|
||||
gc.draw(IMG.badgeIcon,16*i+12,330)
|
||||
end
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.modeData.point}end,
|
||||
scoreDisp=function(D)return"NO."..D[1].." KO:"..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 R=P.modeData.event
|
||||
return
|
||||
R==1 and 5 or
|
||||
R<=3 and 4 or
|
||||
R<=5 and 3 or
|
||||
R<=10 and 2 or
|
||||
R<=15 and 1 or
|
||||
R<=45 and 0
|
||||
end,
|
||||
}
|
||||
87
parts/modes/techmino49_hard.lua
Normal file
87
parts/modes/techmino49_hard.lua
Normal file
@@ -0,0 +1,87 @@
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
||||
local function selectTarget(P)
|
||||
if SETTING.swap then
|
||||
for i=1,#P.keyPressing do
|
||||
if P.keyPressing[i]then
|
||||
P.keyPressing[i]=false
|
||||
end
|
||||
end
|
||||
P.keyPressing[9]=true
|
||||
else
|
||||
P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode)
|
||||
P.swappingAtkMode=30
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
fall=20,
|
||||
royaleMode=true,
|
||||
Fkey=selectTarget,
|
||||
pushSpeed=2,
|
||||
freshLimit=15,
|
||||
bg="rainbow",bgm="rockblock",
|
||||
},
|
||||
load=function()
|
||||
royaleData={
|
||||
powerUp={2,5,10,20},
|
||||
stage={30,20,15,10,5},
|
||||
}
|
||||
PLY.newPlayer(1,340,15)
|
||||
local L={}for i=1,49 do L[i]=true end
|
||||
local t=CC and 4 or 0
|
||||
while t>0 do
|
||||
local r=rnd(2,49)
|
||||
if L[r]then L[r],t=false,t-1 end
|
||||
end
|
||||
local n=2
|
||||
for i=1,4 do for j=1,6 do
|
||||
if L[n]then
|
||||
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AIBUILDER("9S",rnd(4,8)))
|
||||
else
|
||||
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AIBUILDER("CC",rnd(3,6),3,true,30000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
for i=9,12 do for j=1,6 do
|
||||
if L[n]then
|
||||
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AIBUILDER("9S",rnd(4,7)))
|
||||
else
|
||||
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AIBUILDER("CC",rnd(4,6),3,true,30000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(35)
|
||||
mStr(#PLAYERS.alive.."/49",69,245)
|
||||
mStr(P.modeData.point,80,285)
|
||||
gc.draw(drawableText.ko,23,295)
|
||||
setFont(20)
|
||||
gc.setColor(1,.5,0,.6)
|
||||
gc.print(P.badge,103,297)
|
||||
gc.setColor(1,1,1)
|
||||
setFont(25)
|
||||
gc.print(powerUp[P.strength],18,360)
|
||||
for i=1,P.strength do
|
||||
gc.draw(IMG.badgeIcon,16*i+12,330)
|
||||
end
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.modeData.point}end,
|
||||
scoreDisp=function(D)return"NO."..D[1].." KO:"..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 R=P.modeData.event
|
||||
return
|
||||
R==1 and 5 or
|
||||
R==2 and 4 or
|
||||
R<=4 and 3 or
|
||||
R<=6 and 2 or
|
||||
R<=8 and 1 or
|
||||
R<=45 and 0
|
||||
end,
|
||||
}
|
||||
87
parts/modes/techmino49_ultimate.lua
Normal file
87
parts/modes/techmino49_ultimate.lua
Normal file
@@ -0,0 +1,87 @@
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
||||
local function selectTarget(P)
|
||||
if SETTING.swap then
|
||||
for i=1,#P.keyPressing do
|
||||
if P.keyPressing[i]then
|
||||
P.keyPressing[i]=false
|
||||
end
|
||||
end
|
||||
P.keyPressing[9]=true
|
||||
else
|
||||
P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode)
|
||||
P.swappingAtkMode=30
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.lYellow,
|
||||
env={
|
||||
drop=15,lock=60,
|
||||
fall=20,
|
||||
royaleMode=true,
|
||||
Fkey=selectTarget,
|
||||
pushSpeed=2,
|
||||
freshLimit=15,
|
||||
bg="rainbow",bgm="rockblock",
|
||||
},
|
||||
load=function()
|
||||
royaleData={
|
||||
powerUp={2,5,10,20},
|
||||
stage={30,20,15,10,5},
|
||||
}
|
||||
PLY.newPlayer(1,340,15)
|
||||
local L={}for i=1,49 do L[i]=true end
|
||||
local t=CC and 6 or 0
|
||||
while t>0 do
|
||||
local r=rnd(2,49)
|
||||
if L[r]then L[r],t=false,t-1 end
|
||||
end
|
||||
local n=2
|
||||
for i=1,4 do for j=1,6 do
|
||||
if L[n]then
|
||||
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AIBUILDER("9S",rnd(8,10)))
|
||||
else
|
||||
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AIBUILDER("CC",rnd(4,7),3,true,40000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
for i=9,12 do for j=1,6 do
|
||||
if L[n]then
|
||||
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AIBUILDER("9S",rnd(8,9)))
|
||||
else
|
||||
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AIBUILDER("CC",rnd(5,8),3,true,40000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(35)
|
||||
mStr(#PLAYERS.alive.."/49",69,245)
|
||||
mStr(P.modeData.point,80,285)
|
||||
gc.draw(drawableText.ko,23,295)
|
||||
setFont(20)
|
||||
gc.setColor(1,.5,0,.6)
|
||||
gc.print(P.badge,103,297)
|
||||
gc.setColor(1,1,1)
|
||||
setFont(25)
|
||||
gc.print(powerUp[P.strength],18,360)
|
||||
for i=1,P.strength do
|
||||
gc.draw(IMG.badgeIcon,16*i+12,330)
|
||||
end
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.modeData.point}end,
|
||||
scoreDisp=function(D)return"NO."..D[1].." KO:"..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 R=P.modeData.event
|
||||
return
|
||||
R==1 and 5 or
|
||||
R==2 and 4 or
|
||||
R==3 and 3 or
|
||||
R==4 and 2 or
|
||||
R<=6 and 1 or
|
||||
R<=45 and 0
|
||||
end,
|
||||
}
|
||||
87
parts/modes/techmino99_easy.lua
Normal file
87
parts/modes/techmino99_easy.lua
Normal file
@@ -0,0 +1,87 @@
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
||||
local function selectTarget(P)
|
||||
if SETTING.swap then
|
||||
for i=1,#P.keyPressing do
|
||||
if P.keyPressing[i]then
|
||||
P.keyPressing[i]=false
|
||||
end
|
||||
end
|
||||
P.keyPressing[9]=true
|
||||
else
|
||||
P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode)
|
||||
P.swappingAtkMode=30
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.cyan,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
fall=20,
|
||||
royaleMode=true,
|
||||
Fkey=selectTarget,
|
||||
pushSpeed=2,
|
||||
freshLimit=15,
|
||||
bg="rainbow",bgm="rockblock",
|
||||
},
|
||||
load=function()
|
||||
royaleData={
|
||||
powerUp={2,6,14,30},
|
||||
stage={75,50,35,20,10},
|
||||
}
|
||||
PLY.newPlayer(1,340,15)
|
||||
local L={}for i=1,100 do L[i]=true end
|
||||
local t=CC and 4 or 0
|
||||
while t>0 do
|
||||
local r=rnd(2,99)
|
||||
if L[r]then L[r],t=false,t-1 end
|
||||
end
|
||||
local n=2
|
||||
for i=1,7 do for j=1,7 do
|
||||
if L[n]then
|
||||
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AIBUILDER("9S",rnd(4,6)))
|
||||
else
|
||||
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AIBUILDER("CC",rnd(2,4),2,true,20000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
for i=15,21 do for j=1,7 do
|
||||
if L[n]then
|
||||
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AIBUILDER("9S",rnd(4,5)))
|
||||
else
|
||||
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AIBUILDER("CC",rnd(3,5),2,true,20000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(35)
|
||||
mStr(#PLAYERS.alive.."/99",69,245)
|
||||
mStr(P.modeData.point,80,285)
|
||||
gc.draw(drawableText.ko,23,295)
|
||||
setFont(20)
|
||||
gc.setColor(1,.5,0,.6)
|
||||
gc.print(P.badge,103,297)
|
||||
gc.setColor(1,1,1)
|
||||
setFont(25)
|
||||
gc.print(powerUp[P.strength],18,360)
|
||||
for i=1,P.strength do
|
||||
gc.draw(IMG.badgeIcon,16*i+12,330)
|
||||
end
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.modeData.point}end,
|
||||
scoreDisp=function(D)return"NO."..D[1].." KO:"..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 R=P.modeData.event
|
||||
return
|
||||
R==1 and 5 or
|
||||
R<=3 and 4 or
|
||||
R<=6 and 3 or
|
||||
R<=10 and 2 or
|
||||
R<=20 and 1 or
|
||||
R<=90 and 0
|
||||
end,
|
||||
}
|
||||
87
parts/modes/techmino99_hard.lua
Normal file
87
parts/modes/techmino99_hard.lua
Normal file
@@ -0,0 +1,87 @@
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
||||
local function selectTarget(P)
|
||||
if SETTING.swap then
|
||||
for i=1,#P.keyPressing do
|
||||
if P.keyPressing[i]then
|
||||
P.keyPressing[i]=false
|
||||
end
|
||||
end
|
||||
P.keyPressing[9]=true
|
||||
else
|
||||
P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode)
|
||||
P.swappingAtkMode=30
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
fall=20,
|
||||
royaleMode=true,
|
||||
Fkey=selectTarget,
|
||||
pushSpeed=2,
|
||||
freshLimit=15,
|
||||
bg="rainbow",bgm="rockblock",
|
||||
},
|
||||
load=function()
|
||||
royaleData={
|
||||
powerUp={2,6,14,30},
|
||||
stage={75,50,35,20,10},
|
||||
}
|
||||
PLY.newPlayer(1,340,15)
|
||||
local L={}for i=1,100 do L[i]=true end
|
||||
local t=CC and 4 or 0
|
||||
while t>0 do
|
||||
local r=rnd(2,99)
|
||||
if L[r]then L[r],t=false,t-1 end
|
||||
end
|
||||
local n=2
|
||||
for i=1,7 do for j=1,7 do
|
||||
if L[n]then
|
||||
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AIBUILDER("9S",rnd(4,8)))
|
||||
else
|
||||
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AIBUILDER("CC",rnd(3,6),3,true,30000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
for i=15,21 do for j=1,7 do
|
||||
if L[n]then
|
||||
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AIBUILDER("9S",rnd(4,7)))
|
||||
else
|
||||
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AIBUILDER("CC",rnd(4,6),3,true,30000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(35)
|
||||
mStr(#PLAYERS.alive.."/99",69,245)
|
||||
mStr(P.modeData.point,80,285)
|
||||
gc.draw(drawableText.ko,23,295)
|
||||
setFont(20)
|
||||
gc.setColor(1,.5,0,.6)
|
||||
gc.print(P.badge,103,297)
|
||||
gc.setColor(1,1,1)
|
||||
setFont(25)
|
||||
gc.print(powerUp[P.strength],18,360)
|
||||
for i=1,P.strength do
|
||||
gc.draw(IMG.badgeIcon,16*i+12,330)
|
||||
end
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.modeData.point}end,
|
||||
scoreDisp=function(D)return"NO."..D[1].." KO:"..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 R=P.modeData.event
|
||||
return
|
||||
R==1 and 5 or
|
||||
R<=3 and 4 or
|
||||
R<=6 and 3 or
|
||||
R<=8 and 2 or
|
||||
R<=10 and 1 or
|
||||
R<=90 and 0
|
||||
end,
|
||||
}
|
||||
87
parts/modes/techmino99_ultimate.lua
Normal file
87
parts/modes/techmino99_ultimate.lua
Normal file
@@ -0,0 +1,87 @@
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
||||
local function selectTarget(P)
|
||||
if SETTING.swap then
|
||||
for i=1,#P.keyPressing do
|
||||
if P.keyPressing[i]then
|
||||
P.keyPressing[i]=false
|
||||
end
|
||||
end
|
||||
P.keyPressing[9]=true
|
||||
else
|
||||
P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode)
|
||||
P.swappingAtkMode=30
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.lYellow,
|
||||
env={
|
||||
drop=15,lock=60,
|
||||
fall=20,
|
||||
royaleMode=true,
|
||||
Fkey=selectTarget,
|
||||
pushSpeed=2,
|
||||
freshLimit=15,
|
||||
bg="rainbow",bgm="rockblock",
|
||||
},
|
||||
load=function()
|
||||
royaleData={
|
||||
powerUp={2,6,14,30},
|
||||
stage={75,50,35,20,10},
|
||||
}
|
||||
PLY.newPlayer(1,340,15)
|
||||
local L={}for i=1,100 do L[i]=true end
|
||||
local t=CC and 4 or 0
|
||||
while t>0 do
|
||||
local r=rnd(2,99)
|
||||
if L[r]then L[r],t=false,t-1 end
|
||||
end
|
||||
local n=2
|
||||
for i=1,7 do for j=1,7 do
|
||||
if L[n]then
|
||||
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AIBUILDER("9S",rnd(8,10)))
|
||||
else
|
||||
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AIBUILDER("CC",rnd(4,7),3,true,40000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
for i=15,21 do for j=1,7 do
|
||||
if L[n]then
|
||||
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AIBUILDER("9S",rnd(8,9)))
|
||||
else
|
||||
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AIBUILDER("CC",rnd(5,8),3,true,40000))
|
||||
end
|
||||
n=n+1
|
||||
end end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(35)
|
||||
mStr(#PLAYERS.alive.."/99",69,245)
|
||||
mStr(P.modeData.point,80,285)
|
||||
gc.draw(drawableText.ko,23,295)
|
||||
setFont(20)
|
||||
gc.setColor(1,.5,0,.6)
|
||||
gc.print(P.badge,103,297)
|
||||
gc.setColor(1,1,1)
|
||||
setFont(25)
|
||||
gc.print(powerUp[P.strength],18,360)
|
||||
for i=1,P.strength do
|
||||
gc.draw(IMG.badgeIcon,16*i+12,330)
|
||||
end
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.modeData.point}end,
|
||||
scoreDisp=function(D)return"NO."..D[1].." KO:"..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 R=P.modeData.event
|
||||
return
|
||||
R==1 and 5 or
|
||||
R==2 and 4 or
|
||||
R==3 and 3 or
|
||||
R<=5 and 2 or
|
||||
R<=7 and 1 or
|
||||
R<=90 and 0
|
||||
end,
|
||||
}
|
||||
42
parts/modes/tsd_easy.lua
Normal file
42
parts/modes/tsd_easy.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
local function check_tsd(P)
|
||||
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
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.green,
|
||||
env={
|
||||
drop=1e99,lock=1e99,
|
||||
oncehold=false,
|
||||
dropPiece=check_tsd,
|
||||
ospin=false,
|
||||
bg="matrix",bgm="push",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,320)
|
||||
mText(drawableText.tsd,69,385)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].."TSD "..toTime(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 T=P.modeData.event
|
||||
return
|
||||
T>=20 and 5 or
|
||||
T>=18 and 4 or
|
||||
T>=15 and 3 or
|
||||
T>=10 and 2 or
|
||||
T>=4 and 1 or
|
||||
T>=1 and 0
|
||||
end,
|
||||
}
|
||||
43
parts/modes/tsd_hard.lua
Normal file
43
parts/modes/tsd_hard.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
local function check_tsd(P)
|
||||
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
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.magenta,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
freshLimit=15,
|
||||
dropPiece=check_tsd,
|
||||
ospin=false,
|
||||
bg="matrix",bgm="push",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,320)
|
||||
mText(drawableText.tsd,69,385)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].."TSD "..toTime(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 T=P.modeData.event
|
||||
return
|
||||
T>=21 and 5 or
|
||||
T>=19 and 4 or
|
||||
T>=16 and 3 or
|
||||
T>=13 and 2 or
|
||||
T>=10 and 1 or
|
||||
T>=1 and 0
|
||||
end,
|
||||
}
|
||||
43
parts/modes/tsd_ultimate.lua
Normal file
43
parts/modes/tsd_ultimate.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
local function check_tsd(P)
|
||||
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
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=COLOR.lYellow,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
freshLimit=15,
|
||||
dropPiece=check_tsd,
|
||||
ospin=false,
|
||||
bg="matrix",bgm="push",
|
||||
},
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,320)
|
||||
mText(drawableText.tsd,69,385)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].."TSD "..toTime(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 T=P.modeData.event
|
||||
return
|
||||
T>=20 and 5 or
|
||||
T>=18 and 4 or
|
||||
T>=16 and 3 or
|
||||
T>=14 and 2 or
|
||||
T>=12 and 1 or
|
||||
T>=1 and 0
|
||||
end,
|
||||
}
|
||||
49
parts/modes/ultra.lua
Normal file
49
parts/modes/ultra.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
local gc=love.graphics
|
||||
local warnTime={60,90,105,115,116,117,118,119,120}
|
||||
return{
|
||||
color=COLOR.lGrey,
|
||||
env={
|
||||
noTele=true,
|
||||
minarr=1,minsdarr=1,
|
||||
drop=60,lock=60,
|
||||
fall=20,
|
||||
task=function(P)
|
||||
local _=P.modeData.counter+1
|
||||
if P.stat.time>=warnTime[_]then
|
||||
if _<9 then
|
||||
P.modeData.counter=_
|
||||
SFX.play("ready",.7+_*.03)
|
||||
else
|
||||
SFX.play("start")
|
||||
P:win("finish")
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
bg="fan",bgm="infinite",
|
||||
},
|
||||
slowMark=true,
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
gc.setLineWidth(2)
|
||||
gc.rectangle("line",55,190,32,402)
|
||||
local T=P.stat.time/120
|
||||
gc.setColor(2*T,2-2*T,.2)
|
||||
gc.rectangle("fill",56,591,30,(T-1)*400)
|
||||
end,
|
||||
score=function(P)return{P.stat.score}end,
|
||||
scoreDisp=function(D)return tostring(D[1])end,
|
||||
comp=function(a,b)return a[1]>b[1]end,
|
||||
getRank=function(P)
|
||||
local T=P.stat.score
|
||||
return
|
||||
T>=62000 and 5 or
|
||||
T>=50000 and 4 or
|
||||
T>=26000 and 3 or
|
||||
T>=10000 and 2 or
|
||||
T>=6200 and 1
|
||||
end,
|
||||
}
|
||||
29
parts/modes/zen.lua
Normal file
29
parts/modes/zen.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
return{
|
||||
color=COLOR.lGrey,
|
||||
env={
|
||||
drop=120,lock=120,
|
||||
oncehold=false,
|
||||
target=200,dropPiece=PLY.check_lineReach,
|
||||
bg="bg2",bgm="infinite",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(70)
|
||||
local R=200-P.stat.row
|
||||
mStr(R>=0 and R or 0,69,335)
|
||||
end,
|
||||
score=function(P)return{P.stat.score}end,
|
||||
scoreDisp=function(D)return tostring(D[1])end,
|
||||
comp=function(a,b)return a[1]>b[1]end,
|
||||
getRank=function(P)
|
||||
local T=P.stat.score
|
||||
return
|
||||
T>=126000 and 5 or
|
||||
T>=100000 and 4 or
|
||||
T>=60000 and 3 or
|
||||
T>=30000 and 2 or
|
||||
T>=10000 and 1
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user