From 4ccee0f1de5dccc7620658ca00110804d292e4cb Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 30 Nov 2021 22:31:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B0=8F=E7=A8=8B=E5=BA=8Ftr?= =?UTF-8?q?p=E7=9A=84next=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_triple.lua | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/parts/scenes/app_triple.lua b/parts/scenes/app_triple.lua index 3c9dcfaa..638873d5 100644 --- a/parts/scenes/app_triple.lua +++ b/parts/scenes/app_triple.lua @@ -45,24 +45,27 @@ local tileTexts=setmetatable({ local player={x=340,y=90} function player:newTile() - if rnd()<.026 then + local r=rnd() + if r<.006 then + return self.maxTile + elseif r<.026 then return -2 else - local r=1 + local t=1 if rnd()<.3 then - r=r+1 - if rnd()<.3 then r=r+1 end + t=t+1 + if rnd()<.3 then t=t+1 end end if self.maxTile>=4 and rnd()<.3 then - r=r+1 + t=t+1 if self.maxTile>=6 and rnd()<.3 then - r=r+1 + t=t+1 if self.maxTile>=8 and rnd()<.3 then - r=r+1 + t=t+1 end end end - return r + return t end end