dezhou_client/lua_probject/extend_project/extend/majiang/tuitongzi/EXRoomConfig.lua

482 lines
8.0 KiB
Lua
Raw Normal View History

2025-12-17 21:08:27 +08:00
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.entrust_time=config["tuoguan"]
self.class = "RoomConfig"
self.round = config["times"]
self.mode = config["mode"]
self.tun = config["tun"]
self.fengding = config["fengding"]
self.tuanyuan = config["tuanyuan"]
self.hanghangxi = config["hanghangxi"]
self.siqi = config["siqi"]
self.shuahou = config["shuahou"]
self.huangfan = config["huangfan"]
self.jiaxingxing = config["jiaxingxing"]
self.tinghu = config["tinghu"]
self.duizifu = config["duizifu"]
self.back = config["back"]
self.yuan = config["yuan"]
self.tianhu =config["tianhu"]
self.dihu =config["dihu"]
self.haihu =config["haihu"]
self.maxPlayers = config["maxPlayers"]
self.qupai = config["qupai"]
self.isHidden = config.isHidden
self.hh = config["hh"] or 0
self.dh = config["dh"] or 0
self.hw = config["hw"] or 0
self.wh = config["wh"] or 0
self.hd = config["hd"] or 0
self.wd = config["wd"] or 0
self.jhd = config["jhd"] or 0
self.dhdf = config["dhdf"] or 0
return self
end
--[[function M:GetDes(sp)
sp = sp or " "
local count=0
local str = self.round and self.round .. "" .. " " or ""
str = str .. RoomConfig.GetDes(self, sp).."\n"
if self.config["kawai"]==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
else
tr = 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["first_rand_zhuang"] 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["zhuang_di_hu"]==0 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
else
tr = 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["hao_config"]==0 then
str = str .."豪123"
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
tr = str .."豪234"
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["hao_jiabei"]==0 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.config["hao_jiabei"]==1 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
elseif self.config["hao_jiabei"]==2 then
str = str .."低于20分加倍"
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
elseif self.config["hao_jiabei"]==3 then
str = str .."低于30分加倍"
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
elseif self.config["hao_jiabei"]==4 then
str = str .."低于40分加倍"
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
elseif self.config["hao_jiabei"]==5 then
str = str .."低于50分加倍"
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["ming_tang"]==0 then
str = str .."名堂60/80/100"
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
else
str = str .."名堂80/100/120"
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["piao"]==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.config["piao"]==1 then
str = str .."飘123"
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.config["piao"]==2 then
str = str .."飘235"
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.config["piao"]==3 then
str = str .."飘258"
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["qupai"]==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.config["piao"]==1 then
str = str .."抽10"
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.config["piao"]==2 then
str = str .."抽19"
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
return str
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.config["xuan_zhuang"]==0 then
str = str .."轮庄"
str = str ..sp
else
str = str .."胡牌庄"
str = str ..sp
end
if self.config["qing_zui_hu"]==0 then
str = str .."亲嘴0胡"
str = str ..sp
else
tr = str .."亲嘴2胡"
str = str ..sp
end
if self.config["gang_zhao_liu_xi"] then
str = str .."杠招6息"
str = str .. sp
end
if self.config["special_peng_peng_hu"] then
str = str .."碰碰胡每个字不少于2个字"
str = str .. sp
end
if self.config["piao"]==0 then
str = str .."不飘"
str = str ..sp
elseif self.config["piao"]==1 then
str = str .."热漂"
str = str ..sp
elseif self.config["piao"]==2 then
str = str .."冷飘"
str = str ..sp
elseif self.config["piao"]==3 then
str = str .."固定飘"
str = str ..sp
if self.config["piao1"] then
str = str .."飘1"
str = str ..sp
end
if self.config["piao2"] then
str = str .."飘2"
str = str ..sp
end
if self.config["piao3"] then
str = str .."飘3"
str = str ..sp
end
if self.config["piao4"] then
str = str .."飘5"
str = str ..sp
end
end
if self.config["fen_diejia"]==0 then
str = str .."叠加"
str = str ..sp
else
str = str .."不叠加"
str = str ..sp
end
return str
end
function M:GetGameName()
return self.maxPlayers .. '人福禄寿'
end
function M:GetGameJS()
local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_FuLuShou/gamerule")
return gamerulepanel
end
function M:GetGameSMSize()
return 467,500
end
return M