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