--- local M = {} --- Create a new RoomConfig function M.new(config) setmetatable(M,{__index = RoomConfig}) local self = setmetatable({}, {__index = M}) RoomConfig.init(self,config) self.class = "RoomConfig" self.config=config self.round = config["times"] self.Qidui = config["qidui"] self.QiangGang = config["qiangkong"] self.QiangGangNiao = config["qiangkong_niao"] self.Zhama = config["niao_opt"] local isOpenLaizi8=false --if config["laizi"]==3 then -- isOpenLaizi8=true --end self.Laizi = isOpenLaizi8 --是否是8个赖子 self.LaiziType=config["laizi"] self.NiaoType = config["niao"] --self.Zhamatype= config["niao_opt"] self.piao_niao = config["piao_niao"] self.Jiangma = config["jiangma"] self.isHidden = config.isHidden self.Qanggangquanbao=config["qianggang_type"] self.Gangbaoquanbao=config["gangbao_type"] self.Minggangkeqiang=config["qiangkong_ming"] self.geng_zhuan=config["geng_zhuan"] self.jiejiegao=config["jiejiegao"] self.jiejiegao_first=config["jiejiegao_first"] self.wuguijiabei=config["wuguijiabei"] self.no_wan=config["no_wan"] self.ma_gen_di_fen=config["ma_gen_di_fen"] self.ma_gen_gong=config["ma_gen_gong"] self.qidui_jiafan=config["qidui_jiafan"] return self end function M:GetDes(sp) sp = sp or " " local count=0 local firstStr=30 local str = self.round and self.round .. "局" .. " " or "" str = str .. RoomConfig.GetDes(self, sp).."\n" if (self.QiangGang) then str = str .. "抢杠胡二倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if (self.Qidui) then str = str .."七小对" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=3 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["dianpao"] then str = str .."可抢炮胡" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["pengpenghu"] then str = str .."碰碰胡二倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["hunyise"] then str = str .."混一色二倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["qingyise"] then str = str .."清一色二倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["gangshangkaihua"] then str = str .."杠上开花二倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=0 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["haohua_qidui"] then str = str .."豪华4倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["shishanyao"] then str = str .."十三幺十倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["tiandihu"] then str = str .."天地胡10倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["haohua2_qidui"] then str = str .."双豪华6倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["haohua3_qidui"] then str = str .."三豪华8倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["shibaluohan"] then str = str .."十八罗汉10倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=0 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["xiaoshanyuan"] then str = str .."小三元4倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["xiaosixi"] then str = str .."小四喜4倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["dashanyuan"] then str = str .."大三元6倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["dasixi"] then str = str .."大四喜6倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["bihu"] then str = str .."逼胡" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=4 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["guopeng"] then str = str .."过碰不碰" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["guogang"] then str = str .."过杠不杠" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["geng_zhuan"] then str = str .."跟庄" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=4 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["gangbao_type"] then str = str .."杠爆全包" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["yao_jiu"] then str = str .."幺九" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=4 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["han19"] then str = str .."含19即可" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["laizi4_hu"] then str = str .."四鬼胡牌" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["twelve_zhang_luodi_quanbao"] then str = str .."12张落地全包" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=0 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["huangzhuang_huanggang"] then str = str .."荒庄荒杠" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["liuju_2bei"] then str = str .."流居翻倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["quan_feng"] then str = str .."全风八倍" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["qiangkong_ming"] then str = str .."明杠可抢" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.config["qianggang_type"] then str = str .."抢杠全包" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if (self.LaiziType==3) then str = str .. "翻双鬼" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=3 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end elseif self.LaiziType==1 then str = str .. "白板做鬼" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end elseif self.LaiziType==2 then str = str .. "翻鬼" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=4 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end else str = str .. "无鬼" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=4 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.NiaoType==0 then str = str .. "无马" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=4 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end elseif self.NiaoType==1 then if self.Zhama==1 then str = str .. "买二马" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=3 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end elseif self.Zhama==2 then str = str .. "买四马" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=3 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end elseif self.Zhama==3 then str = str .. "买六马" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=3 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end elseif self.Zhama==4 then str = str .. "抓马" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=4 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end elseif self.NiaoType==2 then local strMB="爆炸马加分" if self.Zhama==1 then strMB="爆炸马加倍" end str = str .. strMB count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=1 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.ma_gen_di_fen then str = str .."马跟底分" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=2 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end if self.ma_gen_gong then str = str .."马跟杠" count=count+1 if count%2==0 then str = str .."\n" else sp1="" local strL=3 for i=1,strL do sp1=sp1.." " end str = str .. sp1..sp end end --if (self.piao_niao) then -- str = str .. "飘鸟" .. sp --end --[[if (self.NiaoType) then if self.NiaoType == 1 then str = str .. string.format("扎%d码", self.Zhama * 2) elseif self.NiaoType == 2 then str = str .. "一码全中" elseif self.NiaoType == 3 then str = str .. "窝窝鸟" .. sp .. (self.Zhama == 1 and "1鸟2分" or "1鸟1分") end str = str .. sp -- if self.NiaoType ~= 2 and self.Jiangma > 0 then -- str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp -- end if self.Jiangma > 0 then str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp end end--]] str = str.sub(str, 1, string.len(str) - string.len(sp)) return str end function M:GetDes2(sp) sp = sp or " " local str = RoomConfig.GetDes(self, sp) local str = self.round and self.round .. "局" .. sp or "" str = str .. RoomConfig.GetDes(self, sp) if (self.QiangGang) then str = str .. "抢杠胡2倍" str = str .. sp --if (self.QiangGangNiao) then --str = str .. "抢杠胡奖码" --str = str .. sp --end end if (self.Qidui) then str = str .."七小对" str = str .. sp end if self.config["dianpao"] then str = str .."可抢炮胡" str = str .. sp end if self.config["pengpenghu"] then str = str .."碰碰胡2倍" str = str .. sp end if self.config["hunyise"] then str = str .."混一色2倍" str = str .. sp end if self.config["qingyise"] then str = str .."清一色2倍" str = str .. sp end if self.config["gangshangkaihua"] then str = str .."杠上开花2倍" str = str .. sp end if self.config["haohua_qidui"] then str = str .."豪华4倍" str = str .. sp end if self.config["shishanyao"] then str = str .."十三幺10倍" str = str .. sp end if self.config["tiandihu"] then str = str .."天地胡10倍" str = str .. sp end if self.config["haohua2_qidui"] then str = str .."双豪华6倍" str = str .. sp end if self.config["haohua3_qidui"] then str = str .."三豪华8倍" str = str .. sp end if self.config["shibaluohan"] then str = str .."十八罗汉10倍" str = str .. sp end if self.config["xiaoshanyuan"] then str = str .."小三元4倍" str = str .. sp end if self.config["xiaosixi"] then str = str .."小四喜4倍" str = str .. sp end if self.config["dashanyuan"] then str = str .."大三元6倍" str = str .. sp end if self.config["dasixi"] then str = str .."大四喜6倍" str = str .. sp end if self.config["bihu"] then str = str .."逼胡" str = str .. sp end if self.config["guopeng"] then str = str .."过碰不碰" str = str .. sp end if self.config["guogang"] then str = str .."过杠不杠" str = str .. sp end if (self.LaiziType==3) then str = str .. "翻双鬼" str = str .. sp elseif self.LaiziType==1 then str = str .. "白板做鬼" str = str .. sp elseif self.LaiziType==2 then str = str .. "翻鬼" str = str .. sp else str = str .. "无鬼" str = str .. sp end if self.NiaoType==0 then str = str .. "无马" str = str .. sp elseif self.NiaoType==1 then if self.Zhama==1 then str = str .. "买2马" str = str .. sp elseif self.Zhama==2 then str = str .. "买4马" str = str .. sp elseif self.Zhama==3 then str = str .. "买6马" str = str .. sp elseif self.Zhama==4 then str = str .. "抓马" str = str .. sp end elseif self.NiaoType==2 then local strMB="爆炸马加分" if self.Zhama==1 then strMB="爆炸马加倍" end str = str .. strMB str = str .. sp end if self.ma_gen_di_fen then str = str .."马跟底分" str = str .. sp end if self.ma_gen_gong then str = str .."马跟杠" str = str .. sp end --if (self.piao_niao) then -- str = str .. "飘鸟" .. sp --end --[[if (self.NiaoType) then if self.NiaoType == 1 then str = str .. string.format("扎%d码", self.Zhama * 2) elseif self.NiaoType == 2 then str = str .. "一码全中" elseif self.NiaoType == 3 then str = str .. "窝窝鸟" .. sp .. (self.Zhama == 1 and "1鸟2分" or "1鸟1分") end str = str .. sp -- if self.NiaoType ~= 2 and self.Jiangma > 0 then -- str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp -- end if self.Jiangma > 0 then str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp end end--]] str = str.sub(str, 1, string.len(str) - string.len(sp)) return str end function M:GetGameJS() local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_100Zhang/gamerule") return gamerulepanel end function M:GetGameSMSize() return 467,500 end function M:GetGameName() return "100张" end return M