From f66be072e870db58d55f9990983501e485279b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=AE=B6=E7=82=9C?= <2029049582@qq.com> Date: Thu, 15 May 2025 17:42:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=87=8D=E6=96=B0=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E6=88=BF=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extend/majiang/lichuan/EXMainView.lua | 5 +- .../extend/majiang/lichuan/ExtendConfig.lua | 5 + .../extend/poker/runfast/EXGameInfo.lua | 283 ++++++++------- .../poker/runfast/EXGameInfo_jiangxi.lua | 324 ++++++++++++++++++ .../majiang/MJPlayerCardInfoView_jiangxi.lua | 8 +- 5 files changed, 474 insertions(+), 151 deletions(-) create mode 100644 lua_probject/extend_project/extend/poker/runfast/EXGameInfo_jiangxi.lua diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua index 83def1fd..0361cf13 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua @@ -836,8 +836,7 @@ function M:OnFangziAction(...) local fs_info = _player_card_info[self:GetPos(fz.from_seat)] fs_info:UpdateOutCardList() end - local seat = (self._room.room_config.people_num == 2 and fz.from_seat == 2) and 2 or fz.from_seat - 1 - info:UpdateFzList(fz, index, true, seat) + info:UpdateFzList(fz, index, true) local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi printlog(getcard) info:UpdateHandCard(getcard) @@ -921,7 +920,7 @@ function M:ReloadRoom(bskip) end end - + self:ShowJing() for i = 1, #room.player_list do local p = room.player_list[i] local info = self._player_card_info[self:GetPos(p.seat)] diff --git a/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua index bf89be5b..489d1059 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua @@ -88,11 +88,15 @@ function M:FillRoomData(s2croom) local playing = _reloadInfo["playing"] local _info_list = _reloadInfo["info_list"] local last_outcard_seat = _reloadInfo["last_outcard_seat"] + local jing = _reloadInfo["jing"] room.left_count = _reloadInfo["left_card"] room.banker_seat = bank_seat room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] room.last_outcard_seat = last_outcard_seat room.playing = playing + if jing then + room.jing = jing + end for i = 1, #_info_list do local tem = _info_list[i] local playerid = tem["playerid"] @@ -108,6 +112,7 @@ function M:FillRoomData(s2croom) local fz = {} fz.type = op["type"] fz.card = op["card"] + fz.from_seat = op["from_seat"] p.fz_list[#p.fz_list + 1] = fz end print("=======================在此进入", playing) diff --git a/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua b/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua index 742a666f..245035ed 100644 --- a/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua +++ b/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua @@ -6,7 +6,6 @@ local EXGameInfo = {} local M = EXGameInfo -local roundTable = { 10, 15, 20 } function EXGameInfo.new(blur_view) setmetatable(M, { __index = IGameInfo }) local self = setmetatable({}, { __index = M }) @@ -26,24 +25,87 @@ function M:FillData(view, index) -- end - -- self._config:GetChild("people_2").onClick:Set(function() - -- self._config:GetController("rule").selectedIndex = 0 - -- end) + if oldGameVersion == 2 then + self._config:GetController("xipai").selectedIndex = 0 - -- local piao = self._config:GetController("piao") - -- local daniao = self._config:GetController("daniao") + self.xipaiValueText = self._config:GetChild('xipaifen') + self.xipaiValueText.text = 1 + self.xipaiValue = 1 - -- piao.onChanged:Add(function() - -- if piao.selectedIndex ~= 0 then - -- daniao.selectedIndex = 0 - -- end - -- end) + self.anchouValueText = self._config:GetChild('anchoufen') + self.anchouValueText.text = 1 + self.anchouValue = 1 - -- daniao.onChanged:Add(function() - -- if daniao.selectedIndex ~= 0 then - -- piao.selectedIndex = 0 - -- end - -- end) + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + local gniv = GroupNumberInputView_Game.new(nil, function(num) + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == -1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1, "输入数据异常!") + end + + self.xipaiValueText.text = value / 1000 + self.xipaiValue = value / 1000 + end, 0, nil) + gniv:Show() + end + ) + + + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + local gniv = GroupNumberInputView_Game.new(nil, function(num) + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == -1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1, "输入数据异常!") + end + + self.anchouValueText.text = value / 1000 + self.anchouValue = value / 1000 + end, 3, nil) + gniv:Show() + end + ) + end + + + + self._config:GetChild("people_2").onClick:Set(function() + self._config:GetController("rule").selectedIndex = 0 + end) + + local piao = self._config:GetController("piao") + local daniao = self._config:GetController("daniao") + + piao.onChanged:Add(function() + if piao.selectedIndex ~= 0 then + daniao.selectedIndex = 0 + end + end) + + daniao.onChanged:Add(function() + if daniao.selectedIndex ~= 0 then + piao.selectedIndex = 0 + end + end) end local _help_url = "ui://Info_Poker_RunFastNew/Com_help" @@ -143,35 +205,25 @@ end function M:SelectedConfigData() local _config = self._config local round = _config:GetController("round").selectedIndex - local handcard = _config:GetController("handcard").selectedIndex - local peopleNum = _config:GetController("peopleNum").selectedIndex - local showCardNum = _config:GetController("showCardNum").selectedIndex - local wanfa1_1 = _config:GetController("wanfa1_1").selectedIndex - local wanfa1_2 = _config:GetController("wanfa1_2").selectedIndex - local wanfa1_3 = _config:GetController("wanfa1_3").selectedIndex - local wanfa1_4 = _config:GetController("wanfa1_4").selectedIndex - local wanfa1_5 = _config:GetController("wanfa1_5").selectedIndex - local wanfa2_1 = _config:GetController("wanfa2_1").selectedIndex - - -- local rule = _config:GetController("rule").selectedIndex - -- local leaf = _config:GetController("play_list").selectedIndex - -- local willBeOut = _config:GetController("willBeOut").selectedIndex - -- local bombSpring = _config:GetController("bombSpring").selectedIndex - -- local heart10 = _config:GetController("heart10").selectedIndex - -- local player_num = _config:GetController("player_num").selectedIndex - -- local AA = _config:GetController("Cost").selectedIndex - -- local showlength = _config:GetController("showlength").selectedIndex - -- local fourBeltThree = _config:GetController("fourBeltThree").selectedIndex - -- local demolition = _config:GetController("demolition").selectedIndex - -- local fangzuobi = _config:GetController("fangzuobi").selectedIndex - -- local planelack = _config:GetChild("planelack").selected and 1 or 0 - -- local threelack = _config:GetChild("Threelack").selected and 1 or 0 - -- local ThreeA = _config:GetChild("ThreeA").selected and 1 or 0 - -- local piao = _config:GetController("piao").selectedIndex - -- local daniao = _config:GetController("daniao").selectedIndex - -- local sandaidan = _config:GetController("sandaidan").selectedIndex - -- local ba = _config:GetChild("boom_add").selected and 1 or 0 - -- local fs = _config:GetChild("fan_sprint").selected and 1 or 0 + local rule = _config:GetController("rule").selectedIndex + local leaf = _config:GetController("play_list").selectedIndex + local willBeOut = _config:GetController("willBeOut").selectedIndex + local bombSpring = _config:GetController("bombSpring").selectedIndex + local heart10 = _config:GetController("heart10").selectedIndex + local player_num = _config:GetController("player_num").selectedIndex + local AA = _config:GetController("Cost").selectedIndex + local showlength = _config:GetController("showlength").selectedIndex + local fourBeltThree = _config:GetController("fourBeltThree").selectedIndex + local demolition = _config:GetController("demolition").selectedIndex + local fangzuobi = _config:GetController("fangzuobi").selectedIndex + local planelack = _config:GetChild("planelack").selected and 1 or 0 + local threelack = _config:GetChild("Threelack").selected and 1 or 0 + local ThreeA = _config:GetChild("ThreeA").selected and 1 or 0 + local piao = _config:GetController("piao").selectedIndex + local daniao = _config:GetController("daniao").selectedIndex + local sandaidan = _config:GetController("sandaidan").selectedIndex + local ba = _config:GetChild("boom_add").selected and 1 or 0 + local fs = _config:GetChild("fan_sprint").selected and 1 or 0 ----- local fourDaiTwo = false @@ -192,82 +244,52 @@ function M:SelectedConfigData() ---- local _data = {} _data["account_id"] = DataManager.SelfUser.Id - -- _data["AA"] = AA - -- _data["willBeOut"] = willBeOut + 1 - -- _data["minboom"] = (willBeOut == 0 and leaf == 1 and player_num == 1) and bombSpring + 1 or 2 - -- _data["fourBeltThree"] = fourBeltThree - -- _data["demolition"] = demolition - -- _data["fangzuobi"] = fangzuobi - -- _data["threeA"] = ThreeA - -- _data["piao"] = piao - -- _data["daniao"] = daniao - -- _data["sandaidan"] = sandaidan - -- _data["ba"] = ba - -- _data["fs"] = fs + _data["opt"] = round + 1 + _data["rule"] = rule == 0 and 2 or 1 + _data["leaf"] = leaf + 1 + _data["AA"] = AA + _data["willBeOut"] = willBeOut + 1 + _data["showlength"] = showlength + _data["heartten"] = willBeOut == 0 and heart10 + 1 or 2 + _data["minboom"] = (willBeOut == 0 and leaf == 1 and player_num == 1) and bombSpring + 1 or 2 + _data["maxPlayers"] = player_num + 2 + _data["fourBeltThree"] = fourBeltThree + _data["demolition"] = demolition + _data["fangzuobi"] = fangzuobi + _data["threeA"] = ThreeA + _data["piao"] = piao + _data["daniao"] = daniao + _data["sandaidan"] = sandaidan + _data["ba"] = ba + _data["fs"] = fs _data["fourDaiTwo"] = fourDaiTwo - - -----------------------lingmeng---------------------------- - - _data["AA"] = 0 - _data["willBeOut"] = 1 - _data["minboom"] = 2 - _data["fourBeltThree"] = 0 - _data["demolition"] = 0 - _data["fangzuobi"] = 0 - _data["threeA"] = 0 - _data["piao"] = 0 - _data["daniao"] = 0 - _data["sandaidan"] = 0 - _data["ba"] = 0 - _data["fs"] = 0 + _data["fourDaiThree"] = fourDaiThree - _data["leaf"] = handcard == 0 and 2 or handcard --手牌 1是15张,2是16张 - _data["opt"] = round + 1 --局数 1是10局 2是15局 3是20局 ("未知") - _data["maxPlayers"] = peopleNum == 1 and 2 or 3 --人数 2是2人 3是三人 - _data["rule"] = wanfa1_5 == 0 and 2 or 1 --黑桃3必出 2是选择了该玩法 1是没有该玩法 - _data["showlength"] = (showCardNum + 1) % 2 --显示手牌数量 0是不显示 1是显示 - _data["planeNoBelt"] = wanfa1_1 --飞机不带 - _data["threeNoBelt"] = wanfa1_1 --三张不带 - _data["planelack"] = wanfa1_2 --飞机可少带接完 - _data["threelack"] = wanfa1_2 --三张可少带接完 - _data["fourDaiThree"] = false --四带三 false没有该玩法 true有该玩法 - if wanfa1_3 == 1 then - _data["fourDaiThree"] = true + if willBeOut == 1 then + -- body + _data["planelack"] = 0 + _data["threelack"] = 0 + else + if sandaidan == 1 then + _data["planelack"] = 0 + _data["threelack"] = 0 + else + _data["planelack"] = planelack + _data["threelack"] = threelack + end end - _data["heartten"] = wanfa1_4 + 1 --红桃扎鸟 1没有该玩法 2有该玩法 似乎说的是红桃10分数翻倍,具体要问江西那边 - _data["specilAdd"] = wanfa2_1 --特殊加分规则:只出一张加扣10分,出2-3张加扣5分 0没有该玩法 1有该玩法 - - - - - ----------------------------------------------------------- - - - -- if willBeOut == 1 then - -- -- body - -- _data["planelack"] = 0 - -- _data["threelack"] = 0 - -- else - -- if sandaidan == 1 then - -- _data["planelack"] = 0 - -- _data["threelack"] = 0 - -- else - -- _data["planelack"] = planelack - -- _data["threelack"] = threelack - -- end - -- end _data['xi_pai'] = xi_pai - local xi_pai_score = 1 - local an_chou_score = 1 + local xi_pai_score = 0 + local an_chou_score = 0 - -- if oldGameVersion == 2 then - -- xi_pai_score = self.xipaiValue - -- an_chou_score = self.anchouValue - -- end + if oldGameVersion == 2 then + xi_pai_score = self.xipaiValue + an_chou_score = self.anchouValue + end _data['xi_pai_score'] = xi_pai_score * 1000 _data['an_chou_score'] = an_chou_score * 1000 @@ -277,9 +299,9 @@ end function M:OnChangeOption(ctype, pay_obj) IGameInfo.OnChangeOption(self, ctype, pay_obj) - local peopleNum = self._config:GetController("peopleNum") - peopleNum.onChanged:Set(function() - self._maxPlayer = peopleNum.selectedIndex == 1 and 2 or 3 + local people = self._config:GetController("player_num") + people.onChanged:Set(function() + self._maxPlayer = people.selectedIndex + 2 self:ShowVariablePrice(ctype, pay_obj) end) end @@ -287,37 +309,6 @@ end function M:LoadConfigToDetail(data) local configData = json.decode(data) local returnString = string.format("人数%s人", configData.maxPlayers) - if configData.leaf then - returnString = string.format("%s,%s", returnString, configData.leaf == 1 and "十五张手牌" or "十六张手牌") - end - if configData.rule then - returnString = string.format("%s%s", returnString, - configData.rule == 1 and ",黑桃三必出" or "") - end - if configData.showlength then - -- returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸") - end - if configData.planeNoBelt then - returnString = string.format("%s%s", returnString, configData.planeNoBelt == 0 and "" or ",飞机可不带") - end - if configData.threeNoBelt then - returnString = string.format("%s%s", returnString, configData.threeNoBelt == 0 and "" or ",三张可不带") - end - if configData.planelack then - returnString = string.format("%s%s", returnString, configData.planelack == 0 and "" or ",飞机可少带") - end - if configData.threelack then - returnString = string.format("%s%s", returnString, configData.threelack == 0 and "" or ",三张可少带") - end - if configData.fourDaiThree then - returnString = string.format("%s%s", returnString, configData.fourDaiThree and "" or ",四带三") - end - if configData.heartten then - returnString = string.format("%s%s", returnString, configData.heartten == 1 and "" or ",红桃扎鸟") - end - if configData.specilAdd then - returnString = string.format("%s%s", returnString, configData.specilAdd == 0 and "" or ",特殊加分") - end return returnString end diff --git a/lua_probject/extend_project/extend/poker/runfast/EXGameInfo_jiangxi.lua b/lua_probject/extend_project/extend/poker/runfast/EXGameInfo_jiangxi.lua new file mode 100644 index 00000000..742a666f --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/EXGameInfo_jiangxi.lua @@ -0,0 +1,324 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 15:19 +--- +local EXGameInfo = {} + +local M = EXGameInfo + +local roundTable = { 10, 15, 20 } +function EXGameInfo.new(blur_view) + setmetatable(M, { __index = IGameInfo }) + local self = setmetatable({}, { __index = M }) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/poker/runfast/ui/Info_Poker_RunFastNew") + return self +end + +function M:FillData(view, index) + self._maxPlayer = 2 -- 默认玩家人数 + self._roundChoice = 5 -- 回合选项数 + + -- if oldGameVersion == 1 then + self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Label_Detail_Play") + -- else + -- self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Creat_RunFast_yueyang") + -- end + + + -- self._config:GetChild("people_2").onClick:Set(function() + -- self._config:GetController("rule").selectedIndex = 0 + -- end) + + -- local piao = self._config:GetController("piao") + -- local daniao = self._config:GetController("daniao") + + -- piao.onChanged:Add(function() + -- if piao.selectedIndex ~= 0 then + -- daniao.selectedIndex = 0 + -- end + -- end) + + -- daniao.onChanged:Add(function() + -- if daniao.selectedIndex ~= 0 then + -- piao.selectedIndex = 0 + -- end + -- end) +end + +local _help_url = "ui://Info_Poker_RunFastNew/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_RunFastNew/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_RunFastNew/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = { "15张玩法", "16张玩法" } +function M:GetPlayList() + return _play_list +end + +function M:LoadConfigData(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("rule").selectedIndex = data.rule == 2 and 0 or 1 + _config:GetController("play_list").selectedIndex = data.leaf - 1 + _config:GetController("willBeOut").selectedIndex = data.willBeOut - 1 + _config:GetController("heart10").selectedIndex = data.heartten - 1 + _config:GetController("bombSpring").selectedIndex = data.minboom - 1 + _config:GetController("player_num").selectedIndex = data.maxPlayers == 2 and 0 or 1 + _config:GetController("Cost").selectedIndex = data.AA == 0 and 0 or 1 + _config:GetController("showlength").selectedIndex = data.showlength + _config:GetController("fourBeltThree").selectedIndex = data.fourBeltThree + _config:GetController("demolition").selectedIndex = data.demolition + _config:GetController("fangzuobi").selectedIndex = data.fangzuobi + + local sandaidan = data.sandaidan + if sandaidan ~= nil and sandaidan == 1 then + _config:GetChild("sandaidan").selected = true + + _config:GetChild("planelack").selected = false + _config:GetChild("Threelack").selected = false + else + _config:GetChild("sandaidan").selected = false + + _config:GetChild("planelack").selected = data.planelack == 1 and true or false + _config:GetChild("Threelack").selected = data.threelack == 1 and true or false + end + + local fs = data.fs + if fs ~= nil and fs == 1 then + _config:GetChild("fan_sprint").selected = true + else + _config:GetChild("fan_sprint").selected = false + end + + local ba = data.ba + if ba ~= nil and ba == 1 then + _config:GetChild("boom_add").selected = true + else + _config:GetChild("boom_add").selected = false + end + + _config:GetChild("ThreeA").selected = data.threeA == 1 and true or false + + if data.piao ~= nil then + _config:GetController("piao").selectedIndex = data.piao + end + + if data.daniao ~= nil then + _config:GetController("daniao").selectedIndex = data.daniao + end + + if _config:GetChild("fourBeltThree") then + _config:GetChild("fourBeltThree").selected = data.fourDaiTwo + end + + if _config:GetChild("fourBeltTwo") then + _config:GetChild("fourBeltTwo").selected = data.fourDaiThree + end + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected = data.xi_pai + end + + + if oldGameVersion == 2 then + self.xipaiValueText.text = data.xi_pai_score / 1000 + self.xipaiValue = data.xi_pai_score / 1000 + + self.anchouValueText.text = data.an_chou_score / 1000 + self.anchouValue = data.an_chou_score / 1000 + end +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + local handcard = _config:GetController("handcard").selectedIndex + local peopleNum = _config:GetController("peopleNum").selectedIndex + local showCardNum = _config:GetController("showCardNum").selectedIndex + local wanfa1_1 = _config:GetController("wanfa1_1").selectedIndex + local wanfa1_2 = _config:GetController("wanfa1_2").selectedIndex + local wanfa1_3 = _config:GetController("wanfa1_3").selectedIndex + local wanfa1_4 = _config:GetController("wanfa1_4").selectedIndex + local wanfa1_5 = _config:GetController("wanfa1_5").selectedIndex + local wanfa2_1 = _config:GetController("wanfa2_1").selectedIndex + + -- local rule = _config:GetController("rule").selectedIndex + -- local leaf = _config:GetController("play_list").selectedIndex + -- local willBeOut = _config:GetController("willBeOut").selectedIndex + -- local bombSpring = _config:GetController("bombSpring").selectedIndex + -- local heart10 = _config:GetController("heart10").selectedIndex + -- local player_num = _config:GetController("player_num").selectedIndex + -- local AA = _config:GetController("Cost").selectedIndex + -- local showlength = _config:GetController("showlength").selectedIndex + -- local fourBeltThree = _config:GetController("fourBeltThree").selectedIndex + -- local demolition = _config:GetController("demolition").selectedIndex + -- local fangzuobi = _config:GetController("fangzuobi").selectedIndex + -- local planelack = _config:GetChild("planelack").selected and 1 or 0 + -- local threelack = _config:GetChild("Threelack").selected and 1 or 0 + -- local ThreeA = _config:GetChild("ThreeA").selected and 1 or 0 + -- local piao = _config:GetController("piao").selectedIndex + -- local daniao = _config:GetController("daniao").selectedIndex + -- local sandaidan = _config:GetController("sandaidan").selectedIndex + -- local ba = _config:GetChild("boom_add").selected and 1 or 0 + -- local fs = _config:GetChild("fan_sprint").selected and 1 or 0 + + ----- + local fourDaiTwo = false + if _config:GetChild("fourBeltThree") then + fourDaiTwo = _config:GetChild("fourBeltThree").selected + end + + local fourDaiThree = false + if _config:GetChild("fourBeltTwo") then + fourDaiThree = _config:GetChild("fourBeltTwo").selected + end + + local xi_pai = false + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + + ---- + local _data = {} + _data["account_id"] = DataManager.SelfUser.Id + -- _data["AA"] = AA + -- _data["willBeOut"] = willBeOut + 1 + -- _data["minboom"] = (willBeOut == 0 and leaf == 1 and player_num == 1) and bombSpring + 1 or 2 + -- _data["fourBeltThree"] = fourBeltThree + -- _data["demolition"] = demolition + -- _data["fangzuobi"] = fangzuobi + -- _data["threeA"] = ThreeA + -- _data["piao"] = piao + -- _data["daniao"] = daniao + -- _data["sandaidan"] = sandaidan + -- _data["ba"] = ba + -- _data["fs"] = fs + + _data["fourDaiTwo"] = fourDaiTwo + + -----------------------lingmeng---------------------------- + + _data["AA"] = 0 + _data["willBeOut"] = 1 + _data["minboom"] = 2 + _data["fourBeltThree"] = 0 + _data["demolition"] = 0 + _data["fangzuobi"] = 0 + _data["threeA"] = 0 + _data["piao"] = 0 + _data["daniao"] = 0 + _data["sandaidan"] = 0 + _data["ba"] = 0 + _data["fs"] = 0 + + + _data["leaf"] = handcard == 0 and 2 or handcard --手牌 1是15张,2是16张 + _data["opt"] = round + 1 --局数 1是10局 2是15局 3是20局 ("未知") + _data["maxPlayers"] = peopleNum == 1 and 2 or 3 --人数 2是2人 3是三人 + _data["rule"] = wanfa1_5 == 0 and 2 or 1 --黑桃3必出 2是选择了该玩法 1是没有该玩法 + _data["showlength"] = (showCardNum + 1) % 2 --显示手牌数量 0是不显示 1是显示 + _data["planeNoBelt"] = wanfa1_1 --飞机不带 + _data["threeNoBelt"] = wanfa1_1 --三张不带 + _data["planelack"] = wanfa1_2 --飞机可少带接完 + _data["threelack"] = wanfa1_2 --三张可少带接完 + _data["fourDaiThree"] = false --四带三 false没有该玩法 true有该玩法 + if wanfa1_3 == 1 then + _data["fourDaiThree"] = true + end + _data["heartten"] = wanfa1_4 + 1 --红桃扎鸟 1没有该玩法 2有该玩法 似乎说的是红桃10分数翻倍,具体要问江西那边 + _data["specilAdd"] = wanfa2_1 --特殊加分规则:只出一张加扣10分,出2-3张加扣5分 0没有该玩法 1有该玩法 + + + + + ----------------------------------------------------------- + + + -- if willBeOut == 1 then + -- -- body + -- _data["planelack"] = 0 + -- _data["threelack"] = 0 + -- else + -- if sandaidan == 1 then + -- _data["planelack"] = 0 + -- _data["threelack"] = 0 + -- else + -- _data["planelack"] = planelack + -- _data["threelack"] = threelack + -- end + -- end + + _data['xi_pai'] = xi_pai + + local xi_pai_score = 1 + local an_chou_score = 1 + + -- if oldGameVersion == 2 then + -- xi_pai_score = self.xipaiValue + -- an_chou_score = self.anchouValue + -- end + + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 + + return _data +end + +function M:OnChangeOption(ctype, pay_obj) + IGameInfo.OnChangeOption(self, ctype, pay_obj) + local peopleNum = self._config:GetController("peopleNum") + peopleNum.onChanged:Set(function() + self._maxPlayer = peopleNum.selectedIndex == 1 and 2 or 3 + self:ShowVariablePrice(ctype, pay_obj) + end) +end + +function M:LoadConfigToDetail(data) + local configData = json.decode(data) + local returnString = string.format("人数%s人", configData.maxPlayers) + if configData.leaf then + returnString = string.format("%s,%s", returnString, configData.leaf == 1 and "十五张手牌" or "十六张手牌") + end + if configData.rule then + returnString = string.format("%s%s", returnString, + configData.rule == 1 and ",黑桃三必出" or "") + end + if configData.showlength then + -- returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸") + end + if configData.planeNoBelt then + returnString = string.format("%s%s", returnString, configData.planeNoBelt == 0 and "" or ",飞机可不带") + end + if configData.threeNoBelt then + returnString = string.format("%s%s", returnString, configData.threeNoBelt == 0 and "" or ",三张可不带") + end + if configData.planelack then + returnString = string.format("%s%s", returnString, configData.planelack == 0 and "" or ",飞机可少带") + end + if configData.threelack then + returnString = string.format("%s%s", returnString, configData.threelack == 0 and "" or ",三张可少带") + end + if configData.fourDaiThree then + returnString = string.format("%s%s", returnString, configData.fourDaiThree and "" or ",四带三") + end + if configData.heartten then + returnString = string.format("%s%s", returnString, configData.heartten == 1 and "" or ",红桃扎鸟") + end + if configData.specilAdd then + returnString = string.format("%s%s", returnString, configData.specilAdd == 0 and "" or ",特殊加分") + end + return returnString +end + +return M diff --git a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView_jiangxi.lua b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView_jiangxi.lua index 957c3d72..42041326 100644 --- a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView_jiangxi.lua +++ b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView_jiangxi.lua @@ -219,7 +219,11 @@ local function getPos(my_seat, other_seat, total) return pos end -function M:UpdateFzList(fz, index, show_card, seat) +function M:UpdateFzList(fz, index, show_card) + local room = DataManager.CurrenRoom + -- local seat = (room.room_config.people_num == 2 and fz.from_seat == 2) and 2 or fz.from_seat - 1 + local seat = ViewUtil.GetPos(room.self_player.seat, fz.from_seat, room.room_config.people_num) + seat = (room.room_config.people_num == 2 and seat == 2) and 2 or seat - 1 print("lingmengUpdateFzList", fz, index, show_card, seat) local FZame = self._viewText_cardInfo['FZ_Card'] index = index or 0 @@ -255,7 +259,7 @@ function M:UpdateFzList(fz, index, show_card, seat) for i = 1, self._view_FZList.numItems do if self._view_FZList:GetChildAt(i - 1).data and self._view_FZList:GetChildAt(i - 1).data == fz.card then outCard:GetController("seat").selectedIndex = self._view_FZList:GetChildAt(i - 1):GetController( - "seat").selectedIndex + "seat").selectedIndex self._view_FZList:RemoveChildrenToPool(i - 1, i - 1) return end