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,