112 lines
2.3 KiB
Lua
112 lines
2.3 KiB
Lua
|
||
|
||
|
||
---
|
||
local M = {}
|
||
|
||
|
||
--- Create a new RoomConfig
|
||
function M.new(config)
|
||
setmetatable(M,{__index = RoomConfig})
|
||
local self = setmetatable({}, {__index = M})
|
||
RoomConfig.init(self,config)
|
||
self.config=config
|
||
self.class = "RoomConfig"
|
||
self.round = config["times"]
|
||
self.Qidui = config["qidui"]
|
||
self.QiangGang = config["qiangkong"]
|
||
self.QiangGangNiao = config["qiangkong_niao"]
|
||
self.Zhama = config["niao_opt"]
|
||
--self.Laizi = config["laizi8"]
|
||
self.NiaoType = config["niao"]
|
||
self.piao_niao = config["piao_niao"]
|
||
self.Jiangma = config["jiangma"]
|
||
self.isHidden = config.isHidden
|
||
|
||
return self
|
||
end
|
||
|
||
function M:GetDes(sp)
|
||
sp = ","
|
||
|
||
local str = "转转麻将," .. (self.config["opt"]== 1 and '单' or '8') .. "局结算" .. sp or ""
|
||
str = str .. RoomConfig.GetDes(self, sp)
|
||
|
||
|
||
|
||
-- if (self.Qidui) then
|
||
-- str = str .."可胡七对"
|
||
-- str = str .. sp
|
||
-- end
|
||
|
||
-- if (self.config.Laizi) then
|
||
-- str = str .. "有红中"
|
||
-- str = str .. sp
|
||
-- end
|
||
|
||
|
||
if (self.config.dianpao) then
|
||
str = str .. "点炮胡"
|
||
str = str .. sp
|
||
end
|
||
|
||
if (self.config.zhuangxian) then
|
||
str = str .. "庄闲算分"
|
||
str = str .. sp
|
||
end
|
||
-- if (self.config.qidui) then
|
||
-- str = str .. "可胡七对"
|
||
-- str = str .. sp
|
||
-- end
|
||
-- if (self.config.hz_hu) then
|
||
-- str = str .. "无红中可接炮"
|
||
-- str = str .. sp
|
||
-- end
|
||
|
||
-- if (self.config.bi_hu) then
|
||
-- str = str .. "必胡"
|
||
-- str = str .. sp
|
||
-- end
|
||
|
||
-- if (self.config.qianggang_dianpao) then
|
||
-- str = str .. "抢杠算点"
|
||
-- str = str .. sp
|
||
-- else
|
||
-- 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
|
||
|
||
|
||
end
|
||
|
||
-- str = str.sub(str, 1, string.len(str) - string.len(sp))
|
||
str = str .. '首局随机庄闲'.. "。"
|
||
return str
|
||
end
|
||
|
||
function M:GetGameName()
|
||
return "转转麻将"
|
||
end
|
||
|
||
function M:GetGameJS()
|
||
local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_ZhuanZhuan/gamerule")
|
||
return gamerulepanel
|
||
end
|
||
|
||
return M |