From aa2812c874a34f9dbda1459359a5053740cf7cf6 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 17 Nov 2021 16:24:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E7=88=86=E7=82=B8=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E6=A1=86=E6=9E=B6=E5=AE=8C=E6=88=90=EF=BC=8C=E7=AD=89=E5=BE=85?= =?UTF-8?q?=E5=85=B7=E4=BD=93=E5=85=B3=E5=8D=A1=E7=94=9F=E6=88=90=E7=AE=97?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/eventsets/bigbang.lua | 41 +++++++++++++++++++++++++++++++++++++ parts/modes/bigbang.lua | 29 +++++++++++++++----------- 2 files changed, 58 insertions(+), 12 deletions(-) create mode 100644 parts/eventsets/bigbang.lua 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, }