From 9606cb2dc97943240b4015823d378bd565d2bd67 Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Sun, 17 Jul 2022 23:58:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=A0=86=E5=8F=A0=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E8=B6=85=E9=A2=9D=E6=B6=88=E9=99=A4=E5=A5=96=E5=8A=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/eventsets/stack_e.lua | 19 +++++++++++-------- parts/eventsets/stack_u.lua | 21 ++++++++++++--------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/parts/eventsets/stack_e.lua b/parts/eventsets/stack_e.lua index e35ca2ed..98e599c8 100644 --- a/parts/eventsets/stack_e.lua +++ b/parts/eventsets/stack_e.lua @@ -10,17 +10,20 @@ return{ hook_die=function(P) local cc=P:clearFilledLines(P.garbageBeneath+1,#P.field-P.garbageBeneath) if cc>0 then - local h=20-cc-P.garbageBeneath - if h<-1 and P.garbageBeneath>0 then - for i=1,math.min(P.garbageBeneath,-h-1) do - LINE.discard(table.remove(P.field,1)) - LINE.discard(table.remove(P.visTime,1)) - end - elseif h>0 then - P:garbageRise(21,h,2e10-1) + local clearH=cc+P.garbageBeneath + if clearH<20 then + P:garbageRise(21,20-clearH,2e10-1) if P.garbageBeneath>=20 then P:lose() end + elseif P.garbageBeneath>0 and clearH>20 then + local bonus=math.min(P.garbageBeneath,clearH-20) + if bonus>0 then + for _=1,bonus do + LINE.discard(table.remove(P.field,1)) + LINE.discard(table.remove(P.visTime,1)) + end + end end end end, diff --git a/parts/eventsets/stack_u.lua b/parts/eventsets/stack_u.lua index 32c59e4c..c2504fcf 100644 --- a/parts/eventsets/stack_u.lua +++ b/parts/eventsets/stack_u.lua @@ -10,17 +10,20 @@ return{ hook_die=function(P) local cc=P:clearFilledLines(P.garbageBeneath+1,#P.field-P.garbageBeneath) if cc>0 then - local h=20-cc-P.garbageBeneath-3 - if h<-1 and P.garbageBeneath>0 then - for i=1,math.min(P.garbageBeneath,-h-1) do - LINE.discard(table.remove(P.field,1)) - LINE.discard(table.remove(P.visTime,1)) - end - elseif h>0 then - P:garbageRise(21,h,2e10-1) - if P.garbageBeneath>=20 then + local clearH=cc+P.garbageBeneath + if clearH<17 then + P:garbageRise(21,17-clearH,2e10-1) + if P.garbageBeneath>=17 then P:lose() end + elseif P.garbageBeneath>0 and clearH>17 then + local bonus=math.min(P.garbageBeneath,clearH-17) + if bonus>0 then + for _=1,bonus do + LINE.discard(table.remove(P.field,1)) + LINE.discard(table.remove(P.visTime,1)) + end + end end end end,