同步头像和提示可以出牌修改

master
罗家炜 2025-04-30 10:53:04 +08:00
parent 391d43becf
commit 910d7508ec
4 changed files with 25 additions and 7 deletions

View File

@ -1,6 +1,7 @@
local CardCheck = {
cardList = {},
cardListSord = {},
cardNum = 0,
cardSize = 0,
long = false,
@ -27,6 +28,8 @@ function M:initFlag()
end
function M:initCards(cardList, flag)
print("lingmenginitCards")
pt(cardList)
local temp_long = 0
self:Clear()
if flag then
@ -37,6 +40,7 @@ function M:initCards(cardList, flag)
else
self.cardList[number] = 1
self.cardSize = self.cardSize + 1
table.insert(self.cardListSord, number)
end
self.cardNum = self.cardNum + 1
if i == 1 then
@ -55,6 +59,7 @@ function M:initCards(cardList, flag)
else
self.cardList[number] = 1
self.cardSize = self.cardSize + 1
table.insert(self.cardListSord, number)
end
self.cardNum = self.cardNum + 1
if i == 1 then
@ -69,7 +74,7 @@ function M:initCards(cardList, flag)
print(self.cardNum, self.cardSize, temp_long)
pt(self.cardList)
self.long = temp_long == self.cardNum
self.long = temp_long == self.cardNum and self.cardNum >= 5
end
function M:CheckCards()
@ -109,7 +114,9 @@ function M:CheckDuiZi()
end
if self.cardNum % 2 == 0 then
local last_k
for k, v in pairs(self.cardList) do
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v == 2 then
if not last_k then
last_k = k
@ -117,6 +124,7 @@ function M:CheckDuiZi()
if math.abs(last_k - k) ~= 1 then
return
end
last_k = k
end
else
return
@ -147,7 +155,9 @@ function M:CheckSanDai()
if temp_normol_feiji then
local last_k
local num_san = 0
for k, v in pairs(self.cardList) do
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v >= 3 then
num_san = num_san + 1
if not last_k then
@ -156,10 +166,11 @@ function M:CheckSanDai()
if math.abs(last_k - k) ~= 1 then
return
end
last_k = k
end
end
end
if num_san == temp_normol_feiji then
if num_san >= temp_normol_feiji then
return true
else
return
@ -169,7 +180,9 @@ function M:CheckSanDai()
print("liengmengCheckSanDai", self.planeNoBelt, self.cardNum)
if self.planeNoBelt and self.cardNum % 3 == 0 then
local last_k
for k, v in pairs(self.cardList) do
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v == 3 then
print("liengmengCheckSanDai2")
if not last_k then
@ -179,6 +192,7 @@ function M:CheckSanDai()
if math.abs(last_k - k) ~= 1 then
return
end
last_k = k
end
else
return
@ -217,7 +231,9 @@ function M:CheckZha()
if self.fourDaiThree and self.cardNum == 7 then
local flag_four
for k, v in pairs(self.cardList) do
for i = 1, self.cardSize do
local k = self.cardListSord[i]
local v = self.cardList[k]
if v == 4 then
return true
end
@ -228,6 +244,7 @@ end
function M:Clear()
self.cardList = {}
self.cardListSord = {}
self.cardNum = 0
self.cardSize = 0
self.long = false

View File

@ -171,7 +171,7 @@ function M:InitView(url)
self:EventInit()
self._view:GetChild("bg_mask").onClick:Set(function()
self:ResetPoker()
-- self:ResetPoker()
end)
local btn_rule = self._view:GetChild("right_panel"):GetChild("btn_log")
self._view:GetChild('info_text'):GetChild('text').text = room.room_config:GetDes()

View File

@ -1074,6 +1074,7 @@ function M:BtnEvent()
function()
--printlog("wwwwwwwwwww111111111111111111111111")
--pt(self.tips_card_list)
self._ctr_canSendCard.selectedIndex = 1
if self.tips_card_list ~= nil and #self.tips_card_list ~= 0 then
local index = self.tips_click_count % #self.tips_card_list + 1
self:ShowTipsCard(index)