From 765fbaf24709d40d638208c0f051a29a338f0539 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 23 Jan 2021 12:35:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dpc=E8=AE=AD=E7=BB=83=E7=9A=84?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E5=88=A4=E5=AE=9Abug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/modes/pctrain_l.lua | 14 ++++++-------- parts/modes/pctrain_n.lua | 12 +++++------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/parts/modes/pctrain_l.lua b/parts/modes/pctrain_l.lua index 50c538db..8bab1111 100644 --- a/parts/modes/pctrain_l.lua +++ b/parts/modes/pctrain_l.lua @@ -17,14 +17,12 @@ local function task_PC(P) end end local function check(P) - local r=P.field - if r[1]then - r=r[#r] - local c=0 - for i=1,10 do if r[i]>0 then c=c+1 end end - if c<5 then P:lose()end - end - if #P.field==0 then + local f=P.field + if #f>0 then + if #f+P.stat.row%4>4 then + P:lose() + end + else local type=P.stat.pc<10 and 4 or 5 local L=PClist[type][P:RND(#PClist[1])] local symmetry=P:RND()>.5 diff --git a/parts/modes/pctrain_n.lua b/parts/modes/pctrain_n.lua index 6f3bb624..64d24c6b 100644 --- a/parts/modes/pctrain_n.lua +++ b/parts/modes/pctrain_n.lua @@ -20,13 +20,11 @@ local function task_PC(P) end local function check(P) local r=P.field - if r[1]then - r=r[#r] - local c=0 - for i=1,10 do if r[i]>0 then c=c+1 end end - if c<5 then P:lose()end - end - if #P.field==0 then + if #r>0 then + if #r+P.stat.row%4>4 then + P:lose() + end + else local type=PCtype[P.stat.pc+1]or 3 local L=PClist[type][P:RND(#PClist[1])] local symmetry=P:RND()>.5