changhong/lua_probject/extend_project/extend/poker/runfast/RunFast_RoomConfig.lua

492 lines
9.6 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
--- 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.Leaf == 1 then
str = str.. "15张玩法"
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.. "16张玩法"
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.Rule == 1 then
str = str.. "第一局黑桃3先出随后赢家先出".."\n"
else
str = str.. "第一局系统随机选一张先出,随后赢家先出".."\n"
end
count=0
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.fourBeltThree == 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.fourBeltThree == 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
end
if self.Heart10 == 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
end
if self.BombSpring == 1 then
str = str.. "\n4个3 或者3个A 1个2 春天\n"
end
if self.demolition == 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.fangzuobi == 1 and self.PlayerNum==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
end
if self.sandaidan == 1 then
str = str.. "\n三张飞机带单或者对子\n"
end
if self.ba == 1 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.fs == 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
end
if self.planelack == 1 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.threelack == 1 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.threeA ==1 then
str = str.. "三张A算炸弹"
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
elseif self.piao == 1 then
str = str.. "飘123"
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.piao == 2 then
str = str.. "飘235"
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.piao == 3 then
str = str.. "飘258"
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.daniao == 1 then
str = str.. "打鸟+10"
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.daniao == 2 then
str = str.. "打鸟+20"
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.daniao == 3 then
str = str.. "打鸟+50"
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
return str
end--]]
function M:GetDes(sp)
sp = sp or " "
local str = ""
-- str = str.. self.Times.."局"..sp
str = str .. RoomConfig.GetDes(self, sp)
if self.Leaf == 1 then
str = str.. "15张玩法"..sp
else
str = str.. "16张玩法"..sp
end
if self.Rule == 1 then
str = str.. "第一局黑桃3先出随后赢家先出"..sp
else
str = str.. "第一局系统随机选一张先出,随后赢家先出"..sp
end
if self.WillBeOut == 1 then
str = str.. "能出必出"..sp
else
str = str.. "可不必出"..sp
end
if self.showlength == 1 then
str = str.. "显示剩余牌"..sp
end
if self.fourBeltThree == 3 then
str = str.. "四带三"..sp
elseif self.fourBeltThree == 2 then
str = str.. "四带二"..sp
end
if self.Heart10 == 1 then
str = str.. "红桃10分数翻倍"..sp
end
if self.BombSpring == 1 then
str = str.. "4个3 或者3个A 1个2 春天"..sp
end
if self.demolition == 1 then
str = str.. "炸弹不能拆"..sp
end
if self.fangzuobi == 1 and self.PlayerNum==3 then
str = str.. "防作弊"..sp
end
if self.sandaidan == 1 then
str = str.. "三张飞机带单或者对子"..sp
end
if self.ba == 1 then
str = str.. "炸弹分数算赢家"..sp
end
if self.fs == 1 then
str = str.. "反春天"..sp
end
if self.planelack == 1 then
str = str.. "飞机少带可接完"..sp
end
if self.threelack == 1 then
str = str.. "三张少带可接完"..sp
end
if self.threeA ==1 then
str = str.. "三张A算炸弹"..sp
end
if self.piao == 0 then
elseif self.piao == 1 then
str = str.. "飘123"..sp
elseif self.piao == 2 then
str = str.. "飘235"..sp
elseif self.piao == 3 then
str = str.. "飘258"..sp
end
if self.daniao == 1 then
str = str.. "打鸟+10"..sp
elseif self.daniao == 2 then
str = str.. "打鸟+20"..sp
elseif self.daniao == 3 then
str = str.. "打鸟+50"..sp
end
return str
end
function M:GetGameJS()
local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/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