397 lines
6.9 KiB
Lua
397 lines
6.9 KiB
Lua
---
|
|
--- Created by 谌建军.
|
|
--- DateTime: 2017/12/19 10:54
|
|
---
|
|
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 = "RunFast_RoomConfig"
|
|
self.config=config
|
|
self.Leaf = config.leaf
|
|
self.Rule = config.rule
|
|
self.Times = config.times
|
|
self.WillBeOut = config.willBeOut
|
|
self.Heart10 = config.heartten
|
|
self.BombSpring = config.minboom
|
|
self.AA = config.aa
|
|
self.PlayerNum = config.maxPlayers
|
|
self.showlength = config.showlength
|
|
self.fourBeltThree=config.fourBeltThree
|
|
self.demolition=config.demolition
|
|
self.fangzuobi=config.fangzuobi
|
|
self.planelack=config.planelack
|
|
self.threelack=config.threelack
|
|
self.threeA=config.threeA
|
|
self.tuoguan_active_time=config.tuoguan_active_time
|
|
self.tuoguan=config.tuoguan
|
|
self.tuoguan_result_type=config.tuoguan_result_type
|
|
self.isNonnegative=config.isNonnegative
|
|
self.sandaidan = config.sandaidan
|
|
self.isHidden = config.isHidden
|
|
self.ba = config.ba
|
|
self.fs = config.fs
|
|
|
|
if config.piao ~= nil then
|
|
self.piao = config.piao
|
|
else
|
|
self.piao = 0
|
|
end
|
|
|
|
if config.daniao ~= nil then
|
|
self.daniao = config.daniao
|
|
else
|
|
self.daniao = 0
|
|
end
|
|
|
|
if self.isNonnegative == nil then
|
|
self.isNonnegative = 0
|
|
end
|
|
self.energyTab=config.energyTab
|
|
|
|
if self.energyTab==nil then
|
|
self.energyTab=0
|
|
end
|
|
|
|
return self
|
|
end
|
|
|
|
function M:GetDes(sp)
|
|
sp = sp or " "
|
|
local str = ""
|
|
-- str = str.. self.Times.."局"..sp
|
|
str = str .. RoomConfig.GetDes(self, sp).." "
|
|
local count=1
|
|
|
|
|
|
if self.Rule == 1 then
|
|
str = str.. "方片3坐庄"
|
|
if self.config["must_first_card"]==1 then
|
|
str = str .."-必带先出牌"
|
|
end
|
|
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.. "赢家连庄"
|
|
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.WillBeOut == 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
|
|
else
|
|
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.showlength == 1 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["baodanbili"]==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
|
|
end
|
|
|
|
|
|
if self.config["two_budai_three"]==1 then
|
|
str = str .."2不连3"
|
|
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
|
|
else
|
|
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["sandai2_notdui"]==1 then
|
|
str = str .."3带2不分对和散"
|
|
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
|
|
tr = str .."3带2区分对和散"
|
|
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["Akaitou"]==1 then
|
|
str = str .."A可开头"
|
|
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 .."A不可开头"
|
|
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["threeoutlack"]==1 then
|
|
str = str .."3张可少带出完"
|
|
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["threelack"]==1 then
|
|
str = str .."3张可少带接完"
|
|
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["fouroutlack"]==1 then
|
|
str = str .."4张可少带出完"
|
|
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.piao == 0 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
|
|
elseif self.piao == 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.piao == 2 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.piao == 3 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["jifen"]==0 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
|
|
else
|
|
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
|
|
|
|
return str
|
|
end
|
|
|
|
function M:GetGameJS()
|
|
local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/gamerule")
|
|
return gamerulepanel
|
|
end
|
|
|
|
|
|
function M:GetGameSMSize()
|
|
return 467,500
|
|
end
|
|
|
|
function M:GetGameName()
|
|
return "生死赌"
|
|
end
|
|
|
|
--function M:GetIsShowCardNumber()
|
|
-- return self.ShowNumber == 1
|
|
--end
|
|
|
|
return M |