diff --git a/parts/eventsets/bigbang.lua b/parts/eventsets/bigbang.lua new file mode 100644 index 00000000..e706d051 --- /dev/null +++ b/parts/eventsets/bigbang.lua @@ -0,0 +1,41 @@ +local function task_newBoard(P) + local F,L={},{} + --TODO + P:pushNextList(L) + + P.control=false + if P.frameRun>180 then for _=1,26 do YIELD()end end + P.control=true + + P:pushLineList(F) +end +local function _check(P) + if #P.field>0 then + P.gameEnv.heightLimit=P.gameEnv.heightLimit-P.lastPiece.row + if #P.field+P.stat.row%4>4 then + P:lose() + end + else + if P.stat.pc>=100 then + P:win('finish') + else + P:newTask(task_newBoard) + if P.frameRun<180 then P.fieldBeneath=0 end + end + end +end +return{ + pushSpeed=5, + mesDisp=function(P) + setFont(60) + mStr(P.stat.pc,63,340) + mText(TEXTOBJ.pc,63,410) + end, + hook_drop=_check, + -- task=_check,--Just run one time at first to start first level + task=function(P) + P:switchKey(6,false) + YIELD() + P:lose() + end, +} diff --git a/parts/modes/bigbang.lua b/parts/modes/bigbang.lua index afd31747..c1df20c5 100644 --- a/parts/modes/bigbang.lua +++ b/parts/modes/bigbang.lua @@ -1,18 +1,23 @@ return{ env={ - drop=1e99,lock=1e99, + das=8,arr=1, + drop=30,lock=30, holdCount=0, - task=function(P) - while not P.control do YIELD()end - P:pressKey(6) - P:lose() - end, - bg='bg1',bgm='new era', + eventSet='bigbang', + bg='blockhole',bgm='peak', }, - score=function(P)return{P.modeData.event,P.stat.finesseRate*.2/P.stat.piece}end, - scoreDisp=function(D)return("%d Stage %.2f%%"):format(D[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() - return 1 + score=function(P)return{P.stat.pc,P.stat.time}end, + scoreDisp=function(D)return D[1].." Stage "..STRING.time(D[2])end, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=100 and 5 or + L>=70 and 4 or + L>=40 and 3 or + L>=20 and 2 or + L>=10 and 1 or + L>=3 and 0 end, }