From 0e08632bf90477fa5c29c3851e413b29316f1179 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 14 Nov 2020 21:47:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dc4w=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=88=86=E7=82=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modes/c4wtrain_lunatic.lua | 20 ++++++++++---------- modes/c4wtrain_normal.lua | 18 +++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/modes/c4wtrain_lunatic.lua b/modes/c4wtrain_lunatic.lua index b23b18df..29d7a442 100644 --- a/modes/c4wtrain_lunatic.lua +++ b/modes/c4wtrain_lunatic.lua @@ -1,10 +1,10 @@ local min=math.min local function check_c4w(P) - if #P.clearedRow==0 then + if P.lastPiece.row==0 then P:lose() else - for _=1,#P.clearedRow do - P.field[#P.field+1]=FREEROW.get(13) + for _=1,P.lastPiece.row do + P.field[#P.field+1]=FREEROW.get(20) P.visTime[#P.visTime+1]=FREEROW.get(20) for i=4,7 do P.field[#P.field][i]=0 end end @@ -31,17 +31,17 @@ return{ local P=PLAYERS[1] local F=P.field for i=1,24 do - F[i]=FREEROW.get(13) + F[i]=FREEROW.get(20) P.visTime[i]=FREEROW.get(20) for x=4,7 do F[i][x]=0 end end local r=P:RND(6) - if r==1 then F[1][5],F[1][4],F[2][4]=13,13,13 - elseif r==2 then F[1][6],F[1][7],F[2][7]=13,13,13 - elseif r==3 then F[1][4],F[2][4],F[2][5]=13,13,13 - elseif r==4 then F[1][7],F[2][7],F[2][6]=13,13,13 - elseif r==5 then F[1][4],F[1][5],F[1][6]=13,13,13 - elseif r==6 then F[1][7],F[1][6],F[1][5]=13,13,13 + if r==1 then F[1][5],F[1][4],F[2][4]=20,20,20 + elseif r==2 then F[1][6],F[1][7],F[2][7]=20,20,20 + elseif r==3 then F[1][4],F[2][4],F[2][5]=20,20,20 + elseif r==4 then F[1][7],F[2][7],F[2][6]=20,20,20 + elseif r==5 then F[1][4],F[1][5],F[1][6]=20,20,20 + elseif r==6 then F[1][7],F[1][6],F[1][5]=20,20,20 end end, mesDisp=function(P) diff --git a/modes/c4wtrain_normal.lua b/modes/c4wtrain_normal.lua index ac480011..24103844 100644 --- a/modes/c4wtrain_normal.lua +++ b/modes/c4wtrain_normal.lua @@ -1,8 +1,8 @@ local min=math.min local function check_c4w(P) - if #P.lastPiece.row>0 then + if P.lastPiece.row>0 then for _=1,#P.clearedRow do - P.field[#P.field+1]=FREEROW.get(13) + P.field[#P.field+1]=FREEROW.get(20) P.visTime[#P.visTime+1]=FREEROW.get(20) for i=4,7 do P.field[#P.field][i]=0 end end @@ -29,17 +29,17 @@ return{ local P=PLAYERS[1] local F=P.field for i=1,24 do - F[i]=FREEROW.get(13) + F[i]=FREEROW.get(20) P.visTime[i]=FREEROW.get(20) for x=4,7 do F[i][x]=0 end end local r=P:RND(6) - if r==1 then F[1][5],F[1][4],F[2][4]=13,13,13 - elseif r==2 then F[1][6],F[1][7],F[2][7]=13,13,13 - elseif r==3 then F[1][4],F[2][4],F[2][5]=13,13,13 - elseif r==4 then F[1][7],F[2][7],F[2][6]=13,13,13 - elseif r==5 then F[1][4],F[1][5],F[1][6]=13,13,13 - elseif r==6 then F[1][7],F[1][6],F[1][5]=13,13,13 + if r==1 then F[1][5],F[1][4],F[2][4]=20,20,20 + elseif r==2 then F[1][6],F[1][7],F[2][7]=20,20,20 + elseif r==3 then F[1][4],F[2][4],F[2][5]=20,20,20 + elseif r==4 then F[1][7],F[2][7],F[2][6]=20,20,20 + elseif r==5 then F[1][4],F[1][5],F[1][6]=20,20,20 + elseif r==6 then F[1][7],F[1][6],F[1][5]=20,20,20 end end, mesDisp=function(P)