163 lines
3.6 KiB
Lua
163 lines
3.6 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.class = "CS_RoomConfig"
|
||
|
|
self.round = config["times"]
|
||
|
|
self.config=config
|
||
|
|
self.zhuangxian = config["zhuangxian"]
|
||
|
|
-- self.piaofen = config["piaofen"]
|
||
|
|
self.zimo = config["zimo"]
|
||
|
|
self.liuliushun = config["liuliushun"]
|
||
|
|
self.queyise = config["queyise"]
|
||
|
|
self.banbanhu = config["banbanhu"]
|
||
|
|
self.dasixi = config["dasixi"]
|
||
|
|
self.jiejiegao = config["jiejiegao"]
|
||
|
|
self.santong = config["santong"]
|
||
|
|
self.yizhihua = config["yizhihua"]
|
||
|
|
self.zhongtusixi = config["zhongtusixi"]
|
||
|
|
self.zhongtuliuliushun = config["zhongtuliuliushun"]
|
||
|
|
|
||
|
|
self.niao_type = config["niao_type"]
|
||
|
|
self.niao = config["niao"]
|
||
|
|
self.piao_niao = config["piao_niao"]
|
||
|
|
self.two_pair = config["two_pair"]
|
||
|
|
self.no_jiang = config["no_jiang"]
|
||
|
|
self.four_win = config["four_win"]
|
||
|
|
self.native_hu = config["native_hu"]
|
||
|
|
self.queyimen = config["queyimen"]
|
||
|
|
self.fengding = config["fengding"]
|
||
|
|
self.banyiquan = config["banyiquan"]
|
||
|
|
self.menqing = config["menqing"]
|
||
|
|
self.isHidden = config.isHidden
|
||
|
|
|
||
|
|
return self
|
||
|
|
end
|
||
|
|
|
||
|
|
function M:GetDes(sp)
|
||
|
|
sp = sp or " "
|
||
|
|
local str = self.round and self.round .. "局" .. sp or ""
|
||
|
|
str = str .. RoomConfig.GetDes(self, sp)
|
||
|
|
|
||
|
|
if (self.zhuangxian) then
|
||
|
|
str = str .. "庄闲(算分)"
|
||
|
|
str = str .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if (self.zimo) then
|
||
|
|
str = str .. "自摸胡"
|
||
|
|
else
|
||
|
|
str = str .. "点炮胡"
|
||
|
|
end
|
||
|
|
str = str .. sp
|
||
|
|
|
||
|
|
if self.fengding then
|
||
|
|
str = str .. "封顶" .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if self.banyiquan then
|
||
|
|
str = str .. "起手胡板一圈" .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if (self.liuliushun) then
|
||
|
|
str = str .. "六六顺"
|
||
|
|
str = str .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if (self.queyise) then
|
||
|
|
str = str .. "缺一色"
|
||
|
|
str = str .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if (self.banbanhu) then
|
||
|
|
str = str .. "板板胡"
|
||
|
|
str = str .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if (self.dasixi) then
|
||
|
|
str = str .. "大四喜"
|
||
|
|
str = str .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if (self.jiejiegao) then
|
||
|
|
str = str .. "节节高"
|
||
|
|
str = str .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if (self.santong) then
|
||
|
|
str = str .. "三同"
|
||
|
|
str = str .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if (self.yizhihua) then
|
||
|
|
str = str .. "一枝花"
|
||
|
|
str = str .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if (self.zhongtusixi) then
|
||
|
|
str = str .. "中途四喜"
|
||
|
|
str = str .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if (self.zhongtuliuliushun) then
|
||
|
|
str = str .. "中途六六顺"
|
||
|
|
str = str .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if (self.piao_niao) then
|
||
|
|
str = str .. "飘鸟" .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if self.two_pair then
|
||
|
|
str = str .. "金童玉女" .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if self.no_jiang then
|
||
|
|
str = str .. "假将胡" .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if self.four_win then
|
||
|
|
str = str .. "四连冠" .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if self.native_hu then
|
||
|
|
str = str .. "天听天胡" .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if self.queyimen then
|
||
|
|
str = str .. "缺一门" .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
if self.menqing then
|
||
|
|
str = str .. "门清" ..sp
|
||
|
|
end
|
||
|
|
|
||
|
|
str = str .. (self.niao_type == 0 and "鸟加分" or (self.niao_type == 1 and "鸟翻倍" or "长沙抓2鸟"))
|
||
|
|
str = str .. sp
|
||
|
|
|
||
|
|
if (self.niao) then
|
||
|
|
str = str .. "抓" .. self.niao .. "鸟" .. sp
|
||
|
|
end
|
||
|
|
|
||
|
|
str = str.sub(str,1,string.len(str)-string.len(sp))
|
||
|
|
return str
|
||
|
|
end
|
||
|
|
|
||
|
|
function M:GetGameName()
|
||
|
|
return "长沙麻将"
|
||
|
|
end
|
||
|
|
|
||
|
|
function M:GetGameJS()
|
||
|
|
local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChangSha/gamerule")
|
||
|
|
return gamerulepanel
|
||
|
|
end
|
||
|
|
|
||
|
|
return M
|