diff --git a/parts/modes/tech_hard.lua b/parts/modes/tech_hard.lua index ebbfccaa..efe21a1e 100644 --- a/parts/modes/tech_hard.lua +++ b/parts/modes/tech_hard.lua @@ -1,19 +1,14 @@ 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, + b2bKill=true, + target=200, + dropPiece=PLY.check_attackReach, bg="matrix",bgm="down", }, load=function() diff --git a/parts/modes/tech_lunatic.lua b/parts/modes/tech_lunatic.lua index 38ab16fb..800c8853 100644 --- a/parts/modes/tech_lunatic.lua +++ b/parts/modes/tech_lunatic.lua @@ -1,19 +1,14 @@ 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, + b2bKill=true, + target=200, + dropPiece=PLY.check_attackReach, bg="matrix",bgm="down", }, load=function() diff --git a/parts/modes/tech_normal.lua b/parts/modes/tech_normal.lua index 0f1a4bcc..4529c2ee 100644 --- a/parts/modes/tech_normal.lua +++ b/parts/modes/tech_normal.lua @@ -1,19 +1,14 @@ 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={ infHold=true, drop=1e99,lock=1e99, - dropPiece=tech_check_easy, + b2bKill=true, + target=200, + dropPiece=PLY.check_attackReach, bg="matrix",bgm="new era", }, load=function() diff --git a/parts/player/gameEnv0.lua b/parts/player/gameEnv0.lua index c9bf5fac..6ce563a3 100644 --- a/parts/player/gameEnv0.lua +++ b/parts/player/gameEnv0.lua @@ -45,6 +45,7 @@ return{ Fkey=NULL, keyCancel={}, fine=false,fineKill=false, + b2bKill=false, missionKill=false, target=1e99,dropPiece=NULL, mindas=0,minarr=0,minsdarr=0, diff --git a/parts/player/player.lua b/parts/player/player.lua index da483806..4e9f1b09 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -778,6 +778,7 @@ do--Player.drop(P)--Place piece local STAT=P.stat local piece=P.lastPiece + local lose local cmb=P.combo local CB,CX,CY=P.cur,P.curX,P.curY local clear--If clear with no line fall @@ -951,7 +952,7 @@ do--Player.drop(P)--Place piece if finePts<5 then STAT.extraPiece=STAT.extraPiece+1 if ENV.fineKill then - P:lose() + lose=true end if P.sound then if ENV.fineKill then @@ -1090,6 +1091,9 @@ do--Player.drop(P)--Place piece --Normal clear, reduce B2B point if not piece.special then P.b2b=max(P.b2b-250,0) + if ENV.b2bKill then + lose=true + end P:showText(text.clear[cc],0,-30,35,"appear",(8-cc)*.3) atk=cc-.5 sendTime=20+atk*20 @@ -1244,7 +1248,7 @@ do--Player.drop(P)--Place piece elseif ENV.missionKill then P:showText(text.missionFailed,0,140,40,"flicker",.5) SFX.play("finesseError_long",.6) - P:lose(true) + lose=true end end @@ -1276,9 +1280,13 @@ do--Player.drop(P)--Place piece _=STAT.clears _[cc]=_[cc]+1--Clear[1~5] end - --Drop event - _=ENV.dropPiece - if _ then _(P)end + if lose then + P:lose() + else + --Drop event + _=ENV.dropPiece + if _ then _(P)end + end end end function Player.loadAI(P,data)--Load AI params diff --git a/parts/scenes/custom_advance.lua b/parts/scenes/custom_advance.lua index 94289073..bc8478c0 100644 --- a/parts/scenes/custom_advance.lua +++ b/parts/scenes/custom_advance.lua @@ -3,9 +3,9 @@ WIDGET.init("custom_advance",{ WIDGET.newText({name="subTitle", x=530,y=50,font=35,align="L",color="grey"}), --Visual - WIDGET.newSwitch({name="block", x=600, y=600, font=25, disp=WIDGET.lnk_CUSval("block"), code=WIDGET.lnk_CUSrev("block")}), - WIDGET.newSlider({name="ghost", x=480, y=450,w=200,unit=.6,font=25, disp=WIDGET.lnk_CUSval("ghost"), code=WIDGET.lnk_CUSsto("ghost")}), - WIDGET.newSlider({name="center", x=480, y=520,w=200,unit=1, font=25, disp=WIDGET.lnk_CUSval("center"), code=WIDGET.lnk_CUSsto("center")}), + WIDGET.newSwitch({name="block", x=620, y=600, font=25, disp=WIDGET.lnk_CUSval("block"), code=WIDGET.lnk_CUSrev("block")}), + WIDGET.newSlider({name="ghost", x=500, y=450,w=200,unit=.6,font=25, disp=WIDGET.lnk_CUSval("ghost"), code=WIDGET.lnk_CUSsto("ghost")}), + WIDGET.newSlider({name="center", x=500, y=520,w=200,unit=1, font=25, disp=WIDGET.lnk_CUSval("center"), code=WIDGET.lnk_CUSsto("center")}), WIDGET.newSwitch({name="bagLine", x=1190, y=340, disp=WIDGET.lnk_CUSval("bagLine"), code=WIDGET.lnk_CUSrev("bagLine")}), WIDGET.newSwitch({name="highCam", x=1190, y=410, disp=WIDGET.lnk_CUSval("highCam"), code=WIDGET.lnk_CUSrev("highCam")}), @@ -25,7 +25,8 @@ WIDGET.init("custom_advance",{ WIDGET.newSwitch({name="ospin", x=910, y=340, font=30, disp=WIDGET.lnk_CUSval("ospin"), code=WIDGET.lnk_CUSrev("ospin")}), WIDGET.newSwitch({name="noTele", x=910, y=410, font=25, disp=WIDGET.lnk_CUSval("noTele"), code=WIDGET.lnk_CUSrev("noTele")}), WIDGET.newSwitch({name="fineKill", x=910, y=480, font=20, disp=WIDGET.lnk_CUSval("fineKill"), code=WIDGET.lnk_CUSrev("fineKill")}), - WIDGET.newSwitch({name="easyFresh", x=910, y=550, font=20, disp=WIDGET.lnk_CUSval("easyFresh"),code=WIDGET.lnk_CUSrev("easyFresh")}), + WIDGET.newSwitch({name="b2bKill", x=910, y=550, font=20, disp=WIDGET.lnk_CUSval("b2bKill"), code=WIDGET.lnk_CUSrev("b2bKill")}), + WIDGET.newSwitch({name="easyFresh", x=910, y=620, font=20, disp=WIDGET.lnk_CUSval("easyFresh"),code=WIDGET.lnk_CUSrev("easyFresh")}), WIDGET.newSelector({name="RS", x=410, y=370, w=260,color="sea", list={"TRS","SRS","C2","C2sym","Classic","None"},disp=WIDGET.lnk_CUSval("RS"),code=WIDGET.lnk_CUSsto("RS")}), WIDGET.newSelector({name="visible", x=840, y=60, w=260,color="lBlue",list={"show","time","fast","none"}, disp=WIDGET.lnk_CUSval("visible"), code=WIDGET.lnk_CUSsto("visible")}),