package richblessed import ( "mongo.games.com/game/gamerule/richblessed" "mongo.games.com/game/gamesrv/base" "mongo.games.com/game/model" ) var ( ElementsParams = [][]int32{} // 十三个元素 FreeElementsParams = [][]int32{} FreeLeElementsParams = []int32{0, 0, 60, 50, 50, 60, 50, 0, 0, 0, 0, 0, 0} JACKPOTElementsParams = []int32{20, 30, 100, 150} ) // RichBlessed type RichBlessedPlayerData struct { *base.Player roomid int32 //房间ID result *richblessed.WinResult betIdx int //下注索引 betCoin int64 //下注金额 maxbetCoin int64 //下注金额 oneBetCoin int64 //单注 cpCtx model.CoinPoolCtx //水池环境 leaveTime int32 //离开时间 winCoin int64 //本局输赢 startCoin int64 //本局开始金币 freewinCoin int64 //免费游戏总输赢 JackwinCoin int64 //Jack奖励 freeTimes int32 //免费游戏 addfreeTimes int32 //新增免费游戏 gameState int //当前游戏模式 taxCoin int64 //税收 noWinTimes int //没有中奖次数 isFWinJackpot bool //是否中奖 JackMidCards []int64 //掀开位置 ///当局数值 nowFreeTimes int //当前第几轮免费游戏 winLineRate int64 //线倍率 JackPotRate int64 //获取奖池的百分比 5% 10% 15% freeWinTotalRate int64 //免费游戏赢的倍率 // winNowJackPotCoin int64 //当局奖池爆奖 winNowAllRate int64 //当局赢得倍率 //测试 isFTest int isTestIdx int isJk bool // weightPos int32 //当局权重 } func (p *RichBlessedPlayerData) init() { p.roomid = 0 p.result = new(richblessed.WinResult) } func (p *RichBlessedPlayerData) Clear() { p.gameState = richblessed.Normal p.startCoin = p.Coin p.winCoin = 0 p.taxCoin = 0 p.isFWinJackpot = false p.addfreeTimes = 0 p.result.AllRate = 0 p.JackMidCards = p.JackMidCards[:0] p.result.FreeNum = 0 p.result.JackpotEle = -1 p.result.JackpotRate = 0 if p.freeTimes == 0 { p.freewinCoin = 0 p.nowFreeTimes = 0 } p.isJk = false p.weightPos = 0 } // 正常游戏 免费游戏 func (p *RichBlessedPlayerData) TestCode(eleLineAppearRate [][]int32) { if p.isFTest%5 == 0 && p.gameState == richblessed.Normal { switch p.isTestIdx { case 0: //免费 p.result.EleValue = []int32{ 1, 1, 1, 1, 1, 6, 2, 7, 7, 9, 9, 7, 4, 8, 7, } p.isTestIdx = 1 case 1: //奖池 p.result.EleValue = []int32{ 5, 0, 0, 0, 1, 6, 2, 7, 7, 9, 9, 1, 4, 8, 7, } p.isTestIdx = 0 p.isJk = true } } else { p.result.CreateLine(eleLineAppearRate) } } func (p *RichBlessedPlayerData) CreateLevResult(eleLineAppearRate [][]int32) { p.result.CreateLevLine(eleLineAppearRate) } // 正常游戏 免费游戏 func (p *RichBlessedPlayerData) CreateJACKPOT(eleRate []int32) { p.result.CreateJACKPOT(eleRate) }