diff --git a/lua_probject/base_project/Game/Controller/LoginController.lua b/lua_probject/base_project/Game/Controller/LoginController.lua index e22d6862..7afcd049 100644 --- a/lua_probject/base_project/Game/Controller/LoginController.lua +++ b/lua_probject/base_project/Game/Controller/LoginController.lua @@ -14,7 +14,7 @@ end local _LocalConfigAllGame = { -- 10, 33, - -- 90, + 90, 66, 86, 87, 88, 89 } diff --git a/lua_probject/extend_project/extend/poker/runfast/CardCheck.lua b/lua_probject/extend_project/extend/poker/runfast/CardCheck.lua index eb2bb4d2..adb47e7a 100644 --- a/lua_probject/extend_project/extend/poker/runfast/CardCheck.lua +++ b/lua_probject/extend_project/extend/poker/runfast/CardCheck.lua @@ -548,8 +548,14 @@ function M:CheckSanDai() if self.threelack and M:CheckType(CardType.lessPlant) then local last_k local num_san = 0 - for k, v in pairs(self.cardList) do + local num_four = 0 + for i = 1, self.cardSize do + local k = self.cardListSord[i] + local v = self.cardList[k] if v >= 3 then + if v == 4 then + num_four = 1 + end num_san = num_san + 1 print("liengmengCheckthreelack2", last_k, k) @@ -565,7 +571,7 @@ function M:CheckSanDai() end print("liengmengCheckthreelack4", num_san, self.cardNum - num_san * 3 < num_san * 2) - if self.cardNum - num_san * 3 < num_san * 2 then + if self.cardNum - num_san * 3 < num_san * 2 and not (self.cardNum == 4 and num_four == 1) then return CardType.lessPlant else return diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua index 60c1edda..498bf79c 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua @@ -629,8 +629,10 @@ function M:EventInit() self._cardCheck:InitLastCard(lastCardList) self:_Effect(self._cardCheck.type, p) + print("lingmengsound", cardstype, num, self._room.is_new_bout) + self:PlaySound(p.self_user.sex, self:GetSoundFileName(self._cardCheck.type, num, self._room.is_new_bout)) + -- self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout)) - self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout)) if card_number == 1 then --self:ChangeBgmMusic(2) self:ChangeBgmMusic(1) @@ -1365,29 +1367,51 @@ function M:UpdateRound(round) self._text_maxRound.text = string.format("/%s局", total_round) end +-- function M:GetSoundFileName(type, num, isNewBout) +-- local fileName +-- if isNewBout then +-- if type > 6 or type == 4 then +-- if type == 8 or type == 9 then +-- type = 7 +-- end +-- fileName = tostring(type) +-- elseif type > 2 then +-- fileName = string.format("3_%d", num) +-- else +-- fileName = string.format("%d_%d", type, num) +-- end +-- else +-- math.randomseed(os.time()) +-- if type > 2 and type ~= 11 then +-- local r = math.random(1, 3) +-- fileName = "dani_" .. r +-- elseif type == 11 then +-- fileName = tostring(type) +-- else +-- fileName = string.format("%d_%d", type, num) +-- end +-- end +-- return fileName +-- end + function M:GetSoundFileName(type, num, isNewBout) local fileName - if isNewBout then - if type > 6 or type == 4 then - if type == 8 or type == 9 then - type = 7 - end - fileName = tostring(type) - elseif type > 2 then - fileName = string.format("3_%d", num) - else - fileName = string.format("%d_%d", type, num) - end - else - math.randomseed(os.time()) - if type > 2 and type ~= 11 then - local r = math.random(1, 3) - fileName = "dani_" .. r - elseif type == 11 then - fileName = tostring(type) - else - fileName = string.format("%d_%d", type, num) - end + if type == 10 then + fileName = 4 + elseif type == 11 then + fileName = 6 + elseif type == 5 or type == 8 or type == 12 then + fileName = 7 + elseif type == 2 then + fileName = 10 + elseif type == 6 then + fileName = 11 + elseif type == 1 then + fileName = string.format("1_%d", num) + elseif type == 3 then + fileName = string.format("2_%d", num) + elseif type == 4 or type == 7 then + fileName = string.format("3_%d", num) end return fileName end