add fangpaofa
parent
d59550da73
commit
75cb16a135
|
|
@ -651,20 +651,30 @@ function M:__FangziTip(tip, _uid,fptype)
|
||||||
local tip_fanpao = false
|
local tip_fanpao = false
|
||||||
local tip_id = 0;
|
local tip_id = 0;
|
||||||
local count = #_tlist
|
local count = #_tlist
|
||||||
|
local zdhu = false
|
||||||
|
local fpao = true
|
||||||
for k = 1, #_tlist do
|
for k = 1, #_tlist do
|
||||||
local td = tip.tip_map_type[_tlist[k]][1]
|
local td = tip.tip_map_type[_tlist[k]][1]
|
||||||
if td.type == 8 then
|
if td.type == 8 then
|
||||||
tip_hu = true
|
tip_hu = true
|
||||||
tip_id = td.id
|
tip_id = td.id
|
||||||
--自动放炮
|
--自动放炮
|
||||||
--[[ if td.weight==7 then
|
if td.weight==7 then
|
||||||
|
zdhu = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if td.type == 6 and td.weight == 8 then
|
||||||
|
fpao = false
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
if fpao and zdhu then
|
||||||
_gamectr:SendAction(tip_id)
|
_gamectr:SendAction(tip_id)
|
||||||
_chipeng_tip:Dispose()
|
_chipeng_tip:Dispose()
|
||||||
self._chipeng_tip = nil
|
self._chipeng_tip = nil
|
||||||
return
|
return
|
||||||
end]]
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
for k = 1, #_tlist do
|
for k = 1, #_tlist do
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,9 @@ local function checkCard(eventCard, cardList, num)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local function cardType(card)
|
|
||||||
return card/100
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- 移除指定数量的牌
|
-- 移除指定数量的牌
|
||||||
local function removeCard(cardList, card, count)
|
local function removeCard(cardList, card, count)
|
||||||
for i = 1, count do
|
for i = 1, count do
|
||||||
|
|
@ -70,43 +64,23 @@ function M:rollBack()
|
||||||
end
|
end
|
||||||
table.sort(self.cardList)
|
table.sort(self.cardList)
|
||||||
end
|
end
|
||||||
|
-- 顺子
|
||||||
--坎
|
|
||||||
function M:tryKezi(card, player)
|
|
||||||
if cardNum(card, self.cardList)>=3 then
|
|
||||||
|
|
||||||
removeCard(self.cardList, card, 3)
|
|
||||||
local cardGroup = {card, card, card}
|
|
||||||
self:push(cardGroup)
|
|
||||||
local _huxi = 1
|
|
||||||
if self.drawCard~=card then
|
|
||||||
_huxi = 3
|
|
||||||
end
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
--顺子1
|
|
||||||
function M:tryShunzi1(card, player)
|
function M:tryShunzi1(card, player)
|
||||||
if card < 200 and card % 100 > 8 then
|
if card < 300 and card % 100 > 8 then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if (cardNum(card + 1, self.cardList)> 0 and cardNum(card + 2, self.cardList) > 0 ) then
|
if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then
|
||||||
removeCard(self.cardList, card, 1)
|
|
||||||
removeCard(self.cardList, card + 1, 1)
|
removeCard(self.cardList, card + 1, 1)
|
||||||
removeCard(self.cardList, card + 2, 1)
|
removeCard(self.cardList, card + 2, 1)
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
local cardGroup = {card, card + 1, card + 2}
|
local cardGroup = {card, card + 1, card + 2}
|
||||||
self:push(cardGroup)
|
self:push(cardGroup)
|
||||||
local _huxi = 0
|
local _huxi = 0
|
||||||
if card%100==1 then
|
if card == 101 then
|
||||||
if card>200 then
|
|
||||||
_huxi = 6
|
|
||||||
else
|
|
||||||
_huxi = 3
|
_huxi = 3
|
||||||
end
|
end
|
||||||
|
if card == 201 then
|
||||||
|
_huxi = 6
|
||||||
end
|
end
|
||||||
self:pushhuxi(_huxi)
|
self:pushhuxi(_huxi)
|
||||||
return true
|
return true
|
||||||
|
|
@ -114,151 +88,127 @@ function M:tryShunzi1(card, player)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
--顺子2
|
-- 大大小 小小大
|
||||||
function M:tryShunzi2(card, player)
|
function M:tryShunzi2(card)
|
||||||
|
if card - card % 100 == 100 then
|
||||||
if cardType(card) == 1 then
|
if checkCard(card + 100, self.cardList, 1) and checkCard(card, self.cardList, 2) then
|
||||||
if cardNum(card+100,self.cardList) >= 1 and cardNum(card,self.cardList)>=2 then
|
|
||||||
removeCard(self.cardList, card, 2)
|
removeCard(self.cardList, card, 2)
|
||||||
removeCard(self.cardList, card + 100, 1)
|
removeCard(self.cardList, card + 100, 1)
|
||||||
local cardGroup = {card, card, card + 100}
|
local cardGroup = {card, card, card + 100}
|
||||||
self:push(cardGroup)
|
self:push(cardGroup)
|
||||||
local _huxi = 0
|
self:pushhuxi(0)
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
if (checkCard(card + 100, self.cardList, 2)) and (checkCard(card, self.cardList, 1)) then
|
||||||
if cardNum(card+100,self.cardList)>=2 then
|
|
||||||
removeCard(self.cardList, card, 1)
|
removeCard(self.cardList, card, 1)
|
||||||
removeCard(self.cardList, card + 100, 2)
|
removeCard(self.cardList, card + 100, 2)
|
||||||
local cardGroup = {card, card + 100, card + 100}
|
local cardGroup = {card, card + 100, card + 100}
|
||||||
self:push(cardGroup)
|
self:push(cardGroup)
|
||||||
local _huxi = 0
|
self:pushhuxi(0)
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
if (checkCard(card - 100, self.cardList, 1)) and checkCard(card, self.cardList, 2) then
|
||||||
if cardNum(card-100,self.cardList) >= 1 and cardNum(card,self.cardList)>=2 then
|
|
||||||
removeCard(self.cardList, card, 2)
|
removeCard(self.cardList, card, 2)
|
||||||
removeCard(self.cardList, card - 100, 1)
|
removeCard(self.cardList, card - 100, 1)
|
||||||
local cardGroup = {card, card, card-100}
|
local cardGroup = {card - 100, card, card}
|
||||||
self:push(cardGroup)
|
self:push(cardGroup)
|
||||||
local _huxi = 0
|
self:pushhuxi(0)
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
if (checkCard(card - 100, self.cardList, 2)) and checkCard(card, self.cardList, 1) then
|
||||||
if cardNum(card-100,self.cardList)>=2 then
|
|
||||||
removeCard(self.cardList, card, 1)
|
removeCard(self.cardList, card, 1)
|
||||||
removeCard(self.cardList, card - 100, 2)
|
removeCard(self.cardList, card - 100, 2)
|
||||||
local cardGroup = {card, card - 100, card - 100}
|
local cardGroup = {card, card - 100, card - 100}
|
||||||
self:push(cardGroup)
|
self:push(cardGroup)
|
||||||
local _huxi = 0
|
self:pushhuxi(0)
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
--print(card)
|
||||||
return false
|
return false
|
||||||
|
-- body
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 2 7 10
|
||||||
function M:tryShunzi3(card, player)
|
function M:tryShunzi3(card, player)
|
||||||
if card % 100 == 2 then
|
if card % 100 == 2 then
|
||||||
if cardNum(card + 5, self.cardList)>0 and cardNum(card + 8, self.cardList)>0 then
|
if (checkCard(card + 5, self.cardList, 1)) and (checkCard(card + 8, self.cardList, 1)) then
|
||||||
removeCard(self.cardList, card, 1)
|
removeCard(self.cardList, card, 1)
|
||||||
removeCard(self.cardList, card + 5, 1)
|
removeCard(self.cardList, card + 5, 1)
|
||||||
removeCard(self.cardList, card + 8, 1)
|
removeCard(self.cardList, card + 8, 1)
|
||||||
local cardGroup = {card, card + 5, card + 8}
|
local cardGroup = {card, card + 5, card + 8}
|
||||||
self:push(cardGroup)
|
self:push(cardGroup)
|
||||||
local _huxi = 1
|
local _huxi = 0
|
||||||
|
if card == 102 then
|
||||||
|
_huxi = 3
|
||||||
|
elseif card == 202 then
|
||||||
|
_huxi = 6
|
||||||
|
end
|
||||||
self:pushhuxi(_huxi)
|
self:pushhuxi(_huxi)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
-- 坎
|
||||||
function M:tryHuazi(card)
|
function M:tryKezi(card, player)
|
||||||
|
if (checkCard(card, self.cardList, 3)) then
|
||||||
|
removeCard(self.cardList, card, 3)
|
||||||
|
local cardGroup = {card, card, card}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 0
|
||||||
|
if card < 200 then
|
||||||
|
_huxi = 1
|
||||||
|
else
|
||||||
|
_huxi = 3
|
||||||
|
end
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
-- print(card)
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:tryPair(card)
|
function M:tryPair(card)
|
||||||
|
|
||||||
if (self.pair_count > 0) then
|
if (self.pair_count > 0) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
if (checkCard(card, self.cardList, 2)) then
|
||||||
if cardNum(card, self.cardList)>=2 then
|
|
||||||
removeCard(self.cardList, card, 2)
|
removeCard(self.cardList, card, 2)
|
||||||
local cardGroup = {card, card , card}
|
local cardGroup = {card, card}
|
||||||
self:push(cardGroup)
|
self:push(cardGroup)
|
||||||
self.pair_count = 1;
|
self.pair_count = 1
|
||||||
local _huxi = 0
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
-- print(card)
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
function M:tryWin(player)
|
|
||||||
--[[ if #self.cardList == 0 then
|
|
||||||
if (self.pair_count == 1) then
|
|
||||||
return true
|
|
||||||
elseif #self.stack>=2 then
|
|
||||||
local tempPList={}
|
|
||||||
for i=1,#self.stack do
|
|
||||||
local card1=self.stack[i][1]
|
|
||||||
local card2=self.stack[i][2]
|
|
||||||
table.insert(tempPList,card1)
|
|
||||||
table.insert(tempPList,card2)
|
|
||||||
end
|
|
||||||
|
|
||||||
if #tempPList~=4 then return false end
|
|
||||||
|
|
||||||
table.sort(tempPList)
|
|
||||||
|
|
||||||
if tempPList[1]==tempPList[2]+1 and tempPList[2]==tempPList[3]+1 and tempPList[3]==tempPList[4]+1 then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
]]
|
|
||||||
|
function M:tryWin(player)
|
||||||
if #self.cardList == 0 then
|
if #self.cardList == 0 then
|
||||||
if (player.tiCount+player.paoCount)>0 then
|
if (player.tiCount + player.paoCount + self.kong_count > 0) then
|
||||||
if self.pair_count ==1 then
|
if (self.pair_count == 1) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
else
|
else
|
||||||
if self.pair_count >0 then
|
if (self.pair_count > 0) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local activeCard = 0
|
local activeCard = 0
|
||||||
|
|
||||||
for i = 1, #self.cardList do
|
for i = 1, #self.cardList do
|
||||||
if (self.cardList[i] == 201 or self.cardList[i] == 202) then
|
if (self.cardList[i] == 201 or self.cardList[i] == 202) then
|
||||||
activeCard = self.cardList[i]
|
activeCard = self.cardList[i]
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (activeCard == 0) then
|
if (activeCard == 0) then
|
||||||
activeCard = self.cardList[1]
|
activeCard = self.cardList[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if (activeCard % 100 == 1) then
|
if (activeCard % 100 == 1) then
|
||||||
if self:tryShunzi1(activeCard, player) then
|
if self:tryShunzi1(activeCard, player) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
|
|
@ -267,7 +217,6 @@ function M:tryWin(player)
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:tryKezi(activeCard, player) then
|
if self:tryKezi(activeCard, player) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
|
|
@ -275,28 +224,23 @@ function M:tryWin(player)
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
if (player.tiCount + player.paoCount + self.kong_count > 0) then
|
||||||
if (player.tiCount + player.paoCount)>0 then
|
|
||||||
if self:tryPair(activeCard) then
|
if self:tryPair(activeCard) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
self.pair_count = 0
|
self.pair_count = 0
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if self:tryShunzi2(activeCard) then
|
||||||
if self:tryShunzi2(activeCard, player) then
|
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif activeCard % 100 == 2 then
|
elseif activeCard % 100 == 2 then
|
||||||
|
|
||||||
if self:tryShunzi3(activeCard, player) then
|
if self:tryShunzi3(activeCard, player) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
|
|
@ -304,7 +248,6 @@ function M:tryWin(player)
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:tryKezi(activeCard, player) then
|
if self:tryKezi(activeCard, player) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
|
|
@ -312,18 +255,15 @@ function M:tryWin(player)
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
if player.tiCount + player.paoCount + self.kong_count > 0 then
|
||||||
if (player.tiCount + player.paoCount)>0 then
|
|
||||||
if self:tryPair(activeCard) then
|
if self:tryPair(activeCard) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
self.pair_count = 0
|
self.pair_count = 0
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:tryShunzi1(activeCard, player) then
|
if self:tryShunzi1(activeCard, player) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
|
|
@ -331,15 +271,13 @@ function M:tryWin(player)
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
if self:tryShunzi2(activeCard) then
|
||||||
if self:tryShunzi2(activeCard, player) then
|
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
if self:tryKezi(activeCard, player) then
|
if self:tryKezi(activeCard, player) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
|
|
@ -348,18 +286,22 @@ function M:tryWin(player)
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
if player.tiCount + player.paoCount + self.kong_count > 0 then
|
||||||
if (player.tiCount + player.paoCount)>0 then
|
|
||||||
if self:tryPair(activeCard) then
|
if self:tryPair(activeCard) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
self.pair_count = 0
|
self.pair_count = 0
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if self:tryShunzi2(activeCard) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if self:tryShunzi1(activeCard, player) then
|
if self:tryShunzi1(activeCard, player) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
|
|
@ -367,124 +309,101 @@ function M:tryWin(player)
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:tryShunzi2(activeCard, player) then
|
|
||||||
if self:tryWin(player) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
self:rollBack()
|
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function init(self, player, cardInhand, addCard)
|
local function init(self, player, cardInhand, addCard)
|
||||||
self.stack = {}
|
self.stack = {}
|
||||||
self.stackHuxi = {}
|
self.stackHuxi = {}
|
||||||
self.pair_count = 0
|
self.pair_count = 0
|
||||||
self.kong_count = 0
|
self.kong_count = 0
|
||||||
self.drawCard=0
|
|
||||||
self.cardList = membe_clone(cardInhand)
|
self.cardList = membe_clone(cardInhand)
|
||||||
if addCard == nil then
|
if addCard == nil then
|
||||||
self.kong_count = 1
|
self.kong_count = 1
|
||||||
else
|
else
|
||||||
self.kong_count = 0
|
self.kong_count = 0
|
||||||
self.cardList[#self.cardList + 1] = addCard
|
self.cardList[#self.cardList + 1] = addCard
|
||||||
self.drawCard=addCard
|
|
||||||
end
|
end
|
||||||
|
|
||||||
table.sort(self.cardList)
|
table.sort(self.cardList)
|
||||||
|
return self:tryWin(player)
|
||||||
local res = self:tryWin(player)
|
|
||||||
return res
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.tingPai(player, room)
|
function M.tingPai(player, room)
|
||||||
local self = setmetatable({}, {__index = M})
|
local self = setmetatable({}, {__index = M})
|
||||||
local tingList = {}
|
local tingList = {}
|
||||||
local cardInhand = player.handcard_list
|
local cardInhand = player.handcard_list
|
||||||
|
|
||||||
|
|
||||||
if not cardInhand or #cardInhand == 0 then
|
if not cardInhand or #cardInhand == 0 then
|
||||||
return tingList
|
return tingList
|
||||||
end
|
end
|
||||||
local kan_huxi = 0
|
local kan_huxi = 0
|
||||||
local kan_cards = {}
|
local kan_cards = {}
|
||||||
|
|
||||||
if player.tiCount==nil then
|
|
||||||
player.tiCount = 0
|
|
||||||
end
|
|
||||||
if player.paoCount==nil then
|
|
||||||
player.paoCount = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
for j = 1, #player.fz_list do
|
for j = 1, #player.fz_list do
|
||||||
for i = 1, #cardInhand do
|
for i = 1, #cardInhand do
|
||||||
if cardInhand[i] == player.fz_list[j].active_card and player.fz_list[j].type == 3 then
|
if cardInhand[i] == player.fz_list[j].active_card and player.fz_list[j].type == 3 then
|
||||||
kan_cards[#kan_cards + 1] = cardInhand[i]
|
kan_cards[#kan_cards + 1] = cardInhand[i]
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if player.fz_list[j].type==6 then
|
|
||||||
player.paoCount = 1
|
|
||||||
if cardType(player.fz_list[j].active_card) ==2 then
|
|
||||||
kan_huxi = kan_huxi + 9
|
|
||||||
else
|
|
||||||
kan_huxi = kan_huxi + 6
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
if player.fz_list[j].type==7 then
|
|
||||||
player.tiCount = 1
|
|
||||||
if cardType(player.fz_list[j].active_card) ==2 then
|
|
||||||
kan_huxi = kan_huxi + 12
|
|
||||||
else
|
|
||||||
kan_huxi = kan_huxi + 9
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if player.fz_list[j].type==2 then
|
|
||||||
if cardType(player.fz_list[j].active_card) ==2 then
|
|
||||||
kan_huxi = kan_huxi + 3
|
|
||||||
else
|
|
||||||
kan_huxi = kan_huxi + 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if #kan_cards > 0 then
|
if #kan_cards > 0 then
|
||||||
for i = 1, #kan_cards do
|
for i = 1, #kan_cards do
|
||||||
|
if kan_cards[i] > 200 then
|
||||||
if cardType(kan_cards[i])==2 then
|
|
||||||
kan_huxi = kan_huxi + 6
|
kan_huxi = kan_huxi + 6
|
||||||
else
|
else
|
||||||
kan_huxi = kan_huxi + 3
|
kan_huxi = kan_huxi + 3
|
||||||
end
|
end
|
||||||
|
|
||||||
removeCard(cardInhand, kan_cards[i], 3)
|
removeCard(cardInhand, kan_cards[i], 3)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
player.tiCount = 0
|
||||||
|
player.paoCount = 0
|
||||||
|
if #player.fz_list > 0 then
|
||||||
|
for i = 1, #player.fz_list do
|
||||||
|
if player.fz_list[i].type == 6 then
|
||||||
|
player.paoCount = player.paoCount + 1
|
||||||
|
elseif player.fz_list[i].type == 7 then
|
||||||
|
player.tiCount = player.tiCount + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
for k = 100, 200, 100 do
|
for k = 100, 200, 100 do
|
||||||
for i = 1, 10 do
|
for i = 1, 10 do
|
||||||
local tem = k + i
|
local tem = k + i
|
||||||
|
|
||||||
local result = init(self, player, cardInhand, tem)
|
local result = init(self, player, cardInhand, tem)
|
||||||
|
|
||||||
local num = 0
|
local num = 0
|
||||||
for k = 1, #self.stackHuxi do
|
for k = 1, #self.stackHuxi do
|
||||||
num = num + self.stackHuxi[k]
|
num = num + self.stackHuxi[k]
|
||||||
end
|
end
|
||||||
|
if result == false or (player.hu_xi + num + kan_huxi) < (self:getHuxi(room)) then
|
||||||
if result then
|
if #player.fz_list > 0 then
|
||||||
|
for k = 1, #player.fz_list do
|
||||||
|
if tem == player.fz_list[k].active_card then
|
||||||
|
local ctype = player.fz_list[k].type
|
||||||
|
if ctype == 2 or ctype == 3 or ctype == 4 or ctype == 5 then
|
||||||
|
local paohu = init(self, player, cardInhand)
|
||||||
|
if paohu then
|
||||||
|
local num2 = 0
|
||||||
|
for j = 1, #self.stackHuxi do
|
||||||
|
num2 = num2 + self.stackHuxi[j]
|
||||||
|
end
|
||||||
|
if
|
||||||
|
(num2 + player.hu_xi + kan_huxi + self:GetFzData(tem, ctype)) >=
|
||||||
|
(self:getHuxi(room))
|
||||||
|
then
|
||||||
|
tingList[#tingList + 1] = tem
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
local num1 = 0
|
local num1 = 0
|
||||||
for k = 1, #self.stackHuxi do
|
for k = 1, #self.stackHuxi do
|
||||||
num1 = num1 + self.stackHuxi[k]
|
num1 = num1 + self.stackHuxi[k]
|
||||||
end
|
end
|
||||||
if (player.hu_xi + num1 + kan_huxi) >= (self:getHuxi(room)-1) then
|
if (player.hu_xi + num1 + kan_huxi) >= (self:getHuxi(room)) then
|
||||||
tingList[#tingList + 1] = tem
|
tingList[#tingList + 1] = tem
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -497,11 +416,12 @@ function M:getHuxi(room)
|
||||||
if room.game_id == 301 then
|
if room.game_id == 301 then
|
||||||
return 8
|
return 8
|
||||||
end
|
end
|
||||||
|
if room.game_id == 15 then
|
||||||
if room.room_config.config.hunum==0 then
|
return 15
|
||||||
|
end
|
||||||
|
if room.game_id == 17 then
|
||||||
return 15
|
return 15
|
||||||
end
|
end
|
||||||
|
|
||||||
if room.game_id == 13 or room.game_id == 14 or room.game_id == 23 then
|
if room.game_id == 13 or room.game_id == 14 or room.game_id == 23 then
|
||||||
return 15
|
return 15
|
||||||
elseif room.game_id == 26 then
|
elseif room.game_id == 26 then
|
||||||
|
|
@ -517,19 +437,18 @@ end
|
||||||
|
|
||||||
function M:GetFzData(tem, ctype)
|
function M:GetFzData(tem, ctype)
|
||||||
local huxi
|
local huxi
|
||||||
|
if ctype == 2 then
|
||||||
if ctype == 1 then
|
if tem > 200 then
|
||||||
huxi=1
|
huxi = 6
|
||||||
elseif ctype == 2 then
|
else
|
||||||
huxi=1
|
huxi = 5
|
||||||
|
end
|
||||||
elseif ctype == 3 then
|
elseif ctype == 3 then
|
||||||
huxi = 3
|
huxi = 3
|
||||||
elseif ctype == 4 then
|
elseif ctype == 4 then
|
||||||
huxi = 3
|
huxi = 3
|
||||||
elseif ctype == 5 then
|
elseif ctype == 5 then
|
||||||
huxi = 3
|
huxi = 3
|
||||||
elseif ctype == 7 then
|
|
||||||
huxi = 5
|
|
||||||
end
|
end
|
||||||
return huxi
|
return huxi
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,15 @@ local function checkCard(eventCard, cardList, num)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function cardType(card)
|
||||||
|
if card>200 then
|
||||||
|
return 2
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- 移除指定数量的牌
|
-- 移除指定数量的牌
|
||||||
local function removeCard(cardList, card, count)
|
local function removeCard(cardList, card, count)
|
||||||
for i = 1, count do
|
for i = 1, count do
|
||||||
|
|
@ -45,9 +54,11 @@ end
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
pair_count = 0,
|
pair_count = 0,
|
||||||
|
pairflag = 0,
|
||||||
cardList = nil,
|
cardList = nil,
|
||||||
stack = nil,
|
stack = nil,
|
||||||
stackHuxi = nil
|
stackHuxi = nil,
|
||||||
|
handCardList = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
function M:push(cardGroup)
|
function M:push(cardGroup)
|
||||||
|
|
@ -65,224 +76,130 @@ function M:rollBack()
|
||||||
end
|
end
|
||||||
table.sort(self.cardList)
|
table.sort(self.cardList)
|
||||||
end
|
end
|
||||||
-- 顺子
|
|
||||||
function M:tryShunzi1(card, player)
|
--坎
|
||||||
printlog("tryShunzi1")
|
function M:tryKezi(card, player)
|
||||||
if card < 300 and card % 100 > 8 then
|
if cardNum(card, self.cardList)>=3 then
|
||||||
return false
|
removeCard(self.cardList, card, cardNum(card, self.cardList))
|
||||||
end
|
local cardGroup = {card, card, card}
|
||||||
if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then
|
|
||||||
removeCard(self.cardList, card + 1, 1)
|
|
||||||
removeCard(self.cardList, card + 2, 1)
|
|
||||||
removeCard(self.cardList, card, 1)
|
|
||||||
local cardGroup = {card, card + 1, card + 2}
|
|
||||||
self:push(cardGroup)
|
self:push(cardGroup)
|
||||||
local _huxi = 0
|
local _huxi = 0
|
||||||
|
if cardType(card)==1 then
|
||||||
|
_huxi = 3
|
||||||
|
else
|
||||||
|
_huxi = 6
|
||||||
|
end
|
||||||
self:pushhuxi(_huxi)
|
self:pushhuxi(_huxi)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--顺子1
|
||||||
|
function M:tryShunzi1(card, player)
|
||||||
|
if card < 200 and card % 100 > 8 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if (cardNum(card + 1, self.cardList)> 0 and cardNum(card + 2, self.cardList) > 0 ) then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card + 1, 1)
|
||||||
|
removeCard(self.cardList, card + 2, 1)
|
||||||
|
|
||||||
|
local cardGroup = {card, card + 1, card + 2}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 0
|
||||||
|
if card%100==1 then
|
||||||
|
if card>200 then
|
||||||
|
_huxi = 6
|
||||||
|
else
|
||||||
|
_huxi = 3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
--顺子2
|
||||||
|
function M:tryShunzi2(card, player)
|
||||||
|
if cardType(card) == 1 then
|
||||||
|
if cardNum(card+100,self.cardList) >= 1 and cardNum(card,self.cardList)>=2 then
|
||||||
|
removeCard(self.cardList, card, 2)
|
||||||
|
removeCard(self.cardList, card + 100, 1)
|
||||||
|
local cardGroup = {card, card, card+100}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 0
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
if cardNum(card+100,self.cardList)>=2 then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card+100, 2)
|
||||||
|
local cardGroup = {card, card+100, card+100}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 0
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
if cardNum(card-100,self.cardList) >= 1 and cardNum(card,self.cardList)>=2 then
|
||||||
|
removeCard(self.cardList, card, 2)
|
||||||
|
removeCard(self.cardList, card - 100, 1)
|
||||||
|
local cardGroup = {card, card, card-100}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 0
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
if cardNum(card-100,self.cardList)>=2 then
|
||||||
|
removeCard(self.cardList, card, 1)
|
||||||
|
removeCard(self.cardList, card-100, 2)
|
||||||
|
local cardGroup = {card, card-100, card-100}
|
||||||
|
self:push(cardGroup)
|
||||||
|
local _huxi = 0
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
-- 2 7 10
|
|
||||||
function M:tryShunzi3(card, player)
|
function M:tryShunzi3(card, player)
|
||||||
printlog("tryShunzi3")
|
|
||||||
if card % 100 == 2 then
|
if card % 100 == 2 then
|
||||||
if (checkCard(card + 5, self.cardList, 1)) and (checkCard(card + 8, self.cardList, 1)) then
|
if cardNum(card + 5, self.cardList)>0 and cardNum(card + 8, self.cardList)>0 then
|
||||||
removeCard(self.cardList, card, 1)
|
removeCard(self.cardList, card, 1)
|
||||||
removeCard(self.cardList, card + 5, 1)
|
removeCard(self.cardList, card + 5, 1)
|
||||||
removeCard(self.cardList, card + 8, 1)
|
removeCard(self.cardList, card + 8, 1)
|
||||||
local cardGroup = {card, card + 5, card + 8}
|
local cardGroup = {card, card + 5, card + 8}
|
||||||
self:push(cardGroup)
|
self:push(cardGroup)
|
||||||
local _huxi = 1
|
local _huxi = 3
|
||||||
self:pushhuxi(_huxi)
|
self:pushhuxi(_huxi)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
else
|
||||||
return false
|
if cardNum(card + 5, self.cardList)>0 and cardNum(card + 8, self.cardList)>0 then
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- 坎
|
|
||||||
function M:tryKezi(card, player)
|
|
||||||
printlog("tryKezi")
|
|
||||||
if (checkCard(card, self.cardList, 3)) then
|
|
||||||
removeCard(self.cardList, card, 3)
|
|
||||||
local cardGroup = {card, card, card}
|
|
||||||
self:push(cardGroup)
|
|
||||||
local _huxi = 1
|
|
||||||
if self.drawCard~=card then
|
|
||||||
_huxi = 3
|
|
||||||
end
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function M:tryPair(card)
|
|
||||||
printlog("tryPair")
|
|
||||||
if (self.pair_count > 0) then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
printlog(card)
|
|
||||||
pt(self.cardList)
|
|
||||||
if (checkCard(card, self.cardList, 2)) then
|
|
||||||
printlog("checkCard 2")
|
|
||||||
removeCard(self.cardList, card, 2)
|
|
||||||
local cardGroup = {card, card}
|
|
||||||
self:push(cardGroup)
|
|
||||||
local _huxi = 0
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
self.pair_count = 1
|
|
||||||
return true
|
|
||||||
elseif (checkCard(card, self.cardList, 1)) then
|
|
||||||
printlog("checkCard 1")
|
|
||||||
if card % 100 <=9 then
|
|
||||||
if (checkCard(card+1, self.cardList, 1)) then
|
|
||||||
printlog("checkCard 12")
|
|
||||||
removeCard(self.cardList, card, 1)
|
|
||||||
removeCard(self.cardList, card+1, 1)
|
|
||||||
local cardGroup = {card, card+1}
|
|
||||||
self:push(cardGroup)
|
|
||||||
local _huxi = 0
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
self.pair_count = 1
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if card % 100 <=8 then
|
|
||||||
if (checkCard(card+2, self.cardList, 1)) then
|
|
||||||
removeCard(self.cardList, card, 1)
|
|
||||||
removeCard(self.cardList, card+2, 1)
|
|
||||||
local cardGroup = {card, card+2}
|
|
||||||
self:push(cardGroup)
|
|
||||||
local _huxi = 0
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
self.pair_count = 1
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if card % 100 >=2 then
|
|
||||||
if (checkCard(card-1, self.cardList, 1)) then
|
|
||||||
removeCard(self.cardList, card, 1)
|
|
||||||
removeCard(self.cardList, card-1, 1)
|
|
||||||
local cardGroup = {card, card-1}
|
|
||||||
self:push(cardGroup)
|
|
||||||
local _huxi = 0
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
self.pair_count = 1
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if card % 100 >=3 then
|
|
||||||
if (checkCard(card-2, self.cardList, 1)) then
|
|
||||||
removeCard(self.cardList, card, 1)
|
|
||||||
removeCard(self.cardList, card-2, 1)
|
|
||||||
local cardGroup = {card, card-2}
|
|
||||||
self:push(cardGroup)
|
|
||||||
local _huxi = 0
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
self.pair_count = 1
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if card % 100 ==2 then
|
|
||||||
if (checkCard(card+5, self.cardList, 1)) then
|
|
||||||
removeCard(self.cardList, card, 1)
|
removeCard(self.cardList, card, 1)
|
||||||
removeCard(self.cardList, card + 5, 1)
|
removeCard(self.cardList, card + 5, 1)
|
||||||
local cardGroup = {card, card+5}
|
|
||||||
self:push(cardGroup)
|
|
||||||
local _huxi = 1
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
self.pair_count = 1
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
if (checkCard(card+8, self.cardList, 1)) then
|
|
||||||
removeCard(self.cardList, card, 1)
|
|
||||||
removeCard(self.cardList, card + 8, 1)
|
removeCard(self.cardList, card + 8, 1)
|
||||||
local cardGroup = {card, card+8}
|
local cardGroup = {card, card + 5, card + 8}
|
||||||
self:push(cardGroup)
|
self:push(cardGroup)
|
||||||
local _huxi = 1
|
local _huxi = 3
|
||||||
self:pushhuxi(_huxi)
|
self:pushhuxi(_huxi)
|
||||||
self.pair_count = 1
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if card % 100 ==7 then
|
|
||||||
if (checkCard(card-5, self.cardList, 1)) then
|
|
||||||
removeCard(self.cardList, card, 1)
|
|
||||||
removeCard(self.cardList, card-5, 1)
|
|
||||||
local cardGroup = {card, card-5}
|
|
||||||
self:push(cardGroup)
|
|
||||||
local _huxi = 1
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
self.pair_count = 1
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
if (checkCard(card+3, self.cardList, 1)) then
|
|
||||||
removeCard(self.cardList, card, 1)
|
|
||||||
removeCard(self.cardList, card+3, 1)
|
|
||||||
local cardGroup = {card, card+3}
|
|
||||||
self:push(cardGroup)
|
|
||||||
local _huxi = 1
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
self.pair_count = 1
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
if card % 100 ==10 then
|
|
||||||
if (checkCard(card-8, self.cardList, 1)) then
|
|
||||||
removeCard(self.cardList, card, 1)
|
|
||||||
removeCard(self.cardList, card-8, 1)
|
|
||||||
local cardGroup = {card, card-8}
|
|
||||||
self:push(cardGroup)
|
|
||||||
local _huxi = 1
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
self.pair_count = 1
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
if (checkCard(card-3, self.cardList, 1)) then
|
|
||||||
removeCard(self.cardList, card, 1)
|
|
||||||
removeCard(self.cardList, card-3, 1)
|
|
||||||
local cardGroup = {card, card-3}
|
|
||||||
self:push(cardGroup)
|
|
||||||
local _huxi = 1
|
|
||||||
self:pushhuxi(_huxi)
|
|
||||||
self.pair_count = 1
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function M:tryPair2(card)
|
function M:tryPair2(card)
|
||||||
printlog("tryPair2")
|
|
||||||
if (self.pair_count > 0) then
|
if (self.pair_count > 0) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
@ -373,14 +290,32 @@ function M:tryPair2(card)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M:tryPair(card)
|
||||||
|
|
||||||
|
if (self.pair_count > 0) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
if cardNum(card, self.cardList)>=2 then
|
||||||
|
self.pairflag = 1
|
||||||
|
removeCard(self.cardList, card, 2)
|
||||||
|
local cardGroup = {card, card , card}
|
||||||
|
self:push(cardGroup)
|
||||||
|
self.pair_count = 1;
|
||||||
|
local _huxi = 0
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function M:tryWin(player)
|
function M:tryWin(player)
|
||||||
|
--[[ if #self.cardList == 0 then
|
||||||
if #self.cardList == 0 then
|
|
||||||
if (self.pair_count == 1) then
|
if (self.pair_count == 1) then
|
||||||
return true
|
return true
|
||||||
elseif self.pair_count == 2 and #self.stack==2 then
|
elseif #self.stack>=2 then
|
||||||
local tempPList={}
|
local tempPList={}
|
||||||
for i=1,#self.stack do
|
for i=1,#self.stack do
|
||||||
local card1=self.stack[i][1]
|
local card1=self.stack[i][1]
|
||||||
|
|
@ -401,36 +336,37 @@ function M:tryWin(player)
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
]]
|
||||||
|
if #self.cardList == 0 then
|
||||||
|
if (player.tiCount+player.paoCount)>0 then
|
||||||
|
if self.pair_count ==1 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
if self.pair_count >0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local activeCard = 0
|
local activeCard = 0
|
||||||
|
|
||||||
for i = 1, #self.cardList do
|
for i = 1, #self.cardList do
|
||||||
if (self.cardList[i] == 201 or self.cardList[i] == 202) then
|
if (self.cardList[i] == 201 or self.cardList[i] == 202) then
|
||||||
activeCard = self.cardList[i]
|
activeCard = self.cardList[i]
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (activeCard == 0) then
|
if (activeCard == 0) then
|
||||||
activeCard = self.cardList[1]
|
activeCard = self.cardList[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
print("check win:")
|
|
||||||
-- pt(self.cardList)
|
|
||||||
print("activeCard:"..activeCard)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (activeCard % 100 == 1) then
|
if (activeCard % 100 == 1) then
|
||||||
|
|
||||||
if self:tryShunzi1(activeCard, player) then
|
|
||||||
if self:tryWin(player) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
self:rollBack()
|
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
|
||||||
end
|
|
||||||
|
|
||||||
if self:tryKezi(activeCard, player) then
|
if self:tryKezi(activeCard, player) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
|
|
@ -440,8 +376,31 @@ function M:tryWin(player)
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self:tryShunzi1(activeCard, player) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:tryShunzi2(activeCard, player) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:tryShunzi3(activeCard, player) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
if (player.tiCount + player.paoCount)>0 then
|
||||||
if self:tryPair(activeCard) then
|
if self:tryPair(activeCard) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
|
|
@ -450,14 +409,6 @@ function M:tryWin(player)
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:tryPair2(activeCard) then
|
|
||||||
if self:tryWin(player) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
self.pair_count = 0
|
|
||||||
self:rollBack()
|
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif activeCard % 100 == 2 then
|
elseif activeCard % 100 == 2 then
|
||||||
|
|
@ -468,6 +419,7 @@ function M:tryWin(player)
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:tryKezi(activeCard, player) then
|
if self:tryKezi(activeCard, player) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
|
|
@ -476,24 +428,6 @@ function M:tryWin(player)
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:tryPair(activeCard) then
|
|
||||||
if self:tryWin(player) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
self.pair_count = 0
|
|
||||||
self:rollBack()
|
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
|
||||||
end
|
|
||||||
|
|
||||||
if self:tryPair2(activeCard) then
|
|
||||||
if self:tryWin(player) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
self.pair_count = 0
|
|
||||||
self:rollBack()
|
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
|
||||||
end
|
|
||||||
|
|
||||||
if self:tryShunzi1(activeCard, player) then
|
if self:tryShunzi1(activeCard, player) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
|
|
@ -502,8 +436,13 @@ function M:tryWin(player)
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
if self:tryShunzi2(activeCard, player) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
if self:tryShunzi3(activeCard, player) then
|
if self:tryShunzi3(activeCard, player) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
|
|
@ -512,15 +451,7 @@ function M:tryWin(player)
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:tryKezi(activeCard, player) then
|
if (player.tiCount + player.paoCount)>0 then
|
||||||
if self:tryWin(player) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
self:rollBack()
|
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
if self:tryPair(activeCard) then
|
if self:tryPair(activeCard) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
|
|
@ -529,8 +460,38 @@ function M:tryWin(player)
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if self:tryPair2(activeCard) then
|
|
||||||
|
else
|
||||||
|
if self:tryShunzi2(activeCard, player) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:tryKezi(activeCard, player) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:tryShunzi1(activeCard, player) then
|
||||||
|
if self:tryWin(player) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:rollBack()
|
||||||
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (player.tiCount + player.paoCount)>0 then
|
||||||
|
if self:tryPair(activeCard) then
|
||||||
if self:tryWin(player) then
|
if self:tryWin(player) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
@ -538,34 +499,102 @@ function M:tryWin(player)
|
||||||
self:rollBack()
|
self:rollBack()
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
table.remove(self.stackHuxi, #self.stackHuxi)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if self:tryShunzi1(activeCard, player) then
|
|
||||||
|
|
||||||
if self:tryWin(player) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
self:rollBack()
|
|
||||||
table.remove(self.stackHuxi, #self.stackHuxi)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- end
|
|
||||||
return false
|
return false
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function initnew(self,player,cardInhand,addCard)
|
||||||
|
-- 方案一,获取获取pao子,坎子,顺子,话子,对子将
|
||||||
|
self.stack = {}
|
||||||
|
self.stackHuxi = {}
|
||||||
|
self.pair_count = 0
|
||||||
|
self.kong_count = 0
|
||||||
|
self.drawCard=0
|
||||||
|
self.cardList = membe_clone(cardInhand)
|
||||||
|
|
||||||
|
self.handCardList = membe_clone(cardInhand)
|
||||||
|
local tmpchongfu = {}
|
||||||
|
|
||||||
|
self.handCardList[#self.handCardList+1] = addCard
|
||||||
|
|
||||||
|
for i = 1, #self.handCardList do
|
||||||
|
--获取重复
|
||||||
|
if tmpchongfu[self.handCardList[i]] ~=nil then
|
||||||
|
tmpchongfu[self.handCardList[i]] = tmpchongfu[self.handCardList[i]] + 1
|
||||||
|
else
|
||||||
|
tmpchongfu[self.handCardList[i]] = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for index, value in pairs(tmpchongfu) do
|
||||||
|
if value>=3 then
|
||||||
|
if value==4 then
|
||||||
|
player.paoCount = player.paoCount+1
|
||||||
|
end
|
||||||
|
removeCard(self.handCardList,index,value)
|
||||||
|
local _huxi = 0
|
||||||
|
if cardType(index)==1 then
|
||||||
|
_huxi = 6
|
||||||
|
else
|
||||||
|
_huxi = 9
|
||||||
|
end
|
||||||
|
self:pushhuxi(_huxi)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- pt(tmpchongfu)
|
||||||
|
-- pt(self.handCardList)
|
||||||
|
self.cardList = membe_clone( self.handCardList )
|
||||||
|
-- pt(self.cardList)
|
||||||
|
table.sort(self.cardList)
|
||||||
|
--[[local activeCard = 109
|
||||||
|
self.cardList = {
|
||||||
|
107,207,109,109,209
|
||||||
|
}]]
|
||||||
|
-- local res1 = self:tryShunzi2(activeCard, player)
|
||||||
|
local res1 = self:tryWin(player)
|
||||||
|
printlog(res1)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local function init(self, player, cardInhand, addCard)
|
local function init(self, player, cardInhand, addCard)
|
||||||
self.stack = {}
|
self.stack = {}
|
||||||
self.stackHuxi = {}
|
self.stackHuxi = {}
|
||||||
self.pair_count = 0
|
self.pair_count = 0
|
||||||
self.kong_count = 0
|
self.kong_count = 0
|
||||||
self.drawCard=0
|
self.drawCard=0
|
||||||
print("+++++++++++++++++++++++++++++++++++++++++++++++++")
|
|
||||||
|
self.handCardList = membe_clone(cardInhand)
|
||||||
|
local tmpchongfu = {}
|
||||||
|
self.handCardList[#self.handCardList+1] = addCard
|
||||||
|
|
||||||
|
for i = 1, #self.handCardList do
|
||||||
|
--获取重复
|
||||||
|
if tmpchongfu[self.handCardList[i]] ~=nil then
|
||||||
|
tmpchongfu[self.handCardList[i]] = tmpchongfu[self.handCardList[i]] + 1
|
||||||
|
else
|
||||||
|
tmpchongfu[self.handCardList[i]] = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for index, value in pairs(tmpchongfu) do
|
||||||
|
if value==4 then
|
||||||
|
player.paoCount = player.paoCount+1
|
||||||
|
-- self.tiZi[index] = 1
|
||||||
|
end
|
||||||
|
if value == 2 then
|
||||||
|
self.pairflag = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
self.cardList = membe_clone(cardInhand)
|
self.cardList = membe_clone(cardInhand)
|
||||||
--[[
|
|
||||||
if addCard == nil then
|
if addCard == nil then
|
||||||
self.kong_count = 1
|
self.kong_count = 1
|
||||||
else
|
else
|
||||||
|
|
@ -573,58 +602,89 @@ local function init(self, player, cardInhand, addCard)
|
||||||
self.cardList[#self.cardList + 1] = addCard
|
self.cardList[#self.cardList + 1] = addCard
|
||||||
self.drawCard=addCard
|
self.drawCard=addCard
|
||||||
end
|
end
|
||||||
]]
|
|
||||||
table.sort(self.cardList)
|
table.sort(self.cardList)
|
||||||
|
|
||||||
self.cardList = {106,107,108,109}
|
local res = self:tryWin(player)
|
||||||
local eventCard = 108
|
|
||||||
--local cardList ={108,109}
|
|
||||||
|
|
||||||
local res = self:tryPair(eventCard)
|
return res
|
||||||
|
|
||||||
--local res = self:tryWin(player)
|
|
||||||
print("jefe check res")
|
|
||||||
print(res)
|
|
||||||
return false -- res
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.tingPai(player, room)
|
function M.tingPai(player, room)
|
||||||
local self = setmetatable({}, {__index = M})
|
local self = setmetatable({}, {__index = M})
|
||||||
local tingList = {}
|
local tingList = {}
|
||||||
local cardInhand = player.handcard_list
|
local cardInhand = player.handcard_list
|
||||||
|
self.tiZi = {}
|
||||||
|
|
||||||
if not cardInhand or #cardInhand == 0 then
|
if not cardInhand or #cardInhand == 0 then
|
||||||
return tingList
|
return tingList
|
||||||
end
|
end
|
||||||
local kan_huxi = 0
|
local kan_huxi = 0
|
||||||
local kan_cards = {}
|
local kan_cards = {}
|
||||||
|
|
||||||
|
if player.tiCount==nil then
|
||||||
|
player.tiCount = 0
|
||||||
|
end
|
||||||
|
if player.paoCount==nil then
|
||||||
|
player.paoCount = 0
|
||||||
|
end
|
||||||
for j = 1, #player.fz_list do
|
for j = 1, #player.fz_list do
|
||||||
for i = 1, #cardInhand do
|
for i = 1, #cardInhand do
|
||||||
if cardInhand[i] == player.fz_list[j].active_card and player.fz_list[j].type == 3 then
|
if cardInhand[i] == player.fz_list[j].active_card and player.fz_list[j].type == 3 then
|
||||||
kan_cards[#kan_cards + 1] = cardInhand[i]
|
kan_cards[#kan_cards + 1] = cardInhand[i]
|
||||||
|
self.tiZi[cardInhand[i]] = 1
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
if player.fz_list[j].type==6 then
|
||||||
|
player.paoCount = 1
|
||||||
|
if cardType(player.fz_list[j].active_card) ==2 then
|
||||||
|
kan_huxi = kan_huxi + 9
|
||||||
|
else
|
||||||
|
kan_huxi = kan_huxi + 6
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
if player.fz_list[j].type==7 then
|
||||||
|
player.tiCount = 1
|
||||||
|
if cardType(player.fz_list[j].active_card) ==2 then
|
||||||
|
kan_huxi = kan_huxi + 12
|
||||||
|
else
|
||||||
|
kan_huxi = kan_huxi + 9
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if player.fz_list[j].type==2 then
|
||||||
|
if cardType(player.fz_list[j].active_card) ==2 then
|
||||||
|
kan_huxi = kan_huxi + 3
|
||||||
|
else
|
||||||
|
kan_huxi = kan_huxi + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
if #kan_cards > 0 then
|
if #kan_cards > 0 then
|
||||||
for i = 1, #kan_cards do
|
for i = 1, #kan_cards do
|
||||||
|
|
||||||
|
if cardType(kan_cards[i])==2 then
|
||||||
|
kan_huxi = kan_huxi + 6
|
||||||
|
else
|
||||||
kan_huxi = kan_huxi + 3
|
kan_huxi = kan_huxi + 3
|
||||||
|
end
|
||||||
|
|
||||||
removeCard(cardInhand, kan_cards[i], 3)
|
removeCard(cardInhand, kan_cards[i], 3)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for k = 100, 200, 100 do
|
||||||
|
for i = 1, 10 do
|
||||||
player.tiCount = 0
|
local tem = k + i
|
||||||
player.paoCount = 0
|
-- player.paoCount = 1
|
||||||
|
|
||||||
|
|
||||||
-- for k = 100, 200, 100 do
|
|
||||||
-- for i = 1, 10 do
|
|
||||||
local tem =106 -- k + i
|
|
||||||
local result = init(self, player, cardInhand, tem)
|
local result = init(self, player, cardInhand, tem)
|
||||||
|
--补充 验证
|
||||||
|
-- local result2 = initnew(self,player,cardInhand,tem)
|
||||||
|
|
||||||
local num = 0
|
local num = 0
|
||||||
for k = 1, #self.stackHuxi do
|
for k = 1, #self.stackHuxi do
|
||||||
|
|
@ -633,20 +693,23 @@ function M.tingPai(player, room)
|
||||||
|
|
||||||
if result then
|
if result then
|
||||||
local num1 = 0
|
local num1 = 0
|
||||||
--pt(self.stackHuxi)
|
|
||||||
for k = 1, #self.stackHuxi do
|
for k = 1, #self.stackHuxi do
|
||||||
num1 = num1 + self.stackHuxi[k]
|
num1 = num1 + self.stackHuxi[k]
|
||||||
--printlog(self.stackHuxi[k])
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if (player.hu_xi + num1 + kan_huxi) >= (self:getHuxi(room)-1) then
|
if (player.hu_xi + num1 + kan_huxi) >= (self:getHuxi(room)-1) then
|
||||||
tingList[#tingList + 1] = tem
|
tingList[#tingList + 1] = tem
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
print("==============================================================")
|
end
|
||||||
|
end
|
||||||
--return
|
if next(self.tiZi)~=nil and #tingList > 0 and self.pairflag>0 then
|
||||||
--end
|
for key, value in pairs(self.tiZi) do
|
||||||
-- end
|
if value>0 then
|
||||||
|
tingList[#tingList + 1] = key
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return tingList
|
return tingList
|
||||||
end
|
end
|
||||||
|
|
@ -121,26 +121,42 @@ room.room_config = {
|
||||||
}
|
}
|
||||||
|
|
||||||
player.hu_xi = 0
|
player.hu_xi = 0
|
||||||
player.handcard_list ={106,107,105,109,109,205,205,205,204,204,204,108,108,108,201,201,202,207,210,209}
|
player.handcard_list ={ 102,
|
||||||
|
102,
|
||||||
|
103,
|
||||||
|
104,
|
||||||
|
106,
|
||||||
|
106,
|
||||||
|
107,
|
||||||
|
107,
|
||||||
|
110,
|
||||||
|
110,
|
||||||
|
203,
|
||||||
|
204,
|
||||||
|
205,
|
||||||
|
206,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
player.fz_list = {
|
player.fz_list = {
|
||||||
--[[
|
|
||||||
{
|
{
|
||||||
type = 2,
|
type = 2,
|
||||||
active_card = 208,
|
|
||||||
opcard = {208,208},
|
|
||||||
card = 208,
|
card = 208,
|
||||||
|
opcard = {
|
||||||
|
208,
|
||||||
|
208,
|
||||||
|
},
|
||||||
|
active_card = 208,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = 1,
|
type = 1,
|
||||||
card = 204,
|
card = 109,
|
||||||
opcard = {
|
opcard = {
|
||||||
203,
|
109,
|
||||||
202,
|
209,
|
||||||
},
|
},
|
||||||
active_card = 204,
|
active_card = 109,
|
||||||
}]]
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CardCheck.tingPai(player,room)
|
CardCheck.tingPai(player,room)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<component size="1334,750" designImage="ui://3vytbifonu0l2f" designImageOffsetX="-200" designImageOffsetY="-100">
|
<component size="1334,750" designImage="ui://3vytbifonu0l2f" designImageOffsetX="-200" designImageOffsetY="-100">
|
||||||
<controller name="state" pages="0,准备状态,1,游戏状态,2,回合间状态,3,回放状态" selected="3"/>
|
<controller name="state" pages="0,准备状态,1,游戏状态,2,回合间状态,3,回放状态" selected="1"/>
|
||||||
<controller name="sdk" pages="0,,1," selected="0"/>
|
<controller name="sdk" pages="0,,1," selected="0"/>
|
||||||
<controller name="action" pages="2,空,0,准备,1,开始" selected="0"/>
|
<controller name="action" pages="2,空,0,准备,1,开始" selected="0"/>
|
||||||
<controller name="jushu" pages="0,,1," selected="0"/>
|
<controller name="jushu" pages="0,,1," selected="0"/>
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
<component id="n147_nu0l" name="player_info2" src="f55qw7" fileName="component/Main/component/PlayerHead_2.xml" xy="11,71">
|
<component id="n147_nu0l" name="player_info2" src="f55qw7" fileName="component/Main/component/PlayerHead_2.xml" xy="11,71">
|
||||||
<relation target="" sidePair="left-left,leftext-left"/>
|
<relation target="" sidePair="left-left,leftext-left"/>
|
||||||
</component>
|
</component>
|
||||||
<component id="n7" name="player_info1" src="f55qw4" fileName="component/Main/component/PlayerHead_1.xml" xy="8,570" size="189,67">
|
<component id="n7" name="player_info1" src="f55qw4" fileName="component/Main/component/PlayerHead_1.xml" xy="22,548" size="189,67">
|
||||||
<gearXY controller="state" pages="0,1,2,3" values="20,524|22,548|8,570|8,570"/>
|
<gearXY controller="state" pages="0,1,2,3" values="20,524|22,548|8,570|8,570"/>
|
||||||
<relation target="" sidePair="left-left,leftext-left"/>
|
<relation target="" sidePair="left-left,leftext-left"/>
|
||||||
</component>
|
</component>
|
||||||
|
|
@ -83,11 +83,11 @@
|
||||||
<gearDisplay controller="state" pages="3"/>
|
<gearDisplay controller="state" pages="3"/>
|
||||||
<relation target="" sidePair="center-center"/>
|
<relation target="" sidePair="center-center"/>
|
||||||
</image>
|
</image>
|
||||||
<text id="n42_lryk" name="tex_round" xy="527,150" size="267,36" group="n154_r1mo" fontSize="24" color="#ffffff" align="center" autoSize="none" text="剩余 5 张牌 1/8局">
|
<text id="n42_lryk" name="tex_round" xy="565,150" size="267,36" group="n154_r1mo" fontSize="24" color="#ffffff" align="center" autoSize="none" text="剩余 5 张牌 1/8局">
|
||||||
<gearDisplay controller="state" pages="1,3"/>
|
<gearDisplay controller="state" pages="1,3"/>
|
||||||
<relation target="" sidePair="center-center"/>
|
<relation target="" sidePair="center-center"/>
|
||||||
</text>
|
</text>
|
||||||
<group id="n154_r1mo" name="n154" xy="527,150" size="267,36" advanced="true">
|
<group id="n154_r1mo" name="n154" xy="565,150" size="267,36" advanced="true">
|
||||||
<gearDisplay controller="jushu" pages="1"/>
|
<gearDisplay controller="jushu" pages="1"/>
|
||||||
</group>
|
</group>
|
||||||
<loader id="n153_8th3" name="cardAnima" xy="625,86" size="50,30" visible="false" touchable="false" url="ui://3bfrwj0h8th37l" autoSize="true">
|
<loader id="n153_8th3" name="cardAnima" xy="625,86" size="50,30" visible="false" touchable="false" url="ui://3bfrwj0h8th37l" autoSize="true">
|
||||||
|
|
@ -116,7 +116,7 @@
|
||||||
<component id="n179_kxwj" name="btn_distance" src="kxwjhyc" fileName="component/gps/btn_distance_new.xml" pkg="27vd145b" xy="1248,262" visible="false" touchable="false">
|
<component id="n179_kxwj" name="btn_distance" src="kxwjhyc" fileName="component/gps/btn_distance_new.xml" pkg="27vd145b" xy="1248,262" visible="false" touchable="false">
|
||||||
<gearDisplay controller="state" pages="0,1,2"/>
|
<gearDisplay controller="state" pages="0,1,2"/>
|
||||||
</component>
|
</component>
|
||||||
<text id="n27" name="remaining_card" xy="625,93" size="165,45" fontSize="32" color="#ffffff" align="center" autoSize="none" text="剩余20张">
|
<text id="n27" name="remaining_card" xy="617,92" size="165,45" fontSize="32" color="#ffffff" align="center" autoSize="none" text="剩余20张">
|
||||||
<gearDisplay controller="state" pages="1,3"/>
|
<gearDisplay controller="state" pages="1,3"/>
|
||||||
<relation target="" sidePair="center-center"/>
|
<relation target="" sidePair="center-center"/>
|
||||||
</text>
|
</text>
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -14,10 +14,10 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_PixelRect:
|
m_PixelRect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 12
|
x: 1.3333334
|
||||||
y: 66.66667
|
y: 50
|
||||||
width: 876.6667
|
width: 876.6667
|
||||||
height: 854.6667
|
height: 860.6667
|
||||||
m_ShowMode: 4
|
m_ShowMode: 4
|
||||||
m_Title:
|
m_Title:
|
||||||
m_RootView: {fileID: 4}
|
m_RootView: {fileID: 4}
|
||||||
|
|
@ -40,9 +40,9 @@ MonoBehaviour:
|
||||||
m_Position:
|
m_Position:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 0
|
x: 0
|
||||||
y: 384
|
y: 387
|
||||||
width: 877
|
width: 877
|
||||||
height: 421
|
height: 424
|
||||||
m_MinSize: {x: 101, y: 121}
|
m_MinSize: {x: 101, y: 121}
|
||||||
m_MaxSize: {x: 4001, y: 4021}
|
m_MaxSize: {x: 4001, y: 4021}
|
||||||
m_ActualView: {fileID: 9}
|
m_ActualView: {fileID: 9}
|
||||||
|
|
@ -72,7 +72,7 @@ MonoBehaviour:
|
||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
width: 877
|
width: 877
|
||||||
height: 805
|
height: 811
|
||||||
m_MinSize: {x: 201, y: 342}
|
m_MinSize: {x: 201, y: 342}
|
||||||
m_MaxSize: {x: 4001, y: 8042}
|
m_MaxSize: {x: 4001, y: 8042}
|
||||||
vertical: 1
|
vertical: 1
|
||||||
|
|
@ -98,7 +98,7 @@ MonoBehaviour:
|
||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
width: 877
|
width: 877
|
||||||
height: 855
|
height: 861
|
||||||
m_MinSize: {x: 875, y: 300}
|
m_MinSize: {x: 875, y: 300}
|
||||||
m_MaxSize: {x: 10000, y: 10000}
|
m_MaxSize: {x: 10000, y: 10000}
|
||||||
--- !u!114 &5
|
--- !u!114 &5
|
||||||
|
|
@ -142,7 +142,7 @@ MonoBehaviour:
|
||||||
x: 0
|
x: 0
|
||||||
y: 30
|
y: 30
|
||||||
width: 877
|
width: 877
|
||||||
height: 805
|
height: 811
|
||||||
m_MinSize: {x: 201, y: 342}
|
m_MinSize: {x: 201, y: 342}
|
||||||
m_MaxSize: {x: 4001, y: 8042}
|
m_MaxSize: {x: 4001, y: 8042}
|
||||||
vertical: 0
|
vertical: 0
|
||||||
|
|
@ -163,7 +163,7 @@ MonoBehaviour:
|
||||||
m_Position:
|
m_Position:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 0
|
x: 0
|
||||||
y: 835
|
y: 841
|
||||||
width: 877
|
width: 877
|
||||||
height: 20
|
height: 20
|
||||||
m_MinSize: {x: 0, y: 0}
|
m_MinSize: {x: 0, y: 0}
|
||||||
|
|
@ -186,7 +186,7 @@ MonoBehaviour:
|
||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
width: 877
|
width: 877
|
||||||
height: 384
|
height: 387
|
||||||
m_MinSize: {x: 201, y: 221}
|
m_MinSize: {x: 201, y: 221}
|
||||||
m_MaxSize: {x: 4001, y: 4021}
|
m_MaxSize: {x: 4001, y: 4021}
|
||||||
m_ActualView: {fileID: 12}
|
m_ActualView: {fileID: 12}
|
||||||
|
|
@ -216,10 +216,10 @@ MonoBehaviour:
|
||||||
m_Tooltip:
|
m_Tooltip:
|
||||||
m_Pos:
|
m_Pos:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 12
|
x: 1.3333334
|
||||||
y: 480.6667
|
y: 467.33334
|
||||||
width: 876
|
width: 876
|
||||||
height: 400
|
height: 403
|
||||||
m_ViewDataDictionary: {fileID: 0}
|
m_ViewDataDictionary: {fileID: 0}
|
||||||
--- !u!114 &10
|
--- !u!114 &10
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
|
@ -431,10 +431,10 @@ MonoBehaviour:
|
||||||
m_Tooltip:
|
m_Tooltip:
|
||||||
m_Pos:
|
m_Pos:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 12
|
x: 1.3333334
|
||||||
y: 96.66667
|
y: 80
|
||||||
width: 876
|
width: 876
|
||||||
height: 363
|
height: 366
|
||||||
m_ViewDataDictionary: {fileID: 0}
|
m_ViewDataDictionary: {fileID: 0}
|
||||||
m_SerializedViewNames: []
|
m_SerializedViewNames: []
|
||||||
m_SerializedViewValues: []
|
m_SerializedViewValues: []
|
||||||
|
|
@ -471,7 +471,7 @@ MonoBehaviour:
|
||||||
m_HSlider: 0
|
m_HSlider: 0
|
||||||
m_VSlider: 0
|
m_VSlider: 0
|
||||||
m_IgnoreScrollWheelUntilClicked: 0
|
m_IgnoreScrollWheelUntilClicked: 0
|
||||||
m_EnableMouseInput: 1
|
m_EnableMouseInput: 0
|
||||||
m_EnableSliderZoomHorizontal: 0
|
m_EnableSliderZoomHorizontal: 0
|
||||||
m_EnableSliderZoomVertical: 0
|
m_EnableSliderZoomVertical: 0
|
||||||
m_UniformScale: 1
|
m_UniformScale: 1
|
||||||
|
|
@ -481,22 +481,22 @@ MonoBehaviour:
|
||||||
x: 0
|
x: 0
|
||||||
y: 21
|
y: 21
|
||||||
width: 876
|
width: 876
|
||||||
height: 342
|
height: 345
|
||||||
m_Scale: {x: 0.475, y: 0.475}
|
m_Scale: {x: 0.47916666, y: 0.47916666}
|
||||||
m_Translation: {x: 438, y: 171}
|
m_Translation: {x: 438, y: 172.5}
|
||||||
m_MarginLeft: 0
|
m_MarginLeft: 0
|
||||||
m_MarginRight: 0
|
m_MarginRight: 0
|
||||||
m_MarginTop: 0
|
m_MarginTop: 0
|
||||||
m_MarginBottom: 0
|
m_MarginBottom: 0
|
||||||
m_LastShownAreaInsideMargins:
|
m_LastShownAreaInsideMargins:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: -922.1053
|
x: -914.087
|
||||||
y: -360
|
y: -360
|
||||||
width: 1844.2106
|
width: 1828.174
|
||||||
height: 720
|
height: 720
|
||||||
m_MinimalGUI: 1
|
m_MinimalGUI: 1
|
||||||
m_defaultScale: 0.475
|
m_defaultScale: 0.47916666
|
||||||
m_LastWindowPixelSize: {x: 1314, y: 544.5}
|
m_LastWindowPixelSize: {x: 1314, y: 549}
|
||||||
m_ClearInEditMode: 1
|
m_ClearInEditMode: 1
|
||||||
m_NoCameraWarning: 1
|
m_NoCameraWarning: 1
|
||||||
m_LowResolutionForAspectRatios: 00000001000000000000
|
m_LowResolutionForAspectRatios: 00000001000000000000
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,2 @@
|
||||||
|
Base path: 'C:/Program Files/Unity/Hub/Editor/2019.4.10f1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2019.4.10f1/Editor/Data/PlaybackEngines'
|
||||||
|
Cmd: initializeCompiler
|
||||||
Loading…
Reference in New Issue