Compare commits
No commits in common. "bc81ecdfed3efa21367e8799c591a206b94cc393" and "03cd5dda2bdf8494a9656783062f428485a64860" have entirely different histories.
bc81ecdfed
...
03cd5dda2b
Binary file not shown.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
|
@ -156,12 +156,10 @@ func upJybUser(cjybuse, cjyb *mongo.Collection, snId, codeType int32, plt, useCo
|
||||||
if jybuser.JybInfos == nil {
|
if jybuser.JybInfos == nil {
|
||||||
jybuser.JybInfos = make(map[string]int32)
|
jybuser.JybInfos = make(map[string]int32)
|
||||||
} else if _, exist := jybuser.JybInfos[jybuseerid]; exist { // 该类型礼包玩家已经领取过
|
} else if _, exist := jybuser.JybInfos[jybuseerid]; exist { // 该类型礼包玩家已经领取过
|
||||||
if ret.CodeType != 3 {
|
return model.ErrJYBPlCode
|
||||||
return model.ErrJYBPlCode
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jybuser.JybInfos[jybuseerid]++
|
jybuser.JybInfos[jybuseerid] = 1
|
||||||
|
|
||||||
err = cjybuse.Update(bson.M{"_id": jybuser.JybUserId}, bson.D{{"$set", bson.D{{"jybinfos", jybuser.JybInfos}}}})
|
err = cjybuse.Update(bson.M{"_id": jybuser.JybUserId}, bson.D{{"$set", bson.D{{"jybinfos", jybuser.JybInfos}}}})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -39,7 +39,6 @@ const (
|
||||||
ETCDKEY_RANK_TYPE = "/game/RankType" // 排行榜奖励配置
|
ETCDKEY_RANK_TYPE = "/game/RankType" // 排行榜奖励配置
|
||||||
ETCDKEY_AWARD_CONFIG = "/game/awardlog_config" //获奖记录
|
ETCDKEY_AWARD_CONFIG = "/game/awardlog_config" //获奖记录
|
||||||
ETCDKEY_GUIDE = "/game/guide_config" //新手引导配置
|
ETCDKEY_GUIDE = "/game/guide_config" //新手引导配置
|
||||||
ETCDKEY_MACHINE = "/game/machine_config" //娃娃机配置
|
|
||||||
ETCDKEY_MatchAudience = "/game/match_audience" //比赛观众
|
ETCDKEY_MatchAudience = "/game/match_audience" //比赛观众
|
||||||
ETCDKEY_Spirit = "/game/spirit" // 小精灵配置
|
ETCDKEY_Spirit = "/game/spirit" // 小精灵配置
|
||||||
ETCDKEY_RoomType = "/game/room_type" // 房间类型配置
|
ETCDKEY_RoomType = "/game/room_type" // 房间类型配置
|
||||||
|
|
|
@ -8,53 +8,18 @@ const (
|
||||||
ClawDollSceneStateStart //开始倒计时
|
ClawDollSceneStateStart //开始倒计时
|
||||||
ClawDollSceneStatePlayGame //游戏中
|
ClawDollSceneStatePlayGame //游戏中
|
||||||
ClawDollSceneStateBilled //结算
|
ClawDollSceneStateBilled //结算
|
||||||
ClawDollSceneWaitPayCoin //等待下一局投币
|
|
||||||
ClawDollSceneStateMax
|
ClawDollSceneStateMax
|
||||||
)
|
)
|
||||||
|
|
||||||
// 玩家状态
|
|
||||||
const (
|
const (
|
||||||
ClawDollPlayerStateWait int32 = iota //等待状态
|
ClawDollSceneWaitTimeout = time.Second * 2 //等待倒计时
|
||||||
ClawDollPlayerStateStart //开始倒计时
|
ClawDollSceneStartTimeout = time.Second * 6 //开始倒计时
|
||||||
ClawDollPlayerStatePlayGame //游戏中
|
ClawDollSceneBilledTimeout = time.Second * 2 //结算
|
||||||
ClawDollPlayerStateBilled //结算
|
|
||||||
ClawDollPlayerWaitPayCoin //等待下一局投币
|
|
||||||
ClawDollPlayerStateMax
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ClawDollSceneWaitTimeout = time.Second * 6 //等待倒计时
|
|
||||||
ClawDollSceneStartTimeout = time.Second * 1 //开始倒计时
|
|
||||||
ClawDollScenePlayTimeout = time.Second * 30 //娃娃机下抓倒计时
|
|
||||||
ClawDollSceneBilledTimeout = time.Second * 2 //结算
|
|
||||||
ClawDollSceneWaitPayCoinimeout = time.Second * 10 //等待下一局投币
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// 玩家操作
|
// 玩家操作
|
||||||
const (
|
const (
|
||||||
ClawDollPlayerOpPayCoin = iota + 1 // 上分 投币
|
ClawDollPlayerOpScore = iota + 1 // 上分
|
||||||
ClawDollPlayerOpGo // 下抓
|
ClawDollPlayerOpGo // 下抓
|
||||||
ClawDollPlayerOpMove // 玩家操控动作 // 1-前 2-后 3-左 4-右
|
ClawDollPlayerOpMove // 移动方向
|
||||||
ClawDollPlayerCancelPayCoin // 取消投币
|
|
||||||
)
|
|
||||||
|
|
||||||
// 1-前 2-后 3-左 4-右 5-投币
|
|
||||||
const (
|
|
||||||
ButtonFront = iota + 1 /*前*/
|
|
||||||
ButtonBack /*后*/
|
|
||||||
ButtonLeft /*左*/
|
|
||||||
ButtonRight /*右*/
|
|
||||||
ButtonPayCoin /*投币*/
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
MoveStop = 0 /*移动停止*/
|
|
||||||
MoveStar = 1 /*移动开始*/
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ClawWeak = iota + 1 //弱力抓
|
|
||||||
ClawStrong //强力抓
|
|
||||||
ClawGain //必出抓
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,221 +0,0 @@
|
||||||
package clawdoll
|
|
||||||
|
|
||||||
// queue队列容器包
|
|
||||||
// 以动态数组的形式实现
|
|
||||||
// 该容器可以在尾部实现线性增加元素,在首部实现线性减少元素
|
|
||||||
// 队列的扩容和缩容同vector一样,即数组小采用翻倍扩缩容/折半缩容,数组大时采用固定扩/缩容
|
|
||||||
// 该容器满足FIFO的先进先出模式
|
|
||||||
// 可接纳不同类型的元素
|
|
||||||
|
|
||||||
// queue队列结构体
|
|
||||||
// 包含泛型切片和该切片的首尾位的下标
|
|
||||||
// 当删除节点时仅仅需要后移首位一位即可
|
|
||||||
// 当剩余长度较小时采用缩容策略进行缩容以释放空间
|
|
||||||
// 当添加节点时若未占满全部已分配空间则尾指针后移一位同时进行覆盖存放
|
|
||||||
// 当添加节点时尾指针大于已分配空间长度,则先去掉首部多出来的空间,如果还不足则进行扩容
|
|
||||||
// 首节点指针始终不能超过尾节点指针
|
|
||||||
type Queue struct {
|
|
||||||
data []interface{} //泛型切片
|
|
||||||
begin uint64 //首节点下标
|
|
||||||
end uint64 //尾节点下标
|
|
||||||
cap uint64 //容量
|
|
||||||
}
|
|
||||||
|
|
||||||
//queue队列容器接口
|
|
||||||
//存放了queue容器可使用的函数
|
|
||||||
//对应函数介绍见下方
|
|
||||||
|
|
||||||
type queuer interface {
|
|
||||||
Size() (size uint64) //返回该队列中元素的使用空间大小
|
|
||||||
Clear() //清空该队列
|
|
||||||
Empty() (b bool) //判断该队列是否为空
|
|
||||||
Push(e interface{}) //将元素e添加到该队列末尾
|
|
||||||
Pop() (e interface{}) //将该队列首元素弹出并返回
|
|
||||||
Front() (e interface{}) //获取该队列首元素
|
|
||||||
Back() (e interface{}) //获取该队列尾元素
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新建一个queue队列容器并返回
|
|
||||||
// 初始queue的切片数组为空
|
|
||||||
// 初始queue的首尾指针均置零
|
|
||||||
//
|
|
||||||
// @receiver nil
|
|
||||||
// @param nil
|
|
||||||
// @return q *Queue 新建的queue指针
|
|
||||||
func New() (q *Queue) {
|
|
||||||
return &Queue{
|
|
||||||
data: make([]interface{}, 1, 1),
|
|
||||||
begin: 0,
|
|
||||||
end: 0,
|
|
||||||
cap: 1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 返回该容器当前含有元素的数量
|
|
||||||
// 该长度并非实际占用空间数量
|
|
||||||
// 若容器为空则返回0
|
|
||||||
//
|
|
||||||
// @receiver q *Queue 接受者queue的指针
|
|
||||||
// @param nil
|
|
||||||
// @return size uint64 容器中实际使用元素所占空间大小
|
|
||||||
func (q *Queue) Size() (size uint64) {
|
|
||||||
if q == nil {
|
|
||||||
q = New()
|
|
||||||
}
|
|
||||||
return q.end - q.begin
|
|
||||||
}
|
|
||||||
|
|
||||||
// 以queue队列容器做接收者
|
|
||||||
// 将该容器中所承载的元素清空
|
|
||||||
// 将该容器的首尾指针均置0,容量设为1
|
|
||||||
//
|
|
||||||
// @receiver q *Queue 接受者queue的指针
|
|
||||||
// @param nil
|
|
||||||
// @return nil
|
|
||||||
func (q *Queue) Clear() {
|
|
||||||
if q == nil {
|
|
||||||
q = New()
|
|
||||||
}
|
|
||||||
|
|
||||||
q.data = make([]interface{}, 1, 1)
|
|
||||||
q.begin = 0
|
|
||||||
q.end = 0
|
|
||||||
q.cap = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
// 判断该queue队列容器是否含有元素
|
|
||||||
// 如果含有元素则不为空,返回false
|
|
||||||
// 如果不含有元素则说明为空,返回true
|
|
||||||
// 如果容器不存在,返回true
|
|
||||||
// 该判断过程通过首尾指针数值进行判断
|
|
||||||
// 当尾指针数值等于首指针时说明不含有元素
|
|
||||||
// 当尾指针数值大于首指针时说明含有元素
|
|
||||||
//
|
|
||||||
// @receiver q *Queue 接受者queue的指针
|
|
||||||
// @param nil
|
|
||||||
// @return b bool 该容器是空的吗?
|
|
||||||
func (q *Queue) Empty() (b bool) {
|
|
||||||
if q == nil {
|
|
||||||
q = New()
|
|
||||||
}
|
|
||||||
return q.Size() <= 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// 在容器尾部插入元素
|
|
||||||
// 若尾指针小于切片实际使用长度,则对当前指针位置进行覆盖,同时尾下标后移一位
|
|
||||||
// 若尾指针等于切片实际使用长度,则对实际使用量和实际占用量进行判断
|
|
||||||
// 当首部还有冗余时则删将实际使用整体前移到首部,否则对尾部进行扩容即可
|
|
||||||
//
|
|
||||||
// @receiver q *Queue 接受者queue的指针
|
|
||||||
// @param e interface{} 待插入元素
|
|
||||||
// @return nil
|
|
||||||
func (q *Queue) Push(e interface{}) {
|
|
||||||
if q == nil {
|
|
||||||
q = New()
|
|
||||||
}
|
|
||||||
|
|
||||||
if q.end < q.cap {
|
|
||||||
//不需要扩容
|
|
||||||
q.data[q.end] = e
|
|
||||||
} else {
|
|
||||||
//需要扩容
|
|
||||||
if q.begin > 0 {
|
|
||||||
//首部有冗余,整体前移
|
|
||||||
for i := uint64(0); i < q.end-q.begin; i++ {
|
|
||||||
q.data[i] = q.data[i+q.begin]
|
|
||||||
}
|
|
||||||
q.end -= q.begin
|
|
||||||
q.begin = 0
|
|
||||||
} else {
|
|
||||||
//冗余不足,需要扩容
|
|
||||||
if q.cap <= 65536 {
|
|
||||||
//容量翻倍
|
|
||||||
if q.cap == 0 {
|
|
||||||
q.cap = 1
|
|
||||||
}
|
|
||||||
q.cap *= 2
|
|
||||||
} else {
|
|
||||||
//容量增加2^16
|
|
||||||
q.cap += 2 ^ 16
|
|
||||||
}
|
|
||||||
//复制扩容前的元素
|
|
||||||
tmp := make([]interface{}, q.cap, q.cap)
|
|
||||||
copy(tmp, q.data)
|
|
||||||
q.data = tmp
|
|
||||||
}
|
|
||||||
q.data[q.end] = e
|
|
||||||
}
|
|
||||||
q.end++
|
|
||||||
}
|
|
||||||
|
|
||||||
// 弹出容器第一个元素,同时首下标后移一位
|
|
||||||
// 若容器为空,则不进行弹出
|
|
||||||
// 弹出结束后,进行缩容判断,考虑到queue的冗余会存在于前后两个方向
|
|
||||||
// 所以需要对前后两方分别做判断, 但由于首部主要是减少,并不会增加,所以不需要太多冗余量,而尾部只做添加,所以需要更多的冗余
|
|
||||||
// 所以可以对首部预留2^10的冗余,当超过时直接对首部冗余清除即可,释放首部空间时尾部空间仍然保留不变
|
|
||||||
// 当首部冗余不足2^10时,但冗余超过实际使用空间,也会对首部进行缩容,尾部不变
|
|
||||||
// 同时返回队首元素
|
|
||||||
//
|
|
||||||
// @receiver q *Queue 接受者queue的指针
|
|
||||||
// @param nil
|
|
||||||
// @return e interface{} 队首元素
|
|
||||||
func (q *Queue) Pop() (e interface{}) {
|
|
||||||
if q == nil {
|
|
||||||
q = New()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if q.Empty() {
|
|
||||||
q.Clear()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
e = q.data[q.begin]
|
|
||||||
q.begin++
|
|
||||||
if q.begin >= 1024 || q.begin*2 > q.end {
|
|
||||||
//首部冗余超过2^10或首部冗余超过实际使用
|
|
||||||
q.cap -= q.begin
|
|
||||||
q.end -= q.begin
|
|
||||||
tmp := make([]interface{}, q.cap, q.cap)
|
|
||||||
copy(tmp, q.data[q.begin:])
|
|
||||||
q.data = tmp
|
|
||||||
q.begin = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
return e
|
|
||||||
}
|
|
||||||
|
|
||||||
// 返回该容器的第一个元素
|
|
||||||
// 若该容器当前为空,则返回nil
|
|
||||||
//
|
|
||||||
// @receiver q *Queue 接受者queue的指针
|
|
||||||
// @param nil
|
|
||||||
// @return e interface{} 容器的第一个元素
|
|
||||||
func (q *Queue) Front() (e interface{}) {
|
|
||||||
if q == nil {
|
|
||||||
q = New()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if q.Empty() {
|
|
||||||
q.Clear()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return q.data[q.begin]
|
|
||||||
}
|
|
||||||
|
|
||||||
// 返回该容器的最后一个元素
|
|
||||||
// 若该容器当前为空,则返回nil
|
|
||||||
//
|
|
||||||
// @receiver q *Queue 接受者queue的指针
|
|
||||||
// @param nil
|
|
||||||
// @return e interface{} 容器的最后一个元素
|
|
||||||
func (q *Queue) Back() (e interface{}) {
|
|
||||||
if q == nil {
|
|
||||||
q = New()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if q.Empty() {
|
|
||||||
q.Clear()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return q.data[q.end-1]
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
package fortunedragon
|
|
||||||
|
|
||||||
// 房间类型
|
|
||||||
const (
|
|
||||||
RoomMode_Classic int = iota //经典
|
|
||||||
RoomMode_Max
|
|
||||||
)
|
|
||||||
|
|
||||||
// 场景状态
|
|
||||||
const (
|
|
||||||
FortuneDragonStateStart int = iota //默认状态
|
|
||||||
FortuneDragonStateMax
|
|
||||||
)
|
|
||||||
|
|
||||||
// 玩家操作
|
|
||||||
const (
|
|
||||||
FortuneDragonPlayerOpStart int = iota
|
|
||||||
FortuneDragonPlayerOpSwitch
|
|
||||||
)
|
|
||||||
const NowByte int64 = 10000
|
|
|
@ -1,359 +0,0 @@
|
||||||
package fortunedragon
|
|
||||||
|
|
||||||
func (w *WinResult) Init() {
|
|
||||||
w.EleValue = make([]int32, 15)
|
|
||||||
w.WinLine = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玛丽游戏
|
|
||||||
func (w *WinResult) InitMary() {
|
|
||||||
w.MaryOutSide = -1
|
|
||||||
w.MaryMidArray = nil
|
|
||||||
w.MaryOutRate = 0
|
|
||||||
w.MaryMidRate = 0
|
|
||||||
w.MaryLianXu = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// 正常游戏 免费游戏
|
|
||||||
func (w *WinResult) CreateLine(ele [][]int32, free bool) {
|
|
||||||
w.Init()
|
|
||||||
w.result(ele, free)
|
|
||||||
//Print(w.EleValue)
|
|
||||||
}
|
|
||||||
func (w *WinResult) Win() {
|
|
||||||
w.getWinLine()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玛丽游戏
|
|
||||||
func (w *WinResult) CreateMary(maryGame [][]int32) {
|
|
||||||
w.InitMary()
|
|
||||||
w.MaryOutSide = RandSliceInt32IndexByWightN(maryGame[0])
|
|
||||||
for i := 0; i < 4; i++ {
|
|
||||||
ele := RandSliceInt32IndexByWightN(maryGame[1])
|
|
||||||
w.MaryMidArray = append(w.MaryMidArray, ele)
|
|
||||||
}
|
|
||||||
//fmt.Println("外圈元素", w.MaryOutSide)
|
|
||||||
//fmt.Println("内圈元素", w.MaryMidArray)
|
|
||||||
w.MaryWin()
|
|
||||||
}
|
|
||||||
func (w *WinResult) MaryWin() {
|
|
||||||
var outRate int64
|
|
||||||
switch w.MaryOutSide {
|
|
||||||
case Watermelon:
|
|
||||||
outRate += 200
|
|
||||||
case Grape:
|
|
||||||
outRate += 100
|
|
||||||
case Lemon:
|
|
||||||
outRate += 70
|
|
||||||
case Cherry:
|
|
||||||
outRate += 50
|
|
||||||
case Banana:
|
|
||||||
outRate += 20
|
|
||||||
case Apple:
|
|
||||||
outRate += 10
|
|
||||||
case Pineapple:
|
|
||||||
outRate += 5
|
|
||||||
}
|
|
||||||
var flag = w.MaryMidArray[0]
|
|
||||||
var n int32
|
|
||||||
for _, v := range w.MaryMidArray {
|
|
||||||
if flag != v {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
n++
|
|
||||||
}
|
|
||||||
for _, v := range w.MaryMidArray {
|
|
||||||
if w.MaryOutSide == v {
|
|
||||||
w.MaryOutRate = outRate
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if n >= 3 {
|
|
||||||
if n == 3 {
|
|
||||||
w.MaryMidRate = 20
|
|
||||||
} else if n == 4 {
|
|
||||||
w.MaryMidRate = 500
|
|
||||||
}
|
|
||||||
w.MaryLianXu = n
|
|
||||||
}
|
|
||||||
//fmt.Println("外圈倍率:", w.MaryOutRate)
|
|
||||||
//fmt.Println("内圈倍率", w.MaryMidRate)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (w *WinResult) result(ele [][]int32, free bool) {
|
|
||||||
sl1 := make(map[int]bool)
|
|
||||||
sl2 := make(map[int]bool)
|
|
||||||
sl3 := make(map[int]bool)
|
|
||||||
n := 0
|
|
||||||
for i := 0; i < Column; i++ {
|
|
||||||
for j := 0; j < Row; j++ {
|
|
||||||
val := RandSliceInt32IndexByWightN(ele[j])
|
|
||||||
if val == Scatter {
|
|
||||||
if !sl1[j] {
|
|
||||||
sl1[j] = true
|
|
||||||
} else {
|
|
||||||
noScatter := make([]int32, len(ele[j]))
|
|
||||||
copy(noScatter, ele[j])
|
|
||||||
noScatter[Scatter] = 0
|
|
||||||
noScatter[Bonus] = 0
|
|
||||||
noScatter[Wild] = 0
|
|
||||||
val = RandSliceInt32IndexByWightN(noScatter)
|
|
||||||
}
|
|
||||||
} else if val == Bonus {
|
|
||||||
if !sl2[j] {
|
|
||||||
sl2[j] = true
|
|
||||||
} else {
|
|
||||||
noBonus := make([]int32, len(ele[j]))
|
|
||||||
copy(noBonus, ele[j])
|
|
||||||
noBonus[Scatter] = 0
|
|
||||||
noBonus[Bonus] = 0
|
|
||||||
noBonus[Wild] = 0
|
|
||||||
val = RandSliceInt32IndexByWightN(noBonus)
|
|
||||||
}
|
|
||||||
} else if val == Wild {
|
|
||||||
if !sl3[j] {
|
|
||||||
sl3[j] = true
|
|
||||||
} else {
|
|
||||||
noWild := make([]int32, len(ele[j]))
|
|
||||||
copy(noWild, ele[j])
|
|
||||||
noWild[Scatter] = 0
|
|
||||||
noWild[Bonus] = 0
|
|
||||||
noWild[Wild] = 0
|
|
||||||
val = RandSliceInt32IndexByWightN(noWild)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
w.EleValue[n] = val
|
|
||||||
n++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if free {
|
|
||||||
//免费 不中 玛丽游戏和奖池
|
|
||||||
eleVal := make([]int32, len(w.EleValue))
|
|
||||||
copy(eleVal, w.EleValue)
|
|
||||||
var wls WinResult
|
|
||||||
wls.Init()
|
|
||||||
wls.EleValue = eleVal
|
|
||||||
wls.Win()
|
|
||||||
for _, v := range wls.WinLine {
|
|
||||||
flag := v.Lines[0]
|
|
||||||
if flag == Scatter {
|
|
||||||
noScatter := make([]int32, len(ele[2]))
|
|
||||||
copy(noScatter, ele[2])
|
|
||||||
noScatter[Wild] = 0
|
|
||||||
noScatter[Scatter] = 0
|
|
||||||
vv := RandSliceInt32IndexByWightN(noScatter)
|
|
||||||
w.EleValue[v.Poss[2]] = vv
|
|
||||||
} else {
|
|
||||||
wildNum := 0
|
|
||||||
for _, el := range v.Lines {
|
|
||||||
if el == Wild {
|
|
||||||
wildNum++
|
|
||||||
} else {
|
|
||||||
wildNum = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if wildNum >= 3 {
|
|
||||||
noWild := make([]int32, len(ele[2]))
|
|
||||||
copy(noWild, ele[2])
|
|
||||||
noWild[Wild] = 0
|
|
||||||
noWild[Scatter] = 0
|
|
||||||
w.EleValue[v.Poss[2]] = RandSliceInt32IndexByWightN(noWild)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (w *WinResult) getWinLine() {
|
|
||||||
n := 0
|
|
||||||
var flag int32 = -1
|
|
||||||
for k, cols := range LineWinNum {
|
|
||||||
flag = w.EleValue[cols[0]]
|
|
||||||
//Bonus Scatter 不参与线数 Bonus下班单独计算
|
|
||||||
if flag == Bonus || flag == Scatter {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
var line []int32
|
|
||||||
var pos []int32
|
|
||||||
for _, key := range cols {
|
|
||||||
//不计算 Bonus
|
|
||||||
if (flag == w.EleValue[key] || Wild == w.EleValue[key] || flag == Wild) && w.EleValue[key] != Bonus &&
|
|
||||||
w.EleValue[key] != Scatter {
|
|
||||||
if Wild != w.EleValue[key] {
|
|
||||||
flag = w.EleValue[key]
|
|
||||||
}
|
|
||||||
n++
|
|
||||||
line = append(line, w.EleValue[key])
|
|
||||||
pos = append(pos, int32(key))
|
|
||||||
} else {
|
|
||||||
if n >= 3 || (flag == Banana && n >= 2) {
|
|
||||||
w.WinLine = append(w.WinLine, WinLine{
|
|
||||||
Lines: line,
|
|
||||||
Poss: pos,
|
|
||||||
LineId: k + 1,
|
|
||||||
Rate: GetRate(flag, n),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
n = 0
|
|
||||||
pos = nil
|
|
||||||
line = nil
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if n == 5 {
|
|
||||||
w.WinLine = append(w.WinLine, WinLine{
|
|
||||||
Lines: line,
|
|
||||||
Poss: pos,
|
|
||||||
LineId: k + 1,
|
|
||||||
Rate: GetRate(flag, n),
|
|
||||||
})
|
|
||||||
n = 0
|
|
||||||
pos = nil
|
|
||||||
line = nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
w.getBonusAndScatter()
|
|
||||||
|
|
||||||
//test code
|
|
||||||
//if len(w.WinLine) > 0 {
|
|
||||||
// fmt.Println("====== 赢的总线数 =======", len(w.WinLine))
|
|
||||||
// for k, v := range w.WinLine {
|
|
||||||
// fmt.Print(k+1, " ")
|
|
||||||
// PrintWin(v.Lines)
|
|
||||||
// fmt.Println(k+1, "位置 ", v.Poss, " 中奖线号:", v.LineId, " 线元素:", v.Lines, " 倍率:", v.Rate)
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
func (w *WinResult) getBonusAndScatter() {
|
|
||||||
//只计算Bonus和Scatter
|
|
||||||
for k, cols := range LineWinNum {
|
|
||||||
var n int
|
|
||||||
var line []int32
|
|
||||||
var pos []int32
|
|
||||||
for l, key := range cols {
|
|
||||||
if w.EleValue[key] == Bonus {
|
|
||||||
n++
|
|
||||||
line = append(line, w.EleValue[key])
|
|
||||||
pos = append(pos, int32(key))
|
|
||||||
} else {
|
|
||||||
if n >= 3 {
|
|
||||||
w.WinLine = append(w.WinLine, WinLine{
|
|
||||||
Lines: line,
|
|
||||||
Poss: pos,
|
|
||||||
LineId: k + 1,
|
|
||||||
Rate: GetRate(Bonus, n),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
n = 0
|
|
||||||
pos = nil
|
|
||||||
line = nil
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if l == 4 {
|
|
||||||
if n >= 3 {
|
|
||||||
w.WinLine = append(w.WinLine, WinLine{
|
|
||||||
Lines: line,
|
|
||||||
Poss: pos,
|
|
||||||
LineId: k + 1,
|
|
||||||
Rate: GetRate(Bonus, n),
|
|
||||||
})
|
|
||||||
n = 0
|
|
||||||
pos = nil
|
|
||||||
line = nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
n = 0
|
|
||||||
pos = nil
|
|
||||||
line = nil
|
|
||||||
for l, key := range cols {
|
|
||||||
if w.EleValue[key] == Scatter {
|
|
||||||
n++
|
|
||||||
line = append(line, w.EleValue[key])
|
|
||||||
pos = append(pos, int32(key))
|
|
||||||
} else {
|
|
||||||
if n >= 3 {
|
|
||||||
w.WinLine = append(w.WinLine, WinLine{
|
|
||||||
Lines: line,
|
|
||||||
Poss: pos,
|
|
||||||
LineId: k + 1,
|
|
||||||
Rate: GetRate(Scatter, n),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
n = 0
|
|
||||||
pos = nil
|
|
||||||
line = nil
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if l == 4 {
|
|
||||||
if n >= 3 {
|
|
||||||
w.WinLine = append(w.WinLine, WinLine{
|
|
||||||
Lines: line,
|
|
||||||
Poss: pos,
|
|
||||||
LineId: k + 1,
|
|
||||||
Rate: GetRate(Scatter, n),
|
|
||||||
})
|
|
||||||
n = 0
|
|
||||||
pos = nil
|
|
||||||
line = nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
n = 0
|
|
||||||
pos = nil
|
|
||||||
line = nil
|
|
||||||
for l, key := range cols {
|
|
||||||
if w.EleValue[key] == Wild {
|
|
||||||
n++
|
|
||||||
line = append(line, w.EleValue[key])
|
|
||||||
pos = append(pos, int32(key))
|
|
||||||
} else {
|
|
||||||
if n >= 3 {
|
|
||||||
isHave := false
|
|
||||||
for _, i2 := range w.WinLine {
|
|
||||||
if i2.LineId == k+1 {
|
|
||||||
isHave = true
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !isHave {
|
|
||||||
w.WinLine = append(w.WinLine, WinLine{
|
|
||||||
Lines: line,
|
|
||||||
Poss: pos,
|
|
||||||
LineId: k + 1,
|
|
||||||
Rate: GetRate(Wild, n),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
n = 0
|
|
||||||
pos = nil
|
|
||||||
line = nil
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if l == 4 {
|
|
||||||
if n >= 3 {
|
|
||||||
isHave := false
|
|
||||||
for _, i2 := range w.WinLine {
|
|
||||||
if i2.LineId == k+1 {
|
|
||||||
isHave = true
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !isHave {
|
|
||||||
w.WinLine = append(w.WinLine, WinLine{
|
|
||||||
Lines: line,
|
|
||||||
Poss: pos,
|
|
||||||
LineId: k + 1,
|
|
||||||
Rate: GetRate(Wild, n),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
n = 0
|
|
||||||
pos = nil
|
|
||||||
line = nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,215 +0,0 @@
|
||||||
package fortunedragon
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"math/rand"
|
|
||||||
"strconv"
|
|
||||||
)
|
|
||||||
|
|
||||||
func GetLineEleVal(gameState int, needRate int64, eleLineAppearRate [][]int32, isLow bool) (WinResult, []int, [][]int32) {
|
|
||||||
var preInt [][]int32
|
|
||||||
for i := 0; i < 1000; i++ {
|
|
||||||
var wls WinResult
|
|
||||||
wls.CreateLine(eleLineAppearRate, false)
|
|
||||||
wls.Win()
|
|
||||||
var rate int64
|
|
||||||
var bonusNum int
|
|
||||||
var wildNum int
|
|
||||||
for _, v := range wls.WinLine {
|
|
||||||
if len(v.Lines) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
rate += v.Rate
|
|
||||||
if v.Lines[0] == Bonus {
|
|
||||||
bonusNum += len(v.Lines)
|
|
||||||
} else if v.Lines[0] == Wild {
|
|
||||||
wildNum += len(v.Lines)
|
|
||||||
}
|
|
||||||
NowWildNum := 0
|
|
||||||
for _, l := range v.Lines {
|
|
||||||
if l != Wild && NowWildNum > 0 {
|
|
||||||
if NowWildNum < 3 {
|
|
||||||
NowWildNum = 0
|
|
||||||
}
|
|
||||||
} else if l == Wild {
|
|
||||||
NowWildNum++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if NowWildNum >= 3 {
|
|
||||||
wildNum += NowWildNum
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//fmt.Printf("%v || rate %v", wls.EleValue, rate)
|
|
||||||
//fmt.Println()
|
|
||||||
var n int64 = 5
|
|
||||||
if gameState == FreeGame {
|
|
||||||
n = 50
|
|
||||||
}
|
|
||||||
if wildNum >= 3 || bonusNum >= 3 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if isLow {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if rate >= needRate-n && rate <= needRate+n {
|
|
||||||
var poss []int32
|
|
||||||
for _, v := range wls.WinLine {
|
|
||||||
poss = append(poss, v.Poss...)
|
|
||||||
}
|
|
||||||
var noPoss []int
|
|
||||||
for k := range wls.EleValue {
|
|
||||||
isF := false
|
|
||||||
for _, pn := range poss {
|
|
||||||
if k == int(pn) {
|
|
||||||
isF = true
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !isF {
|
|
||||||
noPoss = append(noPoss, k)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//fmt.Println("...........find rate: ", rate, " 第 ", i+1, " 次.")
|
|
||||||
return wls, noPoss, nil
|
|
||||||
}
|
|
||||||
if rate != 0 && rate < 50 && len(preInt) < 10 {
|
|
||||||
preInt = append(preInt, wls.EleValue)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return WinResult{}, nil, preInt
|
|
||||||
}
|
|
||||||
func GetLinePos(lineId int) []int {
|
|
||||||
if lineId <= 9 || lineId >= 1 {
|
|
||||||
return LineWinNum[lineId-1]
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func GetRate(ele int32, num int) int64 {
|
|
||||||
if data, ok := EleNumRate[ele]; ok {
|
|
||||||
if r, ok2 := data[num]; ok2 {
|
|
||||||
return r
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
func RandSliceInt32IndexByWightN(s1 []int32) int32 {
|
|
||||||
total := 0
|
|
||||||
for _, v := range s1 {
|
|
||||||
total += int(v)
|
|
||||||
}
|
|
||||||
if total <= 0 {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
random := rand.Intn(total)
|
|
||||||
total = 0
|
|
||||||
for i, v := range s1 {
|
|
||||||
total += int(v)
|
|
||||||
if random < total {
|
|
||||||
return int32(i)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
func PrintFruit(idx int32) (str string) {
|
|
||||||
switch idx {
|
|
||||||
case Wild:
|
|
||||||
str += "Wild"
|
|
||||||
case Bonus:
|
|
||||||
str += "Bonus"
|
|
||||||
case Scatter:
|
|
||||||
str += "SCATTER"
|
|
||||||
case Bar:
|
|
||||||
str += "Bar"
|
|
||||||
case Cherry:
|
|
||||||
str += "樱桃"
|
|
||||||
case Bell:
|
|
||||||
str += "铃铛"
|
|
||||||
case Pineapple:
|
|
||||||
str += "菠萝"
|
|
||||||
case Grape:
|
|
||||||
str += "葡萄"
|
|
||||||
case Lemon:
|
|
||||||
str += "柠檬"
|
|
||||||
case Watermelon:
|
|
||||||
str += "西瓜"
|
|
||||||
case Banana:
|
|
||||||
str += "香蕉"
|
|
||||||
case Apple:
|
|
||||||
str += "苹果"
|
|
||||||
case Bomb:
|
|
||||||
str += "炸弹"
|
|
||||||
}
|
|
||||||
return str
|
|
||||||
}
|
|
||||||
|
|
||||||
func Print(res []int32) {
|
|
||||||
fmt.Println(res, len(res))
|
|
||||||
str := ""
|
|
||||||
for k, ele := range res {
|
|
||||||
switch ele {
|
|
||||||
case Wild:
|
|
||||||
str += "Wild,"
|
|
||||||
case Bonus:
|
|
||||||
str += "Bonus,"
|
|
||||||
case Scatter:
|
|
||||||
str += "Scatter,"
|
|
||||||
case Bar:
|
|
||||||
str += "Bar,"
|
|
||||||
case Cherry:
|
|
||||||
str += "樱桃,"
|
|
||||||
case Bell:
|
|
||||||
str += "铃铛,"
|
|
||||||
case Pineapple:
|
|
||||||
str += "菠萝,"
|
|
||||||
case Grape:
|
|
||||||
str += "葡萄,"
|
|
||||||
case Lemon:
|
|
||||||
str += "柠檬,"
|
|
||||||
case Watermelon:
|
|
||||||
str += "西瓜,"
|
|
||||||
case Apple:
|
|
||||||
str += "苹果,"
|
|
||||||
case Banana:
|
|
||||||
str += "香蕉,"
|
|
||||||
}
|
|
||||||
if (k+1)%5 == 0 {
|
|
||||||
fmt.Println("第", strconv.Itoa((k+1)/5), "行 ", str)
|
|
||||||
str = ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func PrintWin(lines []int32) {
|
|
||||||
str := ""
|
|
||||||
for _, ele := range lines {
|
|
||||||
switch ele {
|
|
||||||
case Wild:
|
|
||||||
str += "Wild,"
|
|
||||||
case Bonus:
|
|
||||||
str += "Bonus,"
|
|
||||||
case Scatter:
|
|
||||||
str += "Scatter,"
|
|
||||||
case Bar:
|
|
||||||
str += "Bar,"
|
|
||||||
case Cherry:
|
|
||||||
str += "樱桃,"
|
|
||||||
case Bell:
|
|
||||||
str += "铃铛,"
|
|
||||||
case Pineapple:
|
|
||||||
str += "菠萝,"
|
|
||||||
case Grape:
|
|
||||||
str += "葡萄,"
|
|
||||||
case Lemon:
|
|
||||||
str += "柠檬,"
|
|
||||||
case Watermelon:
|
|
||||||
str += "西瓜,"
|
|
||||||
case Banana:
|
|
||||||
str += "香蕉,"
|
|
||||||
case Apple:
|
|
||||||
str += "苹果,"
|
|
||||||
case Bomb:
|
|
||||||
str += "炸弹,"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fmt.Println(str)
|
|
||||||
}
|
|
|
@ -29,7 +29,6 @@ const (
|
||||||
TIenLenTianhuTimeout = time.Second * 2 // 天胡动画时长
|
TIenLenTianhuTimeout = time.Second * 2 // 天胡动画时长
|
||||||
TienLenHandNotExceedTimeLimit = time.Second * 3 //玩家没有牌可以接上家的牌,出牌时间上限
|
TienLenHandNotExceedTimeLimit = time.Second * 3 //玩家没有牌可以接上家的牌,出牌时间上限
|
||||||
TienLenHandAutoStateTimeOut = time.Second * 1 //玩家托管出牌时间上限
|
TienLenHandAutoStateTimeOut = time.Second * 1 //玩家托管出牌时间上限
|
||||||
TienLenCustomWaiteStatTimeout = time.Millisecond * 1500
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// 场景状态
|
// 场景状态
|
||||||
|
|
|
@ -4,77 +4,22 @@ import (
|
||||||
"mongo.games.com/game/protocol/machine"
|
"mongo.games.com/game/protocol/machine"
|
||||||
"mongo.games.com/goserver/core/logger"
|
"mongo.games.com/goserver/core/logger"
|
||||||
"mongo.games.com/goserver/core/netlib"
|
"mongo.games.com/goserver/core/netlib"
|
||||||
"sync"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var MachineMap = make(map[int]*DollMachine)
|
var MachineMap = make(map[int]string)
|
||||||
var MachineMapLock = sync.Mutex{}
|
|
||||||
|
|
||||||
type DollMachine struct {
|
func MSDollMachineList(session *netlib.Session, packetId int, data interface{}) error {
|
||||||
Id int
|
|
||||||
MachineStatus int32 //娃娃机链接状态 0:离线 1:在线
|
|
||||||
Status bool //标记是否被占用
|
|
||||||
VideoAddr string
|
|
||||||
}
|
|
||||||
|
|
||||||
func MSDollMachineListHandler(session *netlib.Session, packetId int, data interface{}) error {
|
|
||||||
logger.Logger.Tracef("TestHandler %v", data)
|
logger.Logger.Tracef("TestHandler %v", data)
|
||||||
MachineMap = make(map[int]*DollMachine)
|
MachineMap = make(map[int]string)
|
||||||
if msg, ok := data.(*machine.MSDollMachineList); ok {
|
if msg, ok := data.(*machine.MSDollMachineList); ok {
|
||||||
for i, info := range msg.Data {
|
for i, info := range msg.Data {
|
||||||
MachineMap[i+1] = &DollMachine{
|
MachineMap[i+1] = info.VideoAddr
|
||||||
Id: i + 1,
|
|
||||||
Status: false,
|
|
||||||
VideoAddr: info.VideoAddr,
|
|
||||||
MachineStatus: 1,
|
|
||||||
}
|
|
||||||
logger.Logger.Tracef("MachineMap[%v] = %v", i, info.VideoAddr)
|
logger.Logger.Tracef("MachineMap[%v] = %v", i, info.VideoAddr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取空闲娃娃机标识
|
|
||||||
func GetFreeDollMachineId() int {
|
|
||||||
// 获取互斥锁
|
|
||||||
MachineMapLock.Lock()
|
|
||||||
defer MachineMapLock.Unlock()
|
|
||||||
for i, v := range MachineMap {
|
|
||||||
if v.Status == false {
|
|
||||||
v.Status = true
|
|
||||||
return i
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取指定娃娃机链接状态
|
|
||||||
func GetDollMachineStatus(id int) int32 {
|
|
||||||
if MachineMap[id] == nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
return MachineMap[id].MachineStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
func MSUpdateDollMachineStatusHandler(session *netlib.Session, packetId int, data interface{}) error {
|
|
||||||
logger.Logger.Tracef("MSUpdateDollMachineStatusHandler %v", data)
|
|
||||||
if msg, ok := data.(*machine.MSUpdateDollMachineStatus); ok {
|
|
||||||
if MachineMap[int(msg.Id)] == nil {
|
|
||||||
MachineMap[int(msg.Id)] = &DollMachine{
|
|
||||||
Id: int(msg.Id),
|
|
||||||
Status: false,
|
|
||||||
VideoAddr: msg.VideoAddr,
|
|
||||||
MachineStatus: msg.Status,
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
MachineMap[int(msg.Id)].MachineStatus = msg.Status
|
|
||||||
}
|
|
||||||
logger.Logger.Tracef("更新娃娃机连接状态 id = %d,status= %d", msg.Id, msg.GetStatus())
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func init() {
|
func init() {
|
||||||
netlib.Register(int(machine.DollMachinePacketID_PACKET_MSDollMachineList), &machine.MSDollMachineList{}, MSDollMachineListHandler)
|
netlib.Register(int(machine.DollMachinePacketID_PACKET_MSDollMachineList), &machine.MSDollMachineList{}, MSDollMachineList)
|
||||||
//更新娃娃机链接状态
|
|
||||||
netlib.Register(int(machine.DollMachinePacketID_PACKET_MSUpdateDollMachineStatus), &machine.MSUpdateDollMachineStatus{}, MSUpdateDollMachineStatusHandler)
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,6 @@ func init() {
|
||||||
etcd.Register(etcd.ETCDKEY_ChannelSwitch, webapi.ChannelSwitchConfig{}, platformConfigEtcd)
|
etcd.Register(etcd.ETCDKEY_ChannelSwitch, webapi.ChannelSwitchConfig{}, platformConfigEtcd)
|
||||||
// 皮肤配置
|
// 皮肤配置
|
||||||
etcd.Register(etcd.ETCDKEY_SKin, webapi.SkinConfig{}, platformConfigEtcd)
|
etcd.Register(etcd.ETCDKEY_SKin, webapi.SkinConfig{}, platformConfigEtcd)
|
||||||
// 娃娃机配置
|
|
||||||
etcd.Register(etcd.ETCDKEY_MACHINE, webapi.MachineConfig{}, platformConfigEtcd)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func platformConfigEtcd(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
func platformConfigEtcd(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||||
|
@ -43,8 +41,6 @@ func platformConfigEtcd(ctx context.Context, completeKey string, isInit bool, ev
|
||||||
ConfigMgrInst.GetConfig(d.Platform).ChannelSwitch[d.GetTp()] = d
|
ConfigMgrInst.GetConfig(d.Platform).ChannelSwitch[d.GetTp()] = d
|
||||||
case *webapi.SkinConfig:
|
case *webapi.SkinConfig:
|
||||||
ConfigMgrInst.GetConfig(d.Platform).SkinConfig = d
|
ConfigMgrInst.GetConfig(d.Platform).SkinConfig = d
|
||||||
case *webapi.MachineConfig:
|
|
||||||
ConfigMgrInst.GetConfig(d.Platform).MachineConfig = d
|
|
||||||
default:
|
default:
|
||||||
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
|
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,6 @@ package base
|
||||||
import (
|
import (
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
|
|
||||||
"mongo.games.com/game/model"
|
"mongo.games.com/game/model"
|
||||||
"mongo.games.com/game/mq"
|
"mongo.games.com/game/mq"
|
||||||
)
|
)
|
||||||
|
@ -40,7 +38,6 @@ func (c *LogChannel) WriteLog(log interface{}) {
|
||||||
if cname == "" {
|
if cname == "" {
|
||||||
cname = "_null_"
|
cname = "_null_"
|
||||||
}
|
}
|
||||||
logger.Logger.Tracef("LogChannel ==> %#v", log)
|
|
||||||
mq.Send(cname, log)
|
mq.Send(cname, log)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,8 +117,6 @@ func NewScene(args *CreateSceneParam) *Scene {
|
||||||
KeyGameDif: args.GetDBGameFree().GetGameDif(),
|
KeyGameDif: args.GetDBGameFree().GetGameDif(),
|
||||||
}
|
}
|
||||||
s.CycleID, _ = model.AutoIncGameLogId()
|
s.CycleID, _ = model.AutoIncGameLogId()
|
||||||
s.rrVer = ReplayRecorderVer[gameId]
|
|
||||||
s.RecordReplayStart()
|
|
||||||
s.init()
|
s.init()
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
@ -2553,15 +2551,3 @@ func (this *Scene) TryRelease() {
|
||||||
this.Destroy(true)
|
this.Destroy(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (this *Scene) GetMachineServerSecret(MachineId int32, platform string) (AppId int64, ServerSecret string) {
|
|
||||||
config := ConfigMgrInst.GetConfig(platform).MachineConfig
|
|
||||||
if config == nil {
|
|
||||||
return 0, ""
|
|
||||||
}
|
|
||||||
for _, info := range config.Info {
|
|
||||||
if info.MachineId == MachineId {
|
|
||||||
return info.AppId, info.ServerSecret
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0, ""
|
|
||||||
}
|
|
||||||
|
|
|
@ -2,10 +2,8 @@ package clawdoll
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mongo.games.com/game/common"
|
"mongo.games.com/game/common"
|
||||||
rule "mongo.games.com/game/gamerule/clawdoll"
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
"mongo.games.com/game/gamesrv/base"
|
||||||
"mongo.games.com/game/protocol/clawdoll"
|
"mongo.games.com/game/protocol/clawdoll"
|
||||||
"mongo.games.com/game/protocol/machine"
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
"mongo.games.com/goserver/core/logger"
|
||||||
"mongo.games.com/goserver/core/netlib"
|
"mongo.games.com/goserver/core/netlib"
|
||||||
)
|
)
|
||||||
|
@ -50,129 +48,8 @@ func (h *CSPlayerOpHandler) Process(s *netlib.Session, packetid int, data interf
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data interface{}) error {
|
|
||||||
logger.Logger.Tracef("收到返回上分结果!!!!!!!!!!")
|
|
||||||
if msg, ok := data.(*machine.MSDollMachineoPerateResult); ok {
|
|
||||||
|
|
||||||
p := base.PlayerMgrSington.GetPlayerBySnId(msg.GetSnid())
|
|
||||||
if p == nil {
|
|
||||||
logger.Logger.Warn("CSGetTokenHandler p == nil")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
scene := p.GetScene()
|
|
||||||
if scene == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
sceneEx, ok := scene.ExtraData.(*SceneEx)
|
|
||||||
if !ok {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
switch msg.TypeId {
|
|
||||||
case 1:
|
|
||||||
if msg.Result == 1 {
|
|
||||||
logger.Logger.Tracef("上分成功!!!!!!!!!!!!snid = ", msg.Snid)
|
|
||||||
} else {
|
|
||||||
logger.Logger.Tracef("上分失败!!!!!!!!!!!!snid = ", msg.Snid)
|
|
||||||
}
|
|
||||||
case 2:
|
|
||||||
if msg.Result == 1 {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
logger.Logger.Tracef("下抓失败!!!!!!!!!!!!snid = ", msg.Snid)
|
|
||||||
}
|
|
||||||
|
|
||||||
scene.ChangeSceneState(rule.ClawDollSceneStateBilled)
|
|
||||||
|
|
||||||
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateBilled))
|
|
||||||
|
|
||||||
ClawdollBroadcastRoomState(scene)
|
|
||||||
ClawdollSendPlayerInfo(scene)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type CSGetTokenPacketFactory struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
type CSGetTokenHandler struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *CSGetTokenPacketFactory) CreatePacket() interface{} {
|
|
||||||
pack := &clawdoll.CSCLAWDOLLGetToken{}
|
|
||||||
return pack
|
|
||||||
}
|
|
||||||
|
|
||||||
func (h *CSGetTokenHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
|
||||||
//转发到娃娃机主机
|
|
||||||
logger.Logger.Tracef("CSGetTokenHandler")
|
|
||||||
if _, ok := data.(*clawdoll.CSCLAWDOLLGetToken); ok {
|
|
||||||
p := base.PlayerMgrSington.GetPlayer(sid)
|
|
||||||
if p == nil {
|
|
||||||
logger.Logger.Warn("CSGetTokenHandler p == nil")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
pack := &machine.SMGetToken{}
|
|
||||||
pack.Snid = p.SnId
|
|
||||||
|
|
||||||
scene := p.GetScene()
|
|
||||||
if scene == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
sceneEx, ok := scene.ExtraData.(*SceneEx)
|
|
||||||
if !ok {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
machineId := scene.GetDBGameFree().GetId() % 6080000
|
|
||||||
appId, serverSecret := sceneEx.GetMachineServerSecret(machineId, p.Platform)
|
|
||||||
logger.Logger.Tracef("获取娃娃机 appId = %v, serverSecret = %v", appId, serverSecret)
|
|
||||||
if serverSecret == "" || appId == 0 {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
pack.ServerSecret = serverSecret
|
|
||||||
pack.AppId = appId
|
|
||||||
sceneEx.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMGetToken), pack)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 娃娃机返回token 通知客户端
|
|
||||||
func MSSendTokenHandler(session *netlib.Session, packetId int, data interface{}) error {
|
|
||||||
logger.Logger.Tracef("MSSendTokenHandler")
|
|
||||||
if msg, ok := data.(*machine.MSSendToken); ok {
|
|
||||||
//给客户端返回token
|
|
||||||
token := msg.Token
|
|
||||||
p := base.PlayerMgrSington.GetPlayerBySnId(msg.GetSnid())
|
|
||||||
if p == nil {
|
|
||||||
logger.Logger.Warn("MSSendTokenHandler p == nil")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
scene := p.GetScene()
|
|
||||||
if scene == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
pack := &clawdoll.SCCLAWDOLLSendToken{
|
|
||||||
LogicId: scene.DBGameFree.GetId(),
|
|
||||||
Appid: msg.Appid,
|
|
||||||
Token: token,
|
|
||||||
}
|
|
||||||
p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_SENDTOKEN), pack)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func init() {
|
func init() {
|
||||||
common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpHandler{})
|
common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_CLAWDOLL_PLAYEROP), &CSPlayerOpHandler{})
|
||||||
netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpPacketFactory{})
|
netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_CLAWDOLL_PLAYEROP), &CSPlayerOpPacketFactory{})
|
||||||
netlib.Register(int(machine.DollMachinePacketID_PACKET_MSDollMachineoPerateResult), &machine.MSDollMachineoPerateResult{}, MSDollMachineoCoinResultHandler)
|
|
||||||
//客户端请求token
|
|
||||||
common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_GETTOKEN), &CSGetTokenHandler{})
|
|
||||||
netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_GETTOKEN), &CSGetTokenPacketFactory{})
|
|
||||||
//获取token返回
|
|
||||||
netlib.Register(int(machine.DollMachinePacketID_PACKET_MSSendToken), &machine.MSSendToken{}, MSSendTokenHandler)
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,13 +8,9 @@ import (
|
||||||
type PlayerEx struct {
|
type PlayerEx struct {
|
||||||
*base.Player //玩家信息
|
*base.Player //玩家信息
|
||||||
|
|
||||||
clawDollState int32 // 抓娃娃状态
|
gainCoin int64 // 本局赢的金币
|
||||||
dollCardsCnt int32 // 娃娃卡数量
|
taxCoin int64 // 本局税收
|
||||||
|
odds int32
|
||||||
winDollCardType int32 // 本局赢取娃娃的类型
|
|
||||||
gainCoin int64 // 本局赢的金币
|
|
||||||
taxCoin int64 // 本局税收
|
|
||||||
odds int32
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *PlayerEx) Clear(baseScore int32) {
|
func (this *PlayerEx) Clear(baseScore int32) {
|
||||||
|
@ -35,37 +31,14 @@ func (this *PlayerEx) CanOp(sceneEx *SceneEx) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 能否投币
|
func (this *PlayerEx) CanPayCoinByPos() bool {
|
||||||
func (this *PlayerEx) CanPayCoin() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 投币消耗
|
return false
|
||||||
func (this *PlayerEx) CostPlayCoin() bool {
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 能否移动
|
|
||||||
func (this *PlayerEx) CanMove() bool {
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 能否下抓
|
|
||||||
func (this *PlayerEx) CanGrab() bool {
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 游戏新一局 设置数据
|
// 游戏新一局 设置数据
|
||||||
func (this *PlayerEx) ReStartGame() {
|
func (this *PlayerEx) ReStartGame() {
|
||||||
this.ReDataStartGame()
|
this.ReDataStartGame()
|
||||||
|
|
||||||
this.UnmarkFlag(base.PlayerState_WaitNext)
|
|
||||||
this.UnmarkFlag(base.PlayerState_GameBreak)
|
|
||||||
this.MarkFlag(base.PlayerState_Ready)
|
|
||||||
|
|
||||||
this.gainCoin = 0
|
this.gainCoin = 0
|
||||||
this.taxCoin = 0
|
this.taxCoin = 0
|
||||||
this.odds = 0
|
this.odds = 0
|
||||||
|
@ -76,7 +49,7 @@ func (this *PlayerEx) InitData(baseScore int32) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重置数据
|
// 重置下注数据
|
||||||
func (this *PlayerEx) ResetData() {
|
func (this *PlayerEx) ResetData() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -96,13 +69,3 @@ func (this *PlayerEx) CanLeaveScene(sceneState int) bool {
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取状态
|
|
||||||
func (this *PlayerEx) GetClawState() int32 {
|
|
||||||
return this.clawDollState
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设置状态
|
|
||||||
func (this *PlayerEx) SetClawState(state int32) {
|
|
||||||
this.clawDollState = state
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,16 +1,13 @@
|
||||||
package clawdoll
|
package clawdoll
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"container/list"
|
"mongo.games.com/game/protocol/clawdoll"
|
||||||
|
"mongo.games.com/goserver/core/logger"
|
||||||
|
|
||||||
"mongo.games.com/game/common"
|
"mongo.games.com/game/common"
|
||||||
rule "mongo.games.com/game/gamerule/clawdoll"
|
rule "mongo.games.com/game/gamerule/clawdoll"
|
||||||
"mongo.games.com/game/gamesrv/base"
|
"mongo.games.com/game/gamesrv/base"
|
||||||
"mongo.games.com/game/proto"
|
"mongo.games.com/game/proto"
|
||||||
"mongo.games.com/game/protocol/clawdoll"
|
|
||||||
"mongo.games.com/game/protocol/machine"
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
"mongo.games.com/goserver/core/netlib"
|
|
||||||
"mongo.games.com/goserver/srvlib"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type PlayerData struct {
|
type PlayerData struct {
|
||||||
|
@ -44,21 +41,15 @@ type SceneEx struct {
|
||||||
PlayerBackup map[int32]*PlayerData // 本局离场玩家数据备份
|
PlayerBackup map[int32]*PlayerData // 本局离场玩家数据备份
|
||||||
seats []*PlayerEx // 本局游戏中的玩家状态数据
|
seats []*PlayerEx // 本局游戏中的玩家状态数据
|
||||||
|
|
||||||
waitPlayers *list.List
|
RoundId int // 局数,第几局
|
||||||
playingSnid int32 // 正在玩的玩家snid
|
robotNum int // 参与游戏的机器人数量
|
||||||
|
logid string
|
||||||
RoundId int // 局数,第几局
|
|
||||||
robotNum int // 参与游戏的机器人数量
|
|
||||||
logid string
|
|
||||||
machineId int //娃娃机ID
|
|
||||||
machineConn *netlib.Session //娃娃机链接
|
|
||||||
machineStatus int32 //娃娃机链接状态 0:离线 1:在线
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 游戏是否能开始
|
// 游戏是否能开始
|
||||||
func (this *SceneEx) CanStart() bool {
|
func (this *SceneEx) CanStart() bool {
|
||||||
//人数>=1自动开始
|
//人数>=1自动开始
|
||||||
if len(this.players) >= 1 && (this.GetRealPlayerNum() >= 1 || this.IsPreCreateScene() || this.IsHasPlaying()) {
|
if len(this.players) >= 0 && (this.GetRealPlayerNum() >= 0 || this.IsPreCreateScene()) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
@ -67,41 +58,19 @@ func (this *SceneEx) CanStart() bool {
|
||||||
// 从房间删除玩家
|
// 从房间删除玩家
|
||||||
func (this *SceneEx) delPlayer(p *base.Player) {
|
func (this *SceneEx) delPlayer(p *base.Player) {
|
||||||
if p, exist := this.players[p.SnId]; exist {
|
if p, exist := this.players[p.SnId]; exist {
|
||||||
//this.seats[p.GetPos()] = nil
|
this.seats[p.GetPos()] = nil
|
||||||
delete(this.players, p.SnId)
|
delete(this.players, p.SnId)
|
||||||
this.RemoveWaitPlayer(p.SnId)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 广播玩家进入
|
|
||||||
func (this *SceneEx) BroadcastPlayerEnter(p *base.Player, reason int) {
|
|
||||||
pack := &clawdoll.SCCLAWDOLLPlayerEnter{}
|
|
||||||
|
|
||||||
pack.Data = &clawdoll.CLAWDOLLPlayerDigestInfo{}
|
|
||||||
|
|
||||||
pack.Data.SnId = p.GetSnId()
|
|
||||||
pack.Data.Head = p.Head
|
|
||||||
pack.Data.HeadUrl = p.HeadUrl
|
|
||||||
pack.Data.Name = p.Name
|
|
||||||
|
|
||||||
proto.SetDefaults(pack)
|
|
||||||
|
|
||||||
this.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PlayerEnter), pack, p.GetSid())
|
|
||||||
}
|
|
||||||
|
|
||||||
// 广播玩家离开
|
// 广播玩家离开
|
||||||
func (this *SceneEx) BroadcastPlayerLeave(p *base.Player, reason int) {
|
func (this *SceneEx) BroadcastPlayerLeave(p *base.Player, reason int) {
|
||||||
scLeavePack := &clawdoll.SCCLAWDOLLPlayerLeave{
|
scLeavePack := &clawdoll.SCCLAWDOLLPlayerLeave{
|
||||||
SnId: proto.Int32(p.SnId),
|
Pos: proto.Int(p.GetPos()),
|
||||||
}
|
}
|
||||||
proto.SetDefaults(scLeavePack)
|
proto.SetDefaults(scLeavePack)
|
||||||
|
|
||||||
this.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PlayerLeave), scLeavePack, p.GetSid())
|
this.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PlayerLeave), scLeavePack, p.GetSid())
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家进入事件
|
|
||||||
func (this *SceneEx) OnPlayerEnter(p *base.Player, reason int) {
|
|
||||||
this.BroadcastPlayerEnter(p, reason)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 玩家离开事件
|
// 玩家离开事件
|
||||||
|
@ -119,7 +88,7 @@ func (e *SceneEx) playerOpPack(snId int32, opcode int, opRetCode clawdoll.OpResu
|
||||||
SnId: proto.Int32(snId),
|
SnId: proto.Int32(snId),
|
||||||
OpCode: proto.Int32(int32(opcode)),
|
OpCode: proto.Int32(int32(opcode)),
|
||||||
Params: params,
|
Params: params,
|
||||||
OpRetCode: opRetCode,
|
OpRetCode: clawdoll.OpResultCode_OPRC_Success,
|
||||||
}
|
}
|
||||||
|
|
||||||
proto.SetDefaults(pack)
|
proto.SetDefaults(pack)
|
||||||
|
@ -129,7 +98,7 @@ func (e *SceneEx) playerOpPack(snId int32, opcode int, opRetCode clawdoll.OpResu
|
||||||
// OnPlayerSCOp 发送玩家操作情况
|
// OnPlayerSCOp 发送玩家操作情况
|
||||||
func (e *SceneEx) OnPlayerSCOp(p *base.Player, opcode int, opRetCode clawdoll.OpResultCode, params []int64) {
|
func (e *SceneEx) OnPlayerSCOp(p *base.Player, opcode int, opRetCode clawdoll.OpResultCode, params []int64) {
|
||||||
pack := e.playerOpPack(p.SnId, opcode, opRetCode, params)
|
pack := e.playerOpPack(p.SnId, opcode, opRetCode, params)
|
||||||
p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYEROP), pack)
|
p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_PLAYEROP), pack)
|
||||||
logger.Logger.Tracef("OnPlayerSCOp %s", pack)
|
logger.Logger.Tracef("OnPlayerSCOp %s", pack)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,8 +132,7 @@ func (this *SceneEx) ClawdollCreateRoomInfoPacket(s *base.Scene, p *base.Player)
|
||||||
HeadOutLine: proto.Int32(playerEx.HeadOutLine),
|
HeadOutLine: proto.Int32(playerEx.HeadOutLine),
|
||||||
VIP: proto.Int32(playerEx.VIP),
|
VIP: proto.Int32(playerEx.VIP),
|
||||||
|
|
||||||
WinCoin: proto.Int64(playerEx.gainCoin),
|
WinCoin: proto.Int64(playerEx.gainCoin),
|
||||||
ClawDollState: proto.Int32(playerEx.clawDollState),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pack.Players = append(pack.Players, pd)
|
pack.Players = append(pack.Players, pd)
|
||||||
|
@ -184,8 +152,8 @@ func NewClawdollSceneData(s *base.Scene) *SceneEx {
|
||||||
Scene: s,
|
Scene: s,
|
||||||
logic: new(rule.Logic),
|
logic: new(rule.Logic),
|
||||||
players: make(map[int32]*PlayerEx),
|
players: make(map[int32]*PlayerEx),
|
||||||
|
seats: make([]*PlayerEx, s.GetPlayerNum()),
|
||||||
PlayerBackup: make(map[int32]*PlayerData),
|
PlayerBackup: make(map[int32]*PlayerData),
|
||||||
waitPlayers: list.New(),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return sceneEx
|
return sceneEx
|
||||||
|
@ -196,40 +164,9 @@ func (this *SceneEx) init() bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查上分投币是否合法
|
// 检查上分是否合法
|
||||||
func (this *SceneEx) CheckPayCoinOp(p *PlayerEx) bool {
|
func (this *SceneEx) CheckPayOp(betVal int64, takeMul int64) bool { //游戏底分
|
||||||
if p == nil {
|
return true
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if p.SnId == this.playingSnid {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 检查移动是否合法
|
|
||||||
func (this *SceneEx) CheckMoveOp(p *PlayerEx) bool {
|
|
||||||
if p == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if p.SnId == this.playingSnid {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 下抓是否合法
|
|
||||||
func (this *SceneEx) CheckGrapOp(p *PlayerEx) bool {
|
|
||||||
if p == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if p.SnId == this.playingSnid {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *SceneEx) Clear() {
|
func (this *SceneEx) Clear() {
|
||||||
|
@ -237,29 +174,13 @@ func (this *SceneEx) Clear() {
|
||||||
this.PlayerBackup = make(map[int32]*PlayerData)
|
this.PlayerBackup = make(map[int32]*PlayerData)
|
||||||
this.RoundId = 0
|
this.RoundId = 0
|
||||||
|
|
||||||
for e := this.waitPlayers.Front(); e != nil; e = e.Next() {
|
for i := 0; i < this.GetPlayerNum(); i++ {
|
||||||
if e != nil {
|
if this.seats[i] != nil {
|
||||||
p := e.Value.(*PlayerEx)
|
this.seats[i].Clear(this.GetBaseScore())
|
||||||
p.Clear(0)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否有玩家正在玩
|
|
||||||
func (this *SceneEx) IsHasPlaying() bool {
|
|
||||||
if this.playingSnid == 0 {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 等待下一个玩家
|
|
||||||
func (this *SceneEx) ReStartGame() {
|
|
||||||
this.playingSnid = 0
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneEx) BackupPlayer(p *PlayerEx, isBilled bool) {
|
func (this *SceneEx) BackupPlayer(p *PlayerEx, isBilled bool) {
|
||||||
this.PlayerBackup[p.SnId] = &PlayerData{
|
this.PlayerBackup[p.SnId] = &PlayerData{
|
||||||
SnId: p.SnId,
|
SnId: p.SnId,
|
||||||
|
@ -282,107 +203,3 @@ func (this *SceneEx) BackupPlayer(p *PlayerEx, isBilled bool) {
|
||||||
BeUnderAgentCode: p.BeUnderAgentCode,
|
BeUnderAgentCode: p.BeUnderAgentCode,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *SceneEx) GetPlayGrabType(player *PlayerEx) int32 {
|
|
||||||
if player == nil {
|
|
||||||
return rule.ClawWeak
|
|
||||||
}
|
|
||||||
|
|
||||||
if this.RoundId%100 == 0 && this.RoundId != 0 {
|
|
||||||
return rule.ClawStrong
|
|
||||||
}
|
|
||||||
|
|
||||||
return rule.ClawWeak
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneEx) AddWaitPlayer(player *PlayerEx) {
|
|
||||||
if player == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.waitPlayers.PushBack(player)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneEx) RemoveWaitPlayer(SnId int32) bool {
|
|
||||||
l := this.waitPlayers
|
|
||||||
for e := l.Front(); e != nil; e = e.Next() {
|
|
||||||
if p := e.Value.(*PlayerEx); p.SnId == SnId {
|
|
||||||
this.waitPlayers.Remove(e)
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneEx) GetPlayingEx() *PlayerEx {
|
|
||||||
if this.playingSnid == 0 {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.players[this.playingSnid]
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneEx) SetPlayingState(state int32) {
|
|
||||||
if this.playingSnid == 0 {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
playerEx := this.players[this.playingSnid]
|
|
||||||
if playerEx != nil {
|
|
||||||
oldState := playerEx.GetClawState()
|
|
||||||
if oldState != state {
|
|
||||||
if oldState == rule.ClawDollPlayerStateWait && (state >= rule.ClawDollPlayerStateStart && state <= rule.ClawDollPlayerWaitPayCoin) {
|
|
||||||
ClawdollBroadcastPlayingInfo(this.Scene)
|
|
||||||
}
|
|
||||||
|
|
||||||
if state == rule.ClawDollPlayerStateWait && (oldState >= rule.ClawDollPlayerStateStart && oldState <= rule.ClawDollPlayerWaitPayCoin) {
|
|
||||||
ClawdollBroadcastPlayingInfo(this.Scene)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
playerEx.SetClawState(state)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 时间到 系统开始下抓
|
|
||||||
func (this *SceneEx) TimeOutPlayGrab() bool {
|
|
||||||
|
|
||||||
this.OnPlayerSMGrabOp(this.playingSnid, int32(this.machineId), rule.ClawWeak)
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// OnPlayerSMGrabOp 下抓 //1-弱力抓 2 -强力抓 3-必出抓
|
|
||||||
func (this *SceneEx) OnPlayerSMGrabOp(SnId, Id, GrabType int32) {
|
|
||||||
|
|
||||||
pack := &machine.SMDollMachineGrab{
|
|
||||||
Snid: proto.Int32(SnId),
|
|
||||||
Id: proto.Int32(Id),
|
|
||||||
TypeId: proto.Int32(GrabType),
|
|
||||||
}
|
|
||||||
|
|
||||||
this.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMDollMachineGrab), pack)
|
|
||||||
}
|
|
||||||
|
|
||||||
// OnPlayerSCOp 发送玩家操作情况 1-前 2-后 3-左 4-右 5-投币
|
|
||||||
func (this *SceneEx) OnPlayerSMPerateOp(SnId, Id, Perate int32) {
|
|
||||||
|
|
||||||
pack := &machine.SMDollMachineoPerate{
|
|
||||||
Snid: proto.Int32(SnId),
|
|
||||||
Id: proto.Int32(Id),
|
|
||||||
Perate: proto.Int32(Perate),
|
|
||||||
}
|
|
||||||
|
|
||||||
this.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMDollMachinePerate), pack)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 向娃娃机主机发送消息
|
|
||||||
func (this *SceneEx) SendToMachine(pid int, msg interface{}) {
|
|
||||||
this.machineConn = srvlib.ServerSessionMgrSington.GetSession(1, 10, 1001)
|
|
||||||
if this.machineConn != nil {
|
|
||||||
this.machineConn.Send(pid, msg)
|
|
||||||
} else {
|
|
||||||
logger.Logger.Error("MachineConn is nil !")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
package clawdoll
|
package clawdoll
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mongo.games.com/game/gamesrv/action"
|
|
||||||
"mongo.games.com/game/protocol/clawdoll"
|
"mongo.games.com/game/protocol/clawdoll"
|
||||||
"mongo.games.com/game/protocol/machine"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"mongo.games.com/goserver/core"
|
"mongo.games.com/goserver/core"
|
||||||
|
@ -63,31 +61,6 @@ func (this *PolicyClawdoll) OnTick(s *base.Scene) {
|
||||||
if s.SceneState != nil {
|
if s.SceneState != nil {
|
||||||
s.SceneState.OnTick(s)
|
s.SceneState.OnTick(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
sceneEx, ok := s.ExtraData.(*SceneEx)
|
|
||||||
if ok {
|
|
||||||
if sceneEx.machineId == 0 {
|
|
||||||
sceneEx.machineId = action.GetFreeDollMachineId()
|
|
||||||
}
|
|
||||||
if sceneEx.machineId != 0 {
|
|
||||||
machineStatus := action.GetDollMachineStatus(sceneEx.machineId)
|
|
||||||
if machineStatus == 0 {
|
|
||||||
//链接状态不可用 踢出所有玩家
|
|
||||||
for _, p := range sceneEx.players {
|
|
||||||
sceneEx.delPlayer(p.Player)
|
|
||||||
}
|
|
||||||
sceneEx.machineStatus = 0
|
|
||||||
logger.Logger.Trace("娃娃机离线,当前场景暂停服务!")
|
|
||||||
//通知客户单房间不可用
|
|
||||||
} else {
|
|
||||||
if sceneEx.machineStatus == 0 {
|
|
||||||
sceneEx.machineStatus = machineStatus
|
|
||||||
//通知客户端房间可用
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *PolicyClawdoll) OnPlayerEnter(s *base.Scene, p *base.Player) {
|
func (this *PolicyClawdoll) OnPlayerEnter(s *base.Scene, p *base.Player) {
|
||||||
|
@ -96,31 +69,35 @@ func (this *PolicyClawdoll) OnPlayerEnter(s *base.Scene, p *base.Player) {
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
||||||
|
|
||||||
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
||||||
playerEx := &PlayerEx{Player: p}
|
pos := -1
|
||||||
sceneEx.players[p.SnId] = playerEx
|
for i := 0; i < sceneEx.GetPlayerNum(); i++ {
|
||||||
baseScore := sceneEx.GetBaseScore()
|
if sceneEx.seats[i] == nil {
|
||||||
p.ExtraData = playerEx
|
pos = i
|
||||||
playerEx.Clear(baseScore)
|
break
|
||||||
|
}
|
||||||
if sceneEx.playingSnid == 0 {
|
|
||||||
//sceneEx.playingSnid = p.GetSnId()
|
|
||||||
}
|
}
|
||||||
|
if pos != -1 {
|
||||||
|
playerEx := &PlayerEx{Player: p}
|
||||||
|
sceneEx.seats[pos] = playerEx
|
||||||
|
sceneEx.players[p.SnId] = playerEx
|
||||||
|
|
||||||
p.MarkFlag(base.PlayerState_WaitNext)
|
baseScore := sceneEx.GetBaseScore()
|
||||||
p.UnmarkFlag(base.PlayerState_Ready)
|
|
||||||
|
|
||||||
//给自己发送房间信息
|
p.Pos = pos
|
||||||
this.SendRoomInfo(s, p, sceneEx)
|
p.ExtraData = playerEx
|
||||||
|
playerEx.Clear(baseScore)
|
||||||
|
|
||||||
ClawdollBroadcastRoomWaitPlayers(s)
|
if sceneEx.Gaming {
|
||||||
ClawdollBroadcastPlayingInfo(s)
|
p.MarkFlag(base.PlayerState_WaitNext)
|
||||||
|
p.UnmarkFlag(base.PlayerState_Ready)
|
||||||
|
}
|
||||||
|
|
||||||
// 玩家数据发送
|
//给自己发送房间信息
|
||||||
sceneEx.OnPlayerEnter(p, 0)
|
this.SendRoomInfo(s, p, sceneEx)
|
||||||
|
s.FirePlayerEvent(p, base.PlayerEventEnter, nil)
|
||||||
this.SendGetVideoToken(s, p, sceneEx)
|
}
|
||||||
s.FirePlayerEvent(p, base.PlayerEventEnter, nil)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,10 +151,6 @@ func (this *PolicyClawdoll) OnPlayerRehold(s *base.Scene, p *base.Player) {
|
||||||
p.MarkFlag(base.PlayerState_Ready)
|
p.MarkFlag(base.PlayerState_Ready)
|
||||||
}
|
}
|
||||||
this.SendRoomInfo(s, p, sceneEx)
|
this.SendRoomInfo(s, p, sceneEx)
|
||||||
ClawdollBroadcastRoomWaitPlayers(s)
|
|
||||||
ClawdollBroadcastPlayingInfo(s)
|
|
||||||
|
|
||||||
this.SendGetVideoToken(s, p, sceneEx)
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventRehold, nil)
|
s.FirePlayerEvent(p, base.PlayerEventRehold, nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -195,10 +168,6 @@ func (this *PolicyClawdoll) OnPlayerReturn(s *base.Scene, p *base.Player) {
|
||||||
p.MarkFlag(base.PlayerState_Ready)
|
p.MarkFlag(base.PlayerState_Ready)
|
||||||
}
|
}
|
||||||
this.SendRoomInfo(s, p, sceneEx)
|
this.SendRoomInfo(s, p, sceneEx)
|
||||||
ClawdollBroadcastRoomWaitPlayers(s)
|
|
||||||
ClawdollBroadcastPlayingInfo(s)
|
|
||||||
|
|
||||||
this.SendGetVideoToken(s, p, sceneEx)
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventReturn, nil)
|
s.FirePlayerEvent(p, base.PlayerEventReturn, nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -238,6 +207,9 @@ func (this *PolicyClawdoll) IsCompleted(s *base.Scene) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *PolicyClawdoll) IsCanForceStart(s *base.Scene) bool {
|
func (this *PolicyClawdoll) IsCanForceStart(s *base.Scene) bool {
|
||||||
|
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
||||||
|
return len(s.Players) >= 2 && !sceneEx.Gaming
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,38 +234,8 @@ func (this *PolicyClawdoll) CanChangeCoinScene(s *base.Scene, p *base.Player) bo
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *PolicyClawdoll) SendRoomInfo(s *base.Scene, p *base.Player, sceneEx *SceneEx) {
|
func (this *PolicyClawdoll) SendRoomInfo(s *base.Scene, p *base.Player, sceneEx *SceneEx) {
|
||||||
if s == nil || p == nil || sceneEx == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
pack := sceneEx.ClawdollCreateRoomInfoPacket(s, p)
|
pack := sceneEx.ClawdollCreateRoomInfoPacket(s, p)
|
||||||
|
p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_ROOMINFO), pack)
|
||||||
p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_ROOMINFO), pack)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *PolicyClawdoll) SendGetVideoToken(s *base.Scene, p *base.Player, sceneEx *SceneEx) {
|
|
||||||
//转发到娃娃机主机
|
|
||||||
if s == nil || p == nil || sceneEx == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Tracef("ClawdollGetVideoToken")
|
|
||||||
if p == nil {
|
|
||||||
logger.Logger.Warn("ClawdollGetVideoToken p == nil")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
pack := &machine.SMGetToken{}
|
|
||||||
pack.Snid = p.SnId
|
|
||||||
|
|
||||||
machineId := s.DBGameFree.GetId() % 6080000
|
|
||||||
appId, serverSecret := sceneEx.GetMachineServerSecret(machineId, p.Platform)
|
|
||||||
logger.Logger.Tracef("获取娃娃机 appId = %v, serverSecret = %v", appId, serverSecret)
|
|
||||||
if serverSecret == "" || appId == 0 {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
pack.ServerSecret = serverSecret
|
|
||||||
pack.AppId = appId
|
|
||||||
sceneEx.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMGetToken), pack)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 广播房间状态
|
// 广播房间状态
|
||||||
|
@ -302,79 +244,7 @@ func ClawdollBroadcastRoomState(s *base.Scene, params ...float32) {
|
||||||
State: proto.Int(s.SceneState.GetState()),
|
State: proto.Int(s.SceneState.GetState()),
|
||||||
Params: params,
|
Params: params,
|
||||||
}
|
}
|
||||||
s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_ROOMSTATE), pack, 0)
|
s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_CLAWDOLL_ROOMSTATE), pack, 0)
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家状态信息变化
|
|
||||||
func ClawdollSendPlayerInfo(s *base.Scene) {
|
|
||||||
|
|
||||||
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
|
||||||
playerEx := sceneEx.GetPlayingEx()
|
|
||||||
if playerEx != nil && playerEx.SnId == sceneEx.playingSnid {
|
|
||||||
pack := &clawdoll.SCCLAWDOLLPlayerInfo{
|
|
||||||
SnId: proto.Int32(playerEx.SnId),
|
|
||||||
ClawDollState: proto.Int32(playerEx.GetClawState()),
|
|
||||||
Coin: proto.Int64(playerEx.Coin),
|
|
||||||
GainCoin: proto.Int64(playerEx.gainCoin),
|
|
||||||
}
|
|
||||||
|
|
||||||
proto.SetDefaults(pack)
|
|
||||||
|
|
||||||
playerEx.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYERINFO), pack)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 广播房间里所有等待玩家信息
|
|
||||||
func ClawdollBroadcastRoomWaitPlayers(s *base.Scene) {
|
|
||||||
pack := &clawdoll.CLAWDOLLWaitPlayers{}
|
|
||||||
|
|
||||||
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
|
||||||
for _, playerEx := range sceneEx.players {
|
|
||||||
// 玩家信息
|
|
||||||
if playerEx.SnId != sceneEx.playingSnid {
|
|
||||||
pd := &clawdoll.CLAWDOLLPlayerDigestInfo{
|
|
||||||
SnId: proto.Int32(playerEx.SnId),
|
|
||||||
Head: proto.Int32(playerEx.Head),
|
|
||||||
HeadUrl: proto.String(playerEx.HeadUrl),
|
|
||||||
Name: proto.String(playerEx.Name),
|
|
||||||
}
|
|
||||||
|
|
||||||
pack.WaitPlayersInfo = append(pack.WaitPlayersInfo, pd)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_WAITPLAYERS), pack, 0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 广播房间正在控制娃娃机的玩家信息
|
|
||||||
func ClawdollBroadcastPlayingInfo(s *base.Scene) {
|
|
||||||
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
|
||||||
|
|
||||||
if !sceneEx.IsHasPlaying() {
|
|
||||||
pack := &clawdoll.CLAWDOLLPlayerDigestInfo{
|
|
||||||
SnId: proto.Int32(0),
|
|
||||||
Head: proto.Int32(0),
|
|
||||||
}
|
|
||||||
|
|
||||||
s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYINGINFO), pack, 0)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
playerEx := sceneEx.GetPlayingEx()
|
|
||||||
if playerEx != nil && playerEx.SnId == sceneEx.playingSnid {
|
|
||||||
pack := &clawdoll.CLAWDOLLPlayerDigestInfo{
|
|
||||||
SnId: proto.Int32(playerEx.SnId),
|
|
||||||
Head: proto.Int32(playerEx.Head),
|
|
||||||
HeadUrl: proto.String(playerEx.HeadUrl),
|
|
||||||
Name: proto.String(playerEx.Name),
|
|
||||||
}
|
|
||||||
|
|
||||||
s.Broadcast(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYINGINFO), pack, 0)
|
|
||||||
//playerEx.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_PLAYERINFO), pack)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=====================================
|
//=====================================
|
||||||
|
@ -397,14 +267,14 @@ func (this *BaseState) CanChangeTo(s base.SceneState) bool {
|
||||||
|
|
||||||
func (this *BaseState) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
func (this *BaseState) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
||||||
|
|
||||||
playerEx, ok := p.ExtraData.(*PlayerEx)
|
//playerEx, ok := p.ExtraData.(*PlayerEx)
|
||||||
if !ok {
|
//if !ok {
|
||||||
return false
|
// return false
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
if !playerEx.CanLeaveScene(s.GetSceneState().GetState()) {
|
//if !playerEx.CanLeaveScene(s.GetSceneState().GetState()) {
|
||||||
return false
|
// return false
|
||||||
}
|
//}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -418,7 +288,6 @@ func (this *BaseState) OnEnter(s *base.Scene) {
|
||||||
func (this *BaseState) OnLeave(s *base.Scene) {}
|
func (this *BaseState) OnLeave(s *base.Scene) {}
|
||||||
|
|
||||||
func (this *BaseState) OnTick(s *base.Scene) {
|
func (this *BaseState) OnTick(s *base.Scene) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *BaseState) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
func (this *BaseState) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
||||||
|
@ -449,19 +318,23 @@ func (this *StateWait) CanChangeTo(s base.SceneState) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *StateWait) GetTimeout(s *base.Scene) int {
|
func (this *StateWait) GetTimeout(s *base.Scene) int {
|
||||||
|
|
||||||
return this.BaseState.GetTimeout(s)
|
return this.BaseState.GetTimeout(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *StateWait) OnEnter(s *base.Scene) {
|
func (this *StateWait) OnEnter(s *base.Scene) {
|
||||||
this.BaseState.OnEnter(s)
|
this.BaseState.OnEnter(s)
|
||||||
if _, ok := s.ExtraData.(*SceneEx); ok {
|
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
||||||
if s.Gaming {
|
if s.Gaming {
|
||||||
s.NotifySceneRoundPause()
|
s.NotifySceneRoundPause()
|
||||||
}
|
}
|
||||||
s.Gaming = false
|
s.Gaming = false
|
||||||
|
|
||||||
ClawdollBroadcastRoomState(s)
|
ClawdollBroadcastRoomState(s, float32(0), float32(0))
|
||||||
ClawdollSendPlayerInfo(s)
|
|
||||||
|
if sceneEx.CanStart() {
|
||||||
|
s.ChangeSceneState(rule.ClawDollSceneStateStart)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -488,51 +361,13 @@ func (this *StateWait) OnTick(s *base.Scene) {
|
||||||
sceneEx.SceneDestroy(true)
|
sceneEx.SceneDestroy(true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneWaitTimeout {
|
||||||
}
|
//切换到准备开局状态
|
||||||
|
if sceneEx.CanStart() {
|
||||||
func (this *StateWait) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
s.ChangeSceneState(rule.ClawDollSceneStateStart)
|
||||||
if this.BaseState.OnPlayerOp(s, p, opcode, params) {
|
}
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
sceneEx, ok := s.ExtraData.(*SceneEx)
|
|
||||||
if !ok {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
playerEx, ok := p.ExtraData.(*PlayerEx)
|
|
||||||
if !ok {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
switch opcode {
|
|
||||||
case rule.ClawDollPlayerOpPayCoin:
|
|
||||||
if sceneEx.IsHasPlaying() {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if !playerEx.CanPayCoin() {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1-前 2-后 3-左 4-右 5-投币
|
|
||||||
sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonPayCoin)
|
|
||||||
|
|
||||||
if sceneEx.CanStart() {
|
|
||||||
sceneEx.playingSnid = playerEx.SnId
|
|
||||||
s.ChangeSceneState(rule.ClawDollSceneStateStart)
|
|
||||||
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateStart))
|
|
||||||
|
|
||||||
ClawdollBroadcastRoomState(s)
|
|
||||||
ClawdollSendPlayerInfo(s)
|
|
||||||
|
|
||||||
ClawdollBroadcastPlayingInfo(s)
|
|
||||||
|
|
||||||
sceneEx.OnPlayerSCOp(p, opcode, clawdoll.OpResultCode_OPRC_Success, params)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=====================================
|
//=====================================
|
||||||
|
@ -551,8 +386,6 @@ func (this *StateStart) CanChangeTo(s base.SceneState) bool {
|
||||||
switch s.GetState() {
|
switch s.GetState() {
|
||||||
case rule.ClawDollSceneStatePlayGame:
|
case rule.ClawDollSceneStatePlayGame:
|
||||||
return true
|
return true
|
||||||
case rule.ClawDollSceneStateWait:
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -560,12 +393,11 @@ func (this *StateStart) CanChangeTo(s base.SceneState) bool {
|
||||||
func (this *StateStart) OnEnter(s *base.Scene) {
|
func (this *StateStart) OnEnter(s *base.Scene) {
|
||||||
this.BaseState.OnEnter(s)
|
this.BaseState.OnEnter(s)
|
||||||
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
||||||
ClawdollBroadcastRoomState(s)
|
ClawdollBroadcastRoomState(s, float32(0), float32(0))
|
||||||
ClawdollSendPlayerInfo(s)
|
|
||||||
|
|
||||||
s.Gaming = false
|
s.Gaming = false
|
||||||
sceneEx.GameNowTime = time.Now()
|
sceneEx.GameNowTime = time.Now()
|
||||||
sceneEx.NumOfGames++
|
sceneEx.NumOfGames++
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -574,24 +406,32 @@ func (this *StateStart) OnTick(s *base.Scene) {
|
||||||
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
||||||
if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneStartTimeout {
|
if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneStartTimeout {
|
||||||
//切换到等待操作状态
|
//切换到等待操作状态
|
||||||
s.ChangeSceneState(rule.ClawDollSceneStatePlayGame)
|
if sceneEx.CanStart() {
|
||||||
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStatePlayGame))
|
s.ChangeSceneState(rule.ClawDollSceneStatePlayGame)
|
||||||
|
} else {
|
||||||
ClawdollBroadcastRoomState(s)
|
s.ChangeSceneState(rule.ClawDollSceneStateWait)
|
||||||
ClawdollSendPlayerInfo(s)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *StateStart) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
func (this *StateStart) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
||||||
|
if this.BaseState.OnPlayerOp(s, p, opcode, params) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *StateStart) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
func (this *StateStart) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
||||||
logger.Logger.Trace("(this *StateStart) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " evtcode=", evtcode)
|
logger.Logger.Trace("(this *StateStart) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " evtcode=", evtcode)
|
||||||
this.BaseState.OnPlayerEvent(s, p, evtcode, params)
|
this.BaseState.OnPlayerEvent(s, p, evtcode, params)
|
||||||
if _, ok := s.ExtraData.(*SceneEx); ok {
|
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
||||||
switch evtcode {
|
switch evtcode {
|
||||||
|
case base.PlayerEventLeave:
|
||||||
|
if !sceneEx.CanStart() {
|
||||||
|
s.ChangeSceneState(rule.ClawDollSceneStateWait)
|
||||||
|
}
|
||||||
case base.PlayerEventEnter:
|
case base.PlayerEventEnter:
|
||||||
if !p.IsReady() {
|
if !p.IsReady() {
|
||||||
p.MarkFlag(base.PlayerState_Ready)
|
p.MarkFlag(base.PlayerState_Ready)
|
||||||
|
@ -627,8 +467,7 @@ func (this *PlayGame) OnEnter(s *base.Scene) {
|
||||||
|
|
||||||
s.Gaming = true
|
s.Gaming = true
|
||||||
|
|
||||||
ClawdollBroadcastRoomState(s)
|
ClawdollBroadcastRoomState(s, float32(0), float32(0))
|
||||||
ClawdollSendPlayerInfo(s)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -640,65 +479,11 @@ func (this *PlayGame) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, para
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
sceneEx, ok := s.ExtraData.(*SceneEx)
|
|
||||||
if !ok {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
playerEx, ok := p.ExtraData.(*PlayerEx)
|
|
||||||
if !ok {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
switch opcode {
|
|
||||||
case rule.ClawDollPlayerOpGo:
|
|
||||||
|
|
||||||
if !sceneEx.CheckGrapOp(playerEx) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if !playerEx.CanGrab() {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
grapType := sceneEx.GetPlayGrabType(playerEx)
|
|
||||||
|
|
||||||
logger.Logger.Trace("StatePlayGame OnPlayerOp-----SnId:", p.SnId, " grapType: ", grapType)
|
|
||||||
//1-弱力抓 2 -强力抓
|
|
||||||
sceneEx.OnPlayerSMGrabOp(p.SnId, int32(sceneEx.machineId), grapType)
|
|
||||||
|
|
||||||
case rule.ClawDollPlayerOpMove:
|
|
||||||
|
|
||||||
if !sceneEx.CheckMoveOp(playerEx) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if !playerEx.CanMove() {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if params[0] < rule.ButtonFront || params[0] > rule.ButtonRight {
|
|
||||||
logger.Logger.Trace("StatePlayGame OnPlayerOp-----SnId:", p.SnId, " opcode: ", opcode, " params:", params)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
// 1-前 2-后 3-左 4-右 5-投币
|
|
||||||
sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), int32(params[0]))
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *PlayGame) OnTick(s *base.Scene) {
|
func (this *PlayGame) OnTick(s *base.Scene) {
|
||||||
this.BaseState.OnTick(s)
|
this.BaseState.OnTick(s)
|
||||||
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
|
||||||
if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollScenePlayTimeout {
|
|
||||||
|
|
||||||
if sceneEx.TimeOutPlayGrab() {
|
|
||||||
logger.Logger.Trace("PlayGame OnTick TimeOutPlayGrab SnId", sceneEx.playingSnid, " machineId:", sceneEx.machineId)
|
|
||||||
}
|
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=====================================
|
//=====================================
|
||||||
|
@ -715,7 +500,7 @@ func (this *StateBilled) GetState() int {
|
||||||
|
|
||||||
func (this *StateBilled) CanChangeTo(s base.SceneState) bool {
|
func (this *StateBilled) CanChangeTo(s base.SceneState) bool {
|
||||||
switch s.GetState() {
|
switch s.GetState() {
|
||||||
case rule.ClawDollSceneWaitPayCoin:
|
case rule.ClawDollSceneStateStart:
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
@ -728,26 +513,6 @@ func (this *StateBilled) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, p
|
||||||
func (this *StateBilled) OnEnter(s *base.Scene) {
|
func (this *StateBilled) OnEnter(s *base.Scene) {
|
||||||
logger.Logger.Trace("(this *StateBilled) OnEnter, sceneid=", s.GetSceneId())
|
logger.Logger.Trace("(this *StateBilled) OnEnter, sceneid=", s.GetSceneId())
|
||||||
this.BaseState.OnEnter(s)
|
this.BaseState.OnEnter(s)
|
||||||
|
|
||||||
sceneEx, ok := s.ExtraData.(*SceneEx)
|
|
||||||
if !ok {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
playerEx := sceneEx.GetPlayingEx()
|
|
||||||
if playerEx != nil {
|
|
||||||
pack := &clawdoll.SCCLAWDOLLRoundGameBilled{
|
|
||||||
RoundId: proto.Int32(int32(sceneEx.RoundId)),
|
|
||||||
ClowResult: proto.Int32(0),
|
|
||||||
Award: proto.Int64(playerEx.gainCoin),
|
|
||||||
Balance: proto.Int64(playerEx.Coin),
|
|
||||||
}
|
|
||||||
|
|
||||||
// logger.Logger.Trace("SCSmallRocketRoundGameBilled is pack: ", pack)
|
|
||||||
proto.SetDefaults(pack)
|
|
||||||
|
|
||||||
playerEx.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_GAMEBILLED), pack)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *StateBilled) OnLeave(s *base.Scene) {
|
func (this *StateBilled) OnLeave(s *base.Scene) {
|
||||||
|
@ -767,138 +532,11 @@ func (this *StateBilled) OnTick(s *base.Scene) {
|
||||||
this.BaseState.OnTick(s)
|
this.BaseState.OnTick(s)
|
||||||
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
||||||
if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneBilledTimeout {
|
if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneBilledTimeout {
|
||||||
|
if sceneEx.CanStart() {
|
||||||
s.ChangeSceneState(rule.ClawDollSceneWaitPayCoin)
|
s.ChangeSceneState(rule.ClawDollSceneStateStart)
|
||||||
sceneEx.SetPlayingState(int32(rule.ClawDollSceneWaitPayCoin))
|
} else {
|
||||||
|
s.ChangeSceneState(rule.ClawDollSceneStateWait)
|
||||||
ClawdollBroadcastRoomState(s)
|
|
||||||
ClawdollSendPlayerInfo(s)
|
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//=====================================
|
|
||||||
// StateWaitPayCoin 等待下一局投币
|
|
||||||
//=====================================
|
|
||||||
|
|
||||||
type StateWaitPayCoin struct {
|
|
||||||
BaseState
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *StateWaitPayCoin) GetState() int {
|
|
||||||
return rule.ClawDollSceneWaitPayCoin
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *StateWaitPayCoin) CanChangeTo(s base.SceneState) bool {
|
|
||||||
switch s.GetState() {
|
|
||||||
case rule.ClawDollSceneStateStart:
|
|
||||||
return true
|
|
||||||
case rule.ClawDollSceneStateWait:
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *StateWaitPayCoin) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
|
||||||
logger.Logger.Trace("StatePlayGame OnPlayerOp-----SnId:", p.SnId, " opcode: ", opcode, " params:", params)
|
|
||||||
|
|
||||||
if this.BaseState.OnPlayerOp(s, p, opcode, params) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
sceneEx, ok := s.ExtraData.(*SceneEx)
|
|
||||||
if !ok {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
playerEx, ok := p.ExtraData.(*PlayerEx)
|
|
||||||
if !ok {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
switch opcode {
|
|
||||||
case rule.ClawDollPlayerOpPayCoin:
|
|
||||||
|
|
||||||
if sceneEx.playingSnid != playerEx.SnId {
|
|
||||||
logger.Logger.Trace("StateWaitPayCoin OnPlayerOp-----sceneEx.playingSnid:", sceneEx.playingSnid, " playerEx.SnId: ", playerEx.SnId)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 投币检测
|
|
||||||
if !playerEx.CanPayCoin() {
|
|
||||||
logger.Logger.Trace("StateWaitPayCoin OnPlayerOp-----CanPayCoin: false")
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonPayCoin)
|
|
||||||
|
|
||||||
playerEx.ReStartGame()
|
|
||||||
|
|
||||||
s.ChangeSceneState(rule.ClawDollSceneStateStart)
|
|
||||||
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateStart))
|
|
||||||
|
|
||||||
ClawdollBroadcastRoomState(s)
|
|
||||||
ClawdollSendPlayerInfo(s)
|
|
||||||
|
|
||||||
sceneEx.OnPlayerSCOp(p, opcode, clawdoll.OpResultCode_OPRC_Success, params)
|
|
||||||
|
|
||||||
case rule.ClawDollPlayerCancelPayCoin:
|
|
||||||
if sceneEx.playingSnid != playerEx.SnId {
|
|
||||||
logger.Logger.Trace("StateWaitPayCoin OnPlayerOp-----sceneEx.playingSnid:", sceneEx.playingSnid, " playerEx.SnId: ", playerEx.SnId)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 先设置时间
|
|
||||||
playingEx := sceneEx.GetPlayingEx()
|
|
||||||
if playingEx != nil {
|
|
||||||
playingEx.ReStartGame()
|
|
||||||
ClawdollSendPlayerInfo(s)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 再重置scene数据
|
|
||||||
sceneEx.ReStartGame()
|
|
||||||
|
|
||||||
s.ChangeSceneState(rule.ClawDollSceneStateWait)
|
|
||||||
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateWait))
|
|
||||||
|
|
||||||
ClawdollBroadcastRoomState(s)
|
|
||||||
ClawdollBroadcastPlayingInfo(s)
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *StateWaitPayCoin) OnEnter(s *base.Scene) {
|
|
||||||
logger.Logger.Trace("(this *StateWaitPayCoin) OnEnter, sceneid=", s.GetSceneId())
|
|
||||||
this.BaseState.OnEnter(s)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *StateWaitPayCoin) OnLeave(s *base.Scene) {
|
|
||||||
logger.Logger.Trace("(this *StateWaitPayCoin) OnLeave, sceneid=", s.GetSceneId())
|
|
||||||
this.BaseState.OnLeave(s)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *StateWaitPayCoin) OnTick(s *base.Scene) {
|
|
||||||
this.BaseState.OnTick(s)
|
|
||||||
if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
|
|
||||||
if time.Now().Sub(sceneEx.StateStartTime) > rule.ClawDollSceneWaitPayCoinimeout {
|
|
||||||
|
|
||||||
// 先设置时间
|
|
||||||
playingEx := sceneEx.GetPlayingEx()
|
|
||||||
if playingEx != nil {
|
|
||||||
playingEx.ReStartGame()
|
|
||||||
ClawdollSendPlayerInfo(s)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 再重置scene数据
|
|
||||||
sceneEx.ReStartGame()
|
|
||||||
|
|
||||||
s.ChangeSceneState(rule.ClawDollSceneStateWait)
|
|
||||||
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateWait))
|
|
||||||
|
|
||||||
ClawdollBroadcastRoomState(s)
|
|
||||||
ClawdollBroadcastPlayingInfo(s)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -929,7 +567,6 @@ func init() {
|
||||||
PolicyClawdollSingleton.RegisteSceneState(&StateStart{})
|
PolicyClawdollSingleton.RegisteSceneState(&StateStart{})
|
||||||
PolicyClawdollSingleton.RegisteSceneState(&PlayGame{})
|
PolicyClawdollSingleton.RegisteSceneState(&PlayGame{})
|
||||||
PolicyClawdollSingleton.RegisteSceneState(&StateBilled{})
|
PolicyClawdollSingleton.RegisteSceneState(&StateBilled{})
|
||||||
PolicyClawdollSingleton.RegisteSceneState(&StateWaitPayCoin{})
|
|
||||||
|
|
||||||
core.RegisteHook(core.HOOK_BEFORE_START, func() error {
|
core.RegisteHook(core.HOOK_BEFORE_START, func() error {
|
||||||
base.RegisteScenePolicy(common.GameId_Clawdoll, 0, PolicyClawdollSingleton)
|
base.RegisteScenePolicy(common.GameId_Clawdoll, 0, PolicyClawdollSingleton)
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
package fortunedragon
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/game/protocol/fortunedragon"
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
"mongo.games.com/goserver/core/netlib"
|
|
||||||
|
|
||||||
"mongo.games.com/game/common"
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
|
||||||
)
|
|
||||||
|
|
||||||
type CSFortuneDragonOpPacketFactory struct {
|
|
||||||
}
|
|
||||||
type CSFortuneDragonOpHandler struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *CSFortuneDragonOpPacketFactory) CreatePacket() interface{} {
|
|
||||||
pack := &fortunedragon.CSFortuneDragonOp{}
|
|
||||||
return pack
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *CSFortuneDragonOpHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
|
||||||
if op, ok := data.(*fortunedragon.CSFortuneDragonOp); ok {
|
|
||||||
p := base.PlayerMgrSington.GetPlayer(sid)
|
|
||||||
if p == nil {
|
|
||||||
logger.Logger.Warn("CSFortuneDragonOpHandler p == nil")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
scene := p.GetScene()
|
|
||||||
if scene == nil {
|
|
||||||
logger.Logger.Warn("CSFortuneDragonOpHandler p.scene == nil")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if !scene.HasPlayer(p) {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if scene.GetScenePolicy() != nil {
|
|
||||||
scene.GetScenePolicy().OnPlayerOp(scene, p, int(op.GetOpCode()), op.GetParams())
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func init() {
|
|
||||||
//fortunedragon
|
|
||||||
common.RegisterHandler(int(fortunedragon.FortuneDragonPID_PACKET_FORTUNEDRAGON_CSFORTUNEDRAGONOP), &CSFortuneDragonOpHandler{})
|
|
||||||
netlib.RegisterFactory(int(fortunedragon.FortuneDragonPID_PACKET_FORTUNEDRAGON_CSFORTUNEDRAGONOP), &CSFortuneDragonOpPacketFactory{})
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package fortunedragon
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
|
||||||
)
|
|
||||||
|
|
||||||
type FortuneDragonPlayerData struct {
|
|
||||||
*base.Player
|
|
||||||
leaveTime int32 //离开时间
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *FortuneDragonPlayerData) init() {
|
|
||||||
}
|
|
||||||
func (p *FortuneDragonPlayerData) Clear() {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
package fortunedragon
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
|
||||||
)
|
|
||||||
|
|
||||||
type FortuneDragonSceneData struct {
|
|
||||||
*base.Scene //场景
|
|
||||||
players map[int32]*FortuneDragonPlayerData //玩家信息
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewFortuneDragonSceneData(s *base.Scene) *FortuneDragonSceneData {
|
|
||||||
sceneEx := &FortuneDragonSceneData{
|
|
||||||
Scene: s,
|
|
||||||
players: make(map[int32]*FortuneDragonPlayerData),
|
|
||||||
}
|
|
||||||
sceneEx.Init()
|
|
||||||
return sceneEx
|
|
||||||
}
|
|
||||||
func (s *FortuneDragonSceneData) Init() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FortuneDragonSceneData) Clear() {
|
|
||||||
//应该是水池变一次就判断修改一次
|
|
||||||
//s.slotRateWeight = s.slotRateWeightTotal[0]
|
|
||||||
}
|
|
||||||
func (s *FortuneDragonSceneData) SceneDestroy(force bool) {
|
|
||||||
//销毁房间
|
|
||||||
s.Scene.Destroy(force)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FortuneDragonSceneData) delPlayer(SnId int32) {
|
|
||||||
if _, exist := s.players[SnId]; exist {
|
|
||||||
delete(s.players, SnId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func (s *FortuneDragonSceneData) OnPlayerLeave(p *base.Player, reason int) {
|
|
||||||
if /*playerEx*/ _, ok := p.ExtraData.(*FortuneDragonPlayerData); ok {
|
|
||||||
|
|
||||||
}
|
|
||||||
s.delPlayer(p.SnId)
|
|
||||||
}
|
|
|
@ -1,363 +0,0 @@
|
||||||
package fortunedragon
|
|
||||||
|
|
||||||
import (
|
|
||||||
"mongo.games.com/game/gamerule/fortunedragon"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"mongo.games.com/goserver/core"
|
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
|
|
||||||
"mongo.games.com/game/common"
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
|
||||||
"mongo.games.com/game/proto"
|
|
||||||
protocol "mongo.games.com/game/protocol/fortunedragon"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ////////////////////////////////////////////////////////////
|
|
||||||
var ScenePolicyFortuneDragonSington = &ScenePolicyFortuneDragon{}
|
|
||||||
|
|
||||||
type ScenePolicyFortuneDragon struct {
|
|
||||||
base.BaseScenePolicy
|
|
||||||
states [fortunedragon.FortuneDragonStateMax]base.SceneState
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建场景扩展数据
|
|
||||||
func (this *ScenePolicyFortuneDragon) CreateSceneExData(s *base.Scene) interface{} {
|
|
||||||
sceneEx := NewFortuneDragonSceneData(s)
|
|
||||||
if sceneEx != nil {
|
|
||||||
if sceneEx.GetInit() {
|
|
||||||
s.SetExtraData(sceneEx)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sceneEx
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建玩家扩展数据
|
|
||||||
func (this *ScenePolicyFortuneDragon) CreatePlayerExData(s *base.Scene, p *base.Player) interface{} {
|
|
||||||
playerEx := &FortuneDragonPlayerData{Player: p}
|
|
||||||
p.SetExtraData(playerEx)
|
|
||||||
return playerEx
|
|
||||||
}
|
|
||||||
|
|
||||||
// 场景开启事件
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnStart(s *base.Scene) {
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnStart, sceneId=", s.GetSceneId())
|
|
||||||
sceneEx := NewFortuneDragonSceneData(s)
|
|
||||||
if sceneEx != nil {
|
|
||||||
if sceneEx.GetInit() {
|
|
||||||
s.SetExtraData(sceneEx)
|
|
||||||
s.ChangeSceneState(fortunedragon.FortuneDragonStateStart)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 场景关闭事件
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnStop(s *base.Scene) {
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnStop , sceneId=", s.GetSceneId())
|
|
||||||
}
|
|
||||||
|
|
||||||
// 场景心跳事件
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnTick(s *base.Scene) {
|
|
||||||
if s == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if s.GetSceneState() != nil {
|
|
||||||
s.GetSceneState().OnTick(s)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家进入事件
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerEnter(s *base.Scene, p *base.Player) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.Name)
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
playerEx := &FortuneDragonPlayerData{Player: p}
|
|
||||||
playerEx.init()
|
|
||||||
playerEx.Clear()
|
|
||||||
|
|
||||||
sceneEx.players[p.SnId] = playerEx
|
|
||||||
|
|
||||||
p.SetExtraData(playerEx)
|
|
||||||
FortuneDragonSendRoomInfo(s, sceneEx, playerEx)
|
|
||||||
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventEnter, nil)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家离开事件
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerLeave(s *base.Scene, p *base.Player, reason int) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerLeave, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
|
||||||
if sceneEx, ok := s.ExtraData.(*FortuneDragonSceneData); ok {
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventLeave, nil)
|
|
||||||
sceneEx.OnPlayerLeave(p, reason)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家掉线
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerDropLine(s *base.Scene, p *base.Player) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerDropLine, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventDropLine, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家重连
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerRehold(s *base.Scene, p *base.Player) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerRehold, sceneId=", s.GetSceneId(), " player=", p.SnId)
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
if playerEx, ok := p.GetExtraData().(*FortuneDragonPlayerData); ok {
|
|
||||||
FortuneDragonSendRoomInfo(s, sceneEx, playerEx)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 返回房间
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerReturn(s *base.Scene, p *base.Player) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerReturn, GetSceneId()=", s.GetSceneId(), " player=", p.Name)
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
if playerEx, ok := p.GetExtraData().(*FortuneDragonPlayerData); ok {
|
|
||||||
//if p.IsMarkFlag(base.PlayerState_Auto) {
|
|
||||||
// p.UnmarkFlag(base.PlayerState_Auto)
|
|
||||||
// p.SyncFlag()
|
|
||||||
//}
|
|
||||||
//发送房间信息给自己
|
|
||||||
FortuneDragonSendRoomInfo(s, sceneEx, playerEx)
|
|
||||||
s.FirePlayerEvent(p, base.PlayerEventReturn, nil)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func FortuneDragonSendRoomInfo(s *base.Scene, sceneEx *FortuneDragonSceneData, playerEx *FortuneDragonPlayerData) {
|
|
||||||
pack := FortuneDragonCreateRoomInfoPacket(s, sceneEx, playerEx)
|
|
||||||
logger.Logger.Trace("RoomInfo: ", pack)
|
|
||||||
playerEx.SendToClient(int(protocol.FortuneDragonPID_PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONROOMINFO), pack)
|
|
||||||
}
|
|
||||||
func FortuneDragonCreateRoomInfoPacket(s *base.Scene, sceneEx *FortuneDragonSceneData, playerEx *FortuneDragonPlayerData) interface{} {
|
|
||||||
//房间信息
|
|
||||||
pack := &protocol.SCFortuneDragonRoomInfo{
|
|
||||||
RoomId: s.SceneId,
|
|
||||||
GameId: s.GameId,
|
|
||||||
RoomMode: s.SceneMode,
|
|
||||||
SceneType: s.GetSceneType(),
|
|
||||||
Params: common.CopySliceInt64ToInt32(s.Params),
|
|
||||||
NumOfGames: proto.Int(sceneEx.NumOfGames),
|
|
||||||
State: proto.Int(s.SceneState.GetState()),
|
|
||||||
ParamsEx: s.GetDBGameFree().OtherIntParams,
|
|
||||||
GameFreeId: proto.Int32(s.GetDBGameFree().Id),
|
|
||||||
//BetLimit: s.GetDBGameFree().BetLimit,
|
|
||||||
}
|
|
||||||
|
|
||||||
//自己的信息
|
|
||||||
if playerEx != nil {
|
|
||||||
pd := &protocol.FortuneDragonPlayerData{
|
|
||||||
SnId: proto.Int32(playerEx.SnId),
|
|
||||||
Name: proto.String(playerEx.Name),
|
|
||||||
Head: proto.Int32(playerEx.Head),
|
|
||||||
Sex: proto.Int32(playerEx.Sex),
|
|
||||||
Coin: proto.Int64(playerEx.Coin),
|
|
||||||
Pos: proto.Int(playerEx.Pos),
|
|
||||||
Flag: proto.Int(playerEx.GetFlag()),
|
|
||||||
City: proto.String(playerEx.City),
|
|
||||||
HeadOutLine: proto.Int32(playerEx.HeadOutLine),
|
|
||||||
VIP: proto.Int32(playerEx.VIP),
|
|
||||||
}
|
|
||||||
pack.Player = pd
|
|
||||||
}
|
|
||||||
proto.SetDefaults(pack)
|
|
||||||
return pack
|
|
||||||
}
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerOp, sceneId=", s.GetSceneId(), " player=", p.SnId, " opcode=", opcode, " params=", params)
|
|
||||||
if s.GetSceneState() != nil {
|
|
||||||
if s.GetSceneState().OnPlayerOp(s, p, opcode, params) {
|
|
||||||
p.SetLastOPTimer(time.Now())
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ScenePolicyFortuneDragon) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logger.Logger.Trace("(this *ScenePolicyFortuneDragon) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " eventcode=", evtcode, " params=", params)
|
|
||||||
if s.GetSceneState() != nil {
|
|
||||||
s.GetSceneState().OnPlayerEvent(s, p, evtcode, params)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前状态能否换桌
|
|
||||||
func (this *ScenePolicyFortuneDragon) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
|
||||||
if s == nil || p == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if s.GetSceneState() != nil {
|
|
||||||
return s.GetSceneState().CanChangeCoinScene(s, p)
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 状态基类
|
|
||||||
type SceneBaseStateFortuneDragon struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneBaseStateFortuneDragon) GetTimeout(s *base.Scene) int {
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
return int(time.Now().Sub(sceneEx.GetStateStartTime()) / time.Second)
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneBaseStateFortuneDragon) CanChangeTo(s base.SceneState) bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前状态能否换桌
|
|
||||||
func (this *SceneBaseStateFortuneDragon) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
func (this *SceneBaseStateFortuneDragon) OnEnter(s *base.Scene) {
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
sceneEx.SetStateStartTime(time.Now())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneBaseStateFortuneDragon) OnLeave(s *base.Scene) {}
|
|
||||||
func (this *SceneBaseStateFortuneDragon) OnTick(s *base.Scene) {
|
|
||||||
if time.Now().Sub(s.GameStartTime) > time.Second*3 {
|
|
||||||
if sceneEx, ok := s.ExtraData.(*FortuneDragonSceneData); ok {
|
|
||||||
for _, p := range sceneEx.players {
|
|
||||||
if p.IsOnLine() {
|
|
||||||
p.leaveTime = 0
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
p.leaveTime++
|
|
||||||
if p.leaveTime < 60*2 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
//踢出玩家
|
|
||||||
sceneEx.PlayerLeave(p.Player, common.PlayerLeaveReason_LongTimeNoOp, true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
s.GameStartTime = time.Now()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func (this *SceneBaseStateFortuneDragon) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
func (this *SceneBaseStateFortuneDragon) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
|
||||||
}
|
|
||||||
|
|
||||||
// ////////////////////////////////////////////////////////////
|
|
||||||
// 开始状态
|
|
||||||
// ////////////////////////////////////////////////////////////
|
|
||||||
type SceneStateStartFortuneDragon struct {
|
|
||||||
SceneBaseStateFortuneDragon
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneDragon) GetState() int {
|
|
||||||
return fortunedragon.FortuneDragonStateStart
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneDragon) CanChangeTo(s base.SceneState) bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前状态能否换桌
|
|
||||||
func (this *SceneStateStartFortuneDragon) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
|
|
||||||
if playerEx, ok := p.GetExtraData().(*FortuneDragonPlayerData); ok {
|
|
||||||
if playerEx.IsOnLine() {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneDragon) GetTimeout(s *base.Scene) int {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneDragon) OnEnter(s *base.Scene) {
|
|
||||||
this.SceneBaseStateFortuneDragon.OnEnter(s)
|
|
||||||
if sceneEx, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
sceneEx.SetGameNowTime(time.Now())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 状态离开时
|
|
||||||
func (this *SceneStateStartFortuneDragon) OnLeave(s *base.Scene) {
|
|
||||||
this.SceneBaseStateFortuneDragon.OnLeave(s)
|
|
||||||
logger.Logger.Tracef("(this *SceneStateStartFortuneDragon) OnLeave, sceneid=%v", s.GetSceneId())
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家操作
|
|
||||||
func (this *SceneStateStartFortuneDragon) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
|
|
||||||
logger.Logger.Tracef("(this *SceneStateStartFortuneDragon) OnPlayerOp, sceneid=%v params=%v", s.GetSceneId(), params)
|
|
||||||
if this.SceneBaseStateFortuneDragon.OnPlayerOp(s, p, opcode, params) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
if _, ok := s.GetExtraData().(*FortuneDragonSceneData); ok {
|
|
||||||
if playerEx, ok := p.GetExtraData().(*FortuneDragonPlayerData); ok {
|
|
||||||
switch opcode {
|
|
||||||
case fortunedragon.FortuneDragonPlayerOpStart:
|
|
||||||
playerEx.Clear()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家事件
|
|
||||||
func (this *SceneStateStartFortuneDragon) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
|
|
||||||
logger.Logger.Trace("(this *SceneStateStartFortuneDragon) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " evtcode=", evtcode)
|
|
||||||
this.SceneBaseStateFortuneDragon.OnPlayerEvent(s, p, evtcode, params)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *SceneStateStartFortuneDragon) OnTick(s *base.Scene) {
|
|
||||||
this.SceneBaseStateFortuneDragon.OnTick(s)
|
|
||||||
}
|
|
||||||
|
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
|
||||||
func (this *ScenePolicyFortuneDragon) RegisteSceneState(state base.SceneState) {
|
|
||||||
if state == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
stateid := state.GetState()
|
|
||||||
if stateid < 0 || stateid >= fortunedragon.FortuneDragonStateMax {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.states[stateid] = state
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ScenePolicyFortuneDragon) GetSceneState(s *base.Scene, stateid int) base.SceneState {
|
|
||||||
if stateid >= 0 && stateid < fortunedragon.FortuneDragonStateMax {
|
|
||||||
return this.states[stateid]
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
//主状态
|
|
||||||
ScenePolicyFortuneDragonSington.RegisteSceneState(&SceneStateStartFortuneDragon{})
|
|
||||||
core.RegisteHook(core.HOOK_BEFORE_START, func() error {
|
|
||||||
base.RegisteScenePolicy(common.GameId_FortuneDragon, fortunedragon.RoomMode_Classic, ScenePolicyFortuneDragonSington)
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -19,7 +19,6 @@ import (
|
||||||
|
|
||||||
// game
|
// game
|
||||||
_ "mongo.games.com/game/gamesrv/chess"
|
_ "mongo.games.com/game/gamesrv/chess"
|
||||||
_ "mongo.games.com/game/gamesrv/clawdoll"
|
|
||||||
_ "mongo.games.com/game/gamesrv/fishing"
|
_ "mongo.games.com/game/gamesrv/fishing"
|
||||||
_ "mongo.games.com/game/gamesrv/smallrocket"
|
_ "mongo.games.com/game/gamesrv/smallrocket"
|
||||||
_ "mongo.games.com/game/gamesrv/thirteen"
|
_ "mongo.games.com/game/gamesrv/thirteen"
|
||||||
|
|
|
@ -1,382 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.CashManiaBetBetChangeList = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_change_list = 0.3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_change_list = 0.6,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 1,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_change_list = 0.9,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 2,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_change_list = 1,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_change_list = 1.5,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_change_list = 3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_change_list = 5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_change_list = 9,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_change_list = 10,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_change_list = 15,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
index = 10,
|
|
||||||
bet_change_list = 30,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
index = 11,
|
|
||||||
bet_change_list = 45,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
index = 12,
|
|
||||||
bet_change_list = 90,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaBetBetLevel = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_level = 1,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_level = 2,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_level = 3,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_level = 4,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_level = 5,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_level = 6,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_level = 7,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_level = 8,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_level = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_level = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaBetBetLine = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_line = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaBetBetSize = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_size = 300,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_size = 1000,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_size = 3000,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_size = 9000,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaFormation = {
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "BaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line1Form5X5TypeA",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 2,
|
|
||||||
node_type = "FreeSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line1Form5X5TypeA",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 3,
|
|
||||||
other_init_method = 3,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaReelBaseSpinRange = {
|
|
||||||
{5, 5, 5},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaReelBaseSpinReel = {
|
|
||||||
{1, 200, 2, 200, 3, 200, 4, 200, 5, 200},
|
|
||||||
{6, 200, 7, 200, 8, 200, 9, 200, 10, 200, 11, 200, 12, 200, 13, 200, 14, 200, 15, 200, 16, 200, 17, 200, 18, 200, 19, 200},
|
|
||||||
{1, 200, 2, 200, 3, 200, 4, 200, 5, 200},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaSymbol = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
name = "100倍",
|
|
||||||
is_wild = false,
|
|
||||||
group = {1},
|
|
||||||
pay_rate = {0, 0, 100},
|
|
||||||
client_order = 1,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
name = "5倍",
|
|
||||||
is_wild = false,
|
|
||||||
group = {2},
|
|
||||||
pay_rate = {0, 0, 50},
|
|
||||||
client_order = 2,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
name = "1倍",
|
|
||||||
is_wild = false,
|
|
||||||
group = {3},
|
|
||||||
pay_rate = {0, 0, 10},
|
|
||||||
client_order = 3,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
name = "0.5倍",
|
|
||||||
is_wild = false,
|
|
||||||
group = {4},
|
|
||||||
pay_rate = {0, 0, 5},
|
|
||||||
client_order = 4,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
id = 5,
|
|
||||||
name = "0.1倍",
|
|
||||||
is_wild = false,
|
|
||||||
group = {5},
|
|
||||||
pay_rate = {0, 0, 1},
|
|
||||||
client_order = 5,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
id = 6,
|
|
||||||
name = "5FreeSpin",
|
|
||||||
is_wild = true,
|
|
||||||
group = {6},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
id = 7,
|
|
||||||
name = "10FreeSpin",
|
|
||||||
is_wild = true,
|
|
||||||
group = {7},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
id = 8,
|
|
||||||
name = "20FreeSpin",
|
|
||||||
is_wild = true,
|
|
||||||
group = {8},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
id = 9,
|
|
||||||
name = "wildx1",
|
|
||||||
is_wild = true,
|
|
||||||
group = {9},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
id = 10,
|
|
||||||
name = "wildx2",
|
|
||||||
is_wild = true,
|
|
||||||
group = {10},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
id = 11,
|
|
||||||
name = "wildx3",
|
|
||||||
is_wild = true,
|
|
||||||
group = {11},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
id = 12,
|
|
||||||
name = "wildx5",
|
|
||||||
is_wild = true,
|
|
||||||
group = {12},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[13] = {
|
|
||||||
id = 13,
|
|
||||||
name = "wildx10",
|
|
||||||
is_wild = true,
|
|
||||||
group = {13},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[14] = {
|
|
||||||
id = 14,
|
|
||||||
name = "wildx15",
|
|
||||||
is_wild = true,
|
|
||||||
group = {14},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[15] = {
|
|
||||||
id = 15,
|
|
||||||
name = "wildx20",
|
|
||||||
is_wild = true,
|
|
||||||
group = {15},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[16] = {
|
|
||||||
id = 16,
|
|
||||||
name = "wildx30",
|
|
||||||
is_wild = true,
|
|
||||||
group = {16},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[17] = {
|
|
||||||
id = 17,
|
|
||||||
name = "wildx40",
|
|
||||||
is_wild = true,
|
|
||||||
group = {17},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[18] = {
|
|
||||||
id = 18,
|
|
||||||
name = "wildx50",
|
|
||||||
is_wild = true,
|
|
||||||
group = {18},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[19] = {
|
|
||||||
id = 19,
|
|
||||||
name = "wildx100",
|
|
||||||
is_wild = true,
|
|
||||||
group = {19},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[200] = {
|
|
||||||
id = 200,
|
|
||||||
name = "empty",
|
|
||||||
is_wild = false,
|
|
||||||
group = {200},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.CashManiaSymbolBetRatio = {
|
|
||||||
{
|
|
||||||
bet_ratio = 0.1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
|
@ -1,334 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.FortuneDragonBetBetChangeList = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_change_list = 0.15,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_change_list = 0.3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 1,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_change_list = 0.45,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 2,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_change_list = 0.5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_change_list = 0.75,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_change_list = 1.5,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_change_list = 2.5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_change_list = 4.5,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_change_list = 5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_change_list = 7.5,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
index = 10,
|
|
||||||
bet_change_list = 15,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
index = 11,
|
|
||||||
bet_change_list = 22.5,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
index = 12,
|
|
||||||
bet_change_list = 45,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonBetBetLevel = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_level = 1,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_level = 2,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_level = 3,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_level = 4,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_level = 5,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_level = 6,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_level = 7,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_level = 8,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_level = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_level = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonBetBetLine = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_line = 5,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonBetBetSize = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_size = 300,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_size = 1000,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_size = 3000,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_size = 9000,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonFormation = {
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "BaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 3,
|
|
||||||
node_type = "FreeSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "FreeSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 2,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "SureWinBaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "SureWinBaseSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonReelBaseSpinRange = {
|
|
||||||
{3, 3, 3},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonReelBaseSpinReel = {
|
|
||||||
{3, 7, 2, 2, 2, 3, 5, 4, 7, 5, 5, 5, 6, 2, 4, 7, 6, 6, 6, 4, 3, 4, 1, 3, 7, 7, 6, 5, 7, 5, 4, 6, 4, 4, 3, 4, 7, 7, 7, 4, 7, 4, 7, 3, 3, 3, 5, 2, 6, 4, 4, 4, 5, 7, 7, 7, 2, 5, 7, 4, 3, 6, 5, 7, 6, 3, 1, 6, 2, 3, 5, 6, 3, 2, 2, 5, 7, 6, 6, 4, 1, 7, 7, 3, 6, 4, 7, 6, 1, 5, 5, 2, 6, 6, 2, 5, 5, 7, 7, 1, 4, 4, 4, 5, 3, 5, 6, 7, 2, 5, 6, 5, 7, 7, 7, 6, 2, 5, 7, 6, 6, 7, 7, 6, 3, 5, 1, 6, 7, 7, 5, 3, 6, 7, 7, 6, 5, 5, 1, 3, 7, 7, 7, 4, 5, 4, 4, 4, 6, 4, 4, 7, 4, 2, 6, 3, 5, 7, 5, 5, 5, 6, 1, 2, 4, 6, 5, 3, 3, 3, 2, 7, 4, 7, 6, 7, 7, 7, 6, 7, 4, 6, 1, 1, 1, 6, 6, 7, 4, 5, 2, 3, 7, 5, 7, 6, 7, 7, 3, 3, 7, 5, 7, 4, 5, 5, 5, 2, 7, 7, 7, 4, 5, 7, 7, 5, 5, 7, 4, 5, 6, 7, 6, 4, 4, 1, 6, 6, 5, 7, 6, 4, 5, 4, 6, 7, 4, 7, 3, 6, 5, 7, 7, 6, 2, 7, 3, 2, 2, 6, 5, 2, 6, 6, 6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7, 2, 7, 3, 4, 5, 3, 7, 7, 2, 5, 5, 5, 1, 6, 5, 6, 2, 6, 3, 6, 5, 3, 7, 6, 3, 2, 4, 1, 5, 4, 3, 7, 3, 7, 5, 6, 5, 3, 7, 7, 7, 6, 6, 3, 4, 6, 2, 3, 1, 7, 2, 3, 5, 7, 5, 5, 5, 6, 3, 5, 6, 4, 6, 7, 6, 5, 4, 2},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonSymbol = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
name = "Wild",
|
|
||||||
is_wild = true,
|
|
||||||
group = {1},
|
|
||||||
pay_rate = {0, 0, 100},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
name = "元宝",
|
|
||||||
is_wild = false,
|
|
||||||
group = {2},
|
|
||||||
pay_rate = {0, 0, 50},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
name = "红包",
|
|
||||||
is_wild = false,
|
|
||||||
group = {3},
|
|
||||||
pay_rate = {0, 0, 25},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
name = "灯笼",
|
|
||||||
is_wild = false,
|
|
||||||
group = {4},
|
|
||||||
pay_rate = {0, 0, 10},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
id = 5,
|
|
||||||
name = "福炮",
|
|
||||||
is_wild = false,
|
|
||||||
group = {5},
|
|
||||||
pay_rate = {0, 0, 5},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
id = 6,
|
|
||||||
name = "花结",
|
|
||||||
is_wild = false,
|
|
||||||
group = {6},
|
|
||||||
pay_rate = {0, 0, 3},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
id = 7,
|
|
||||||
name = "铜钱",
|
|
||||||
is_wild = false,
|
|
||||||
group = {7},
|
|
||||||
pay_rate = {0, 0, 2},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
id = 8,
|
|
||||||
name = "X2",
|
|
||||||
is_wild = false,
|
|
||||||
group = {8},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
id = 9,
|
|
||||||
name = "X5",
|
|
||||||
is_wild = false,
|
|
||||||
group = {8},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
id = 10,
|
|
||||||
name = "X10",
|
|
||||||
is_wild = false,
|
|
||||||
group = {8},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[200] = {
|
|
||||||
id = 200,
|
|
||||||
name = "Empty",
|
|
||||||
is_wild = false,
|
|
||||||
group = {8},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneDragonSymbolBetRatio = {
|
|
||||||
{
|
|
||||||
bet_ratio = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
|
@ -1,284 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.FortuneMouseBetBetChangeList = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_change_list = 0.15,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_change_list = 0.3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 1,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_change_list = 0.45,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 2,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_change_list = 0.5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_change_list = 0.75,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_change_list = 1.5,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_change_list = 2.5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_change_list = 4.5,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_change_list = 5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_change_list = 7.5,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
index = 10,
|
|
||||||
bet_change_list = 15,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
index = 11,
|
|
||||||
bet_change_list = 22.5,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
index = 12,
|
|
||||||
bet_change_list = 45,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseBetBetLevel = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_level = 1,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_level = 2,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_level = 3,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_level = 4,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_level = 5,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_level = 6,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_level = 7,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_level = 8,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_level = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_level = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseBetBetLine = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_line = 5,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseBetBetSize = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_size = 300,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_size = 1000,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_size = 3000,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_size = 9000,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseFormation = {
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "BaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 3,
|
|
||||||
node_type = "ReSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "ReSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 3,
|
|
||||||
other_init_method = 3,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseReelBaseSpinRange = {
|
|
||||||
{3, 3, 3},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseReelBaseSpinReel = {
|
|
||||||
{3, 7, 2, 2, 2, 3, 5, 4, 7, 5, 5, 5, 6, 2, 4, 7, 6, 6, 6, 5, 3, 4, 2, 7, 7, 7, 6, 5, 5, 5, 4, 6, 5, 5, 5, 4, 7, 7, 7, 4, 7, 6, 5, 3, 3, 3, 5, 7, 6, 5, 7, 6, 5, 7, 7, 7, 6, 5, 7, 4, 3, 6, 5, 7, 6, 3, 6, 6, 2, 3, 5, 6, 3, 2, 2, 5, 7, 6, 6, 4, 1, 7, 7, 3, 6, 4, 7, 6, 1, 5, 5,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, 6, 6, 7, 7, 7, 4, 5, 2, 3, 5, 4, 6, 7, 3, 2, 6, 7, 4, 3, 7, 4, 7, 3, 6, 6, 7, 6, 5, 5, 5, 2, 2, 5, 7, 7, 7, 3, 4, 5, 3, 7, 7, 7, 5, 5, 5, 6, 6, 5, 6, 2, 6, 3, 6, 5, 3, 7, 6, 2, 2, 4, 1, 5, 4, 3, 7, 3, 7, 5, 6, 5, 4, 7, 7, 7, 6, 6, 3, 4, 6, 2, 3, 1, 7, 2, 1, 5, 7, 5, 5, 5, 6, 3, 5, 6, 4, 6, 7, 6, 5, 4, 2},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseReelReSpinRange = {
|
|
||||||
{3, 3, 3},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseReelReSpinReel = {
|
|
||||||
{1, 1, 1, 2, 2, 2, 2, 7, 7, 7, 7, 8, 8, 8, 6, 6, 6, 6, 3, 3, 3, 3, 8, 8, 8, 5, 5, 5, 5, 4, 4, 4, 4, 8, 8, 8},
|
|
||||||
{1, 1, 1},
|
|
||||||
{1, 1, 1, 2, 2, 2, 2, 7, 7, 7, 7, 8, 8, 8, 6, 6, 6, 6, 3, 3, 3, 3, 8, 8, 8, 5, 5, 5, 5, 4, 4, 4, 4, 8, 8, 8},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseSymbol = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
name = "wild",
|
|
||||||
is_wild = true,
|
|
||||||
group = {1},
|
|
||||||
pay_rate = {0, 0, 300},
|
|
||||||
client_order = 1,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
name = "倒福",
|
|
||||||
is_wild = false,
|
|
||||||
group = {2},
|
|
||||||
pay_rate = {0, 0, 100},
|
|
||||||
client_order = 2,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
name = "红包",
|
|
||||||
is_wild = false,
|
|
||||||
group = {3},
|
|
||||||
pay_rate = {0, 0, 50},
|
|
||||||
client_order = 3,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
name = "钱袋",
|
|
||||||
is_wild = false,
|
|
||||||
group = {4},
|
|
||||||
pay_rate = {0, 0, 30},
|
|
||||||
client_order = 4,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
id = 5,
|
|
||||||
name = "爆竹",
|
|
||||||
is_wild = false,
|
|
||||||
group = {5},
|
|
||||||
pay_rate = {0, 0, 15},
|
|
||||||
client_order = 5,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
id = 6,
|
|
||||||
name = "橘子",
|
|
||||||
is_wild = false,
|
|
||||||
group = {6},
|
|
||||||
pay_rate = {0, 0, 5},
|
|
||||||
client_order = 6,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
id = 7,
|
|
||||||
name = "花生",
|
|
||||||
is_wild = false,
|
|
||||||
group = {7},
|
|
||||||
pay_rate = {0, 0, 3},
|
|
||||||
client_order = 7,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
id = 8,
|
|
||||||
name = "SuperStack",
|
|
||||||
is_wild = false,
|
|
||||||
group = {8},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneMouseSymbolBetRatio = {
|
|
||||||
{
|
|
||||||
bet_ratio = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
|
@ -1,293 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.FortuneOxBetBetChangeList = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_change_list = 0.3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_change_list = 0.6,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 1,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_change_list = 0.9,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 2,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_change_list = 1,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_change_list = 1.5,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_change_list = 3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_change_list = 5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_change_list = 9,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_change_list = 10,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_change_list = 15,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
index = 10,
|
|
||||||
bet_change_list = 30,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
index = 11,
|
|
||||||
bet_change_list = 45,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
index = 12,
|
|
||||||
bet_change_list = 90,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxBetBetLevel = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_level = 1,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_level = 2,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_level = 3,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_level = 4,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_level = 5,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_level = 6,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_level = 7,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_level = 8,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_level = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_level = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxBetBetLine = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_line = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxBetBetSize = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_size = 300,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_size = 1000,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_size = 3000,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_size = 9000,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxFormation = {
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "BaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line10Form343TypeA",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 3,
|
|
||||||
node_type = "ReSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "ReSpin",
|
|
||||||
matrix = "Line10Form343TypeA",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 3,
|
|
||||||
other_init_method = 3,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxReelBaseSpinRange = {
|
|
||||||
{3, 4, 3},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxReelBaseSpinReel = {
|
|
||||||
{3, 7, 2, 2, 2, 3, 5, 4, 7, 5, 5, 5, 6, 2, 4, 5, 6, 7, 6, 6, 6, 2, 2, 2, 1, 1, 4, 4, 4, 5, 7, 5, 4, 6, 4, 4, 3, 4, 7, 7, 7, 4, 7, 4, 7, 3, 3, 3, 5, 2, 6, 4, 4, 4, 5, 7, 7, 7, 2, 5, 7, 4, 2, 6, 5, 7, 6, 6, 6, 2, 2, 2, 5, 6, 2, 2, 2, 5, 7, 6, 6, 4, 2, 7,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 9, 9, 9, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 8, 8, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8},
|
|
||||||
{9, 9, 9, 9, 9, 9, 9, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 2, 2, 2, 2, 2, 2, 2, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 8, 8, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxSymbol = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
name = "wild",
|
|
||||||
is_wild = true,
|
|
||||||
group = {1},
|
|
||||||
pay_rate = {0, 0, 200},
|
|
||||||
client_order = 1,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
name = "元宝",
|
|
||||||
is_wild = false,
|
|
||||||
group = {2},
|
|
||||||
pay_rate = {0, 0, 100},
|
|
||||||
client_order = 2,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
name = "金锦盒",
|
|
||||||
is_wild = false,
|
|
||||||
group = {3},
|
|
||||||
pay_rate = {0, 0, 50},
|
|
||||||
client_order = 3,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
name = "钱袋",
|
|
||||||
is_wild = false,
|
|
||||||
group = {4},
|
|
||||||
pay_rate = {0, 0, 20},
|
|
||||||
client_order = 4,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
id = 5,
|
|
||||||
name = "红包",
|
|
||||||
is_wild = false,
|
|
||||||
group = {5},
|
|
||||||
pay_rate = {0, 0, 10},
|
|
||||||
client_order = 5,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
id = 6,
|
|
||||||
name = "橘子",
|
|
||||||
is_wild = false,
|
|
||||||
group = {6},
|
|
||||||
pay_rate = {0, 0, 5},
|
|
||||||
client_order = 6,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
id = 7,
|
|
||||||
name = "炮竹",
|
|
||||||
is_wild = false,
|
|
||||||
group = {7},
|
|
||||||
pay_rate = {0, 0, 3},
|
|
||||||
client_order = 7,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
id = 8,
|
|
||||||
name = "SuperStack1",
|
|
||||||
is_wild = false,
|
|
||||||
group = {8},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
id = 9,
|
|
||||||
name = "SuperStack2",
|
|
||||||
is_wild = false,
|
|
||||||
group = {9},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneOxSymbolBetRatio = {
|
|
||||||
{
|
|
||||||
bet_ratio = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
|
@ -1,346 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.FortuneRabbitBetBetChangeList = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_change_list = 0.3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_change_list = 0.6,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 1,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_change_list = 0.9,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 2,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_change_list = 1,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_change_list = 1.5,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_change_list = 3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_change_list = 5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_change_list = 9,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_change_list = 10,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_change_list = 15,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
index = 10,
|
|
||||||
bet_change_list = 30,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
index = 11,
|
|
||||||
bet_change_list = 45,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
index = 12,
|
|
||||||
bet_change_list = 90,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitBetBetLevel = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_level = 1,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_level = 2,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_level = 3,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_level = 4,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_level = 5,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_level = 6,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_level = 7,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_level = 8,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_level = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_level = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitBetBetLine = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_line = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitBetBetSize = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_size = 300,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_size = 1000,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_size = 3000,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_size = 9000,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitCashPrizeWeight = {
|
|
||||||
{
|
|
||||||
id = 1,
|
|
||||||
prize_value = 0.5,
|
|
||||||
weight = 144,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 2,
|
|
||||||
prize_value = 1,
|
|
||||||
weight = 25,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 3,
|
|
||||||
prize_value = 2,
|
|
||||||
weight = 25,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 4,
|
|
||||||
prize_value = 5,
|
|
||||||
weight = 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 5,
|
|
||||||
prize_value = 10,
|
|
||||||
weight = 50,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 6,
|
|
||||||
prize_value = 20,
|
|
||||||
weight = 25,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 7,
|
|
||||||
prize_value = 30,
|
|
||||||
weight = 15,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 8,
|
|
||||||
prize_value = 50,
|
|
||||||
weight = 10,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 9,
|
|
||||||
prize_value = 100,
|
|
||||||
weight = 5,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = 10,
|
|
||||||
prize_value = 500,
|
|
||||||
weight = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitFormation = {
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "BaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line10Form343TypeA",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 3,
|
|
||||||
node_type = "FreeSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "FreeSpin",
|
|
||||||
matrix = "Line10Form343TypeA",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 3,
|
|
||||||
other_init_method = 3,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitReelBaseSpinRange = {
|
|
||||||
{3, 4, 3},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitReelBaseSpinReel = {
|
|
||||||
{3, 7, 2, 2, 2, 3, 5, 4, 7, 8, 8, 8, 6, 2, 4, 5, 6, 7, 6, 6, 6, 2, 2, 2, 1, 5, 4, 4, 4, 5, 7, 5, 4, 6, 4, 4, 3, 4, 7, 7, 7, 4, 5, 6, 7, 3, 3, 3, 5, 2, 6, 4, 4, 4, 5, 7, 7, 7, 2, 5, 7, 4, 2, 6, 5, 7, 8, 8, 8, 2, 2, 2, 5, 6, 2, 2, 2, 5, 7, 6, 6, 4, 2, 7, 7, 7, 6, 5, 7, 6, 1, 5, 5, 2, 6, 6, 2, 5, 5, 7, 7, 1, 6, 6, 6, 5, 7, 5, 6, 7, 2, 5, 6, 5, 3, 3, 3, 6, 2, 5, 7, 6, 8, 8, 8, 6, 7, 5, 2, 6, 7, 7, 5, 3, 6, 7, 7, 6, 5, 2, 2, 2, 7, 8, 8, 8, 5, 4, 4, 4, 6, 4, 4, 7, 4, 2, 6, 7, 7, 5, 5, 5, 7, 6, 1, 2, 4, 6, 5, 7, 2, 2, 2, 7, 4, 7, 5, 6, 8, 8, 8, 5, 6, 7, 4, 6, 1, 5, 5, 5, 6, 6, 6, 7, 4, 5, 2, 3, 7, 5, 7, 6, 4, 4, 4, 7, 7, 7, 3, 4, 5, 5, 5, 2, 7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7, 7, 7, 6, 6, 6, 7, 7, 7},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitReelFreeSpinRange = {
|
|
||||||
{3, 4, 3},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitReelFreeSpinReel = {
|
|
||||||
{200, 200, 200, 200, 8, 8, 8, 200, 200, 200, 200, 200},
|
|
||||||
{200, 200, 200, 8, 8, 8, 8, 200, 200, 200, 200, 200},
|
|
||||||
{200, 200, 200, 200, 8, 8, 8, 200, 200, 200, 200, 200},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitSymbol = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
name = "wild",
|
|
||||||
is_wild = true,
|
|
||||||
group = {1},
|
|
||||||
pay_rate = {0, 0, 200},
|
|
||||||
client_order = 1,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
name = "元宝",
|
|
||||||
is_wild = false,
|
|
||||||
group = {2},
|
|
||||||
pay_rate = {0, 0, 100},
|
|
||||||
client_order = 2,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
name = "钱袋",
|
|
||||||
is_wild = false,
|
|
||||||
group = {3},
|
|
||||||
pay_rate = {0, 0, 50},
|
|
||||||
client_order = 3,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
name = "红包",
|
|
||||||
is_wild = false,
|
|
||||||
group = {4},
|
|
||||||
pay_rate = {0, 0, 10},
|
|
||||||
client_order = 4,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
id = 5,
|
|
||||||
name = "铜币",
|
|
||||||
is_wild = false,
|
|
||||||
group = {5},
|
|
||||||
pay_rate = {0, 0, 5},
|
|
||||||
client_order = 5,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
id = 6,
|
|
||||||
name = "爆竹",
|
|
||||||
is_wild = false,
|
|
||||||
group = {6},
|
|
||||||
pay_rate = {0, 0, 3},
|
|
||||||
client_order = 6,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
id = 7,
|
|
||||||
name = "胡萝卜",
|
|
||||||
is_wild = false,
|
|
||||||
group = {7},
|
|
||||||
pay_rate = {0, 0, 2},
|
|
||||||
client_order = 7,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
id = 8,
|
|
||||||
name = "Cash",
|
|
||||||
is_wild = false,
|
|
||||||
group = {8},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[200] = {
|
|
||||||
id = 200,
|
|
||||||
name = "Empty",
|
|
||||||
is_wild = false,
|
|
||||||
group = {200},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneRabbitSymbolBetRatio = {
|
|
||||||
{
|
|
||||||
bet_ratio = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
|
@ -1,293 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.FortuneTigerBetBetChangeList = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_change_list = 0.15,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_change_list = 0.3,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 1,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_change_list = 0.45,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 2,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_change_list = 0.5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_change_list = 0.75,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_change_list = 1.5,
|
|
||||||
bet_size_index = 0,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_change_list = 2.5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_change_list = 4.5,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 0,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_change_list = 5,
|
|
||||||
bet_size_index = 1,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_change_list = 7.5,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[10] = {
|
|
||||||
index = 10,
|
|
||||||
bet_change_list = 15,
|
|
||||||
bet_size_index = 2,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
[11] = {
|
|
||||||
index = 11,
|
|
||||||
bet_change_list = 22.5,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 4,
|
|
||||||
},
|
|
||||||
[12] = {
|
|
||||||
index = 12,
|
|
||||||
bet_change_list = 45,
|
|
||||||
bet_size_index = 3,
|
|
||||||
bet_level_index = 9,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerBetBetLevel = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_level = 1,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_level = 2,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_level = 3,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_level = 4,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
index = 4,
|
|
||||||
bet_level = 5,
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
index = 5,
|
|
||||||
bet_level = 6,
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
index = 6,
|
|
||||||
bet_level = 7,
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
index = 7,
|
|
||||||
bet_level = 8,
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
index = 8,
|
|
||||||
bet_level = 9,
|
|
||||||
},
|
|
||||||
[9] = {
|
|
||||||
index = 9,
|
|
||||||
bet_level = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerBetBetLine = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_line = 5,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerBetBetSize = {
|
|
||||||
[0] = {
|
|
||||||
index = 0,
|
|
||||||
bet_size = 300,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
index = 1,
|
|
||||||
bet_size = 1000,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
index = 2,
|
|
||||||
bet_size = 3000,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
index = 3,
|
|
||||||
bet_size = 9000,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerFormation = {
|
|
||||||
{
|
|
||||||
spin_type = 1,
|
|
||||||
node_type = "BaseSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "BaseSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 2,
|
|
||||||
other_init_method = 4,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
spin_type = 3,
|
|
||||||
node_type = "ReSpin",
|
|
||||||
id = 1,
|
|
||||||
seq_id = 1,
|
|
||||||
reel = "ReSpin",
|
|
||||||
matrix = "Line5Form3X3TypeB",
|
|
||||||
symbol = "Default",
|
|
||||||
first_init_method = 3,
|
|
||||||
other_init_method = 3,
|
|
||||||
first_init_symbols = {},
|
|
||||||
other_init_symbols = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerReelBaseSpinRange = {
|
|
||||||
{3, 3, 3},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerReelBaseSpinReel = {
|
|
||||||
{3, 7, 2, 2, 2, 3, 5, 4, 7, 5, 5, 5, 6, 2, 4, 7, 6, 6, 6, 4, 3, 4, 0, 3, 7, 7, 6, 5, 7, 5, 4, 6, 4, 4, 3, 4, 7, 7, 7, 4, 7, 4, 7, 3, 3, 3, 5, 2, 6, 4, 4, 4, 5, 7, 7, 7, 2, 5, 7, 4, 3, 6, 5, 7, 6, 3, 6, 6, 2, 3, 5, 6, 3, 2, 2, 5, 7, 6, 6, 4, 0, 7, 7, 3, 6, 4, 7, 6, 0, 5, 5, 2, 6, 6, 2, 5, 5, 7, 7, 0, 4, 4, 4, 5, 3, 5, 6, 7, 2, 5, 6, 5, 7, 7, 7, 6, 0, 5, 7, 6, 6, 7, 7, 6, 3, 5, 0, 6, 7, 7, 5, 3, 6, 7, 7, 6, 5, 5, 0, 3, 7, 7, 7, 4, 5, 4, 4, 4, 6, 4, 4, 7, 4, 2, 6, 3, 5, 7, 5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7, 5, 6, 5, 7, 7, 7, 7, 6, 6, 3, 4, 6, 2, 3, 0, 7, 2, 0, 5, 7, 5, 5, 5, 6, 3, 5, 6, 4, 6, 7, 6, 5, 4, 2},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerReelReSpinRange = {
|
|
||||||
{3, 3, 3},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerReelReSpinReel = {
|
|
||||||
{8, 8, 0, 200, 200, 8, 8, 8, 200, 200, 0, 200, 200, 8, 8, 200, 200, 0, 0, 200, 200, 8, 200, 200, 0, 8, 8, 200, 200, 8, 0, 0, 200, 200, 8, 200, 200, 0, 200, 200, 8, 8, 200, 200, 0, 0, 0, 200, 200, 8, 200, 200, 0, 0, 8, 200, 200, 8, 200, 200},
|
|
||||||
{8, 8, 0, 200, 200, 8, 8, 8, 200, 200, 0, 200, 200, 8, 8, 200, 200, 0, 0, 200, 200, 8, 200, 200, 0, 8, 8, 200, 200, 8, 0, 0, 200, 200, 8, 200, 200, 0, 200, 200, 8, 8, 200, 200, 0, 0, 0, 200, 200, 8, 200, 200, 0, 0, 8, 200, 200, 8, 200, 200},
|
|
||||||
{8, 8, 0, 200, 200, 8, 8, 8, 200, 200, 0, 200, 200, 8, 8, 200, 200, 0, 0, 200, 200, 8, 200, 200, 0, 8, 8, 200, 200, 8, 0, 0, 200, 200, 8, 200, 200, 0, 200, 200, 8, 8, 200, 200, 0, 0, 0, 200, 200, 8, 200, 200, 0, 0, 8, 200, 200, 8, 200, 200},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerSymbol = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
name = "wild",
|
|
||||||
is_wild = true,
|
|
||||||
group = {1},
|
|
||||||
pay_rate = {0, 0, 250},
|
|
||||||
client_order = 1,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
name = "元宝",
|
|
||||||
is_wild = false,
|
|
||||||
group = {2},
|
|
||||||
pay_rate = {0, 0, 100},
|
|
||||||
client_order = 2,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
name = "玉饰",
|
|
||||||
is_wild = false,
|
|
||||||
group = {3},
|
|
||||||
pay_rate = {0, 0, 25},
|
|
||||||
client_order = 3,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
name = "福袋",
|
|
||||||
is_wild = false,
|
|
||||||
group = {4},
|
|
||||||
pay_rate = {0, 0, 10},
|
|
||||||
client_order = 4,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[5] = {
|
|
||||||
id = 5,
|
|
||||||
name = "红包",
|
|
||||||
is_wild = false,
|
|
||||||
group = {5},
|
|
||||||
pay_rate = {0, 0, 8},
|
|
||||||
client_order = 5,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[6] = {
|
|
||||||
id = 6,
|
|
||||||
name = "爆竹",
|
|
||||||
is_wild = false,
|
|
||||||
group = {6},
|
|
||||||
pay_rate = {0, 0, 5},
|
|
||||||
client_order = 6,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[7] = {
|
|
||||||
id = 7,
|
|
||||||
name = "橘子",
|
|
||||||
is_wild = false,
|
|
||||||
group = {7},
|
|
||||||
pay_rate = {0, 0, 3},
|
|
||||||
client_order = 7,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[8] = {
|
|
||||||
id = 8,
|
|
||||||
name = "SuperStack",
|
|
||||||
is_wild = false,
|
|
||||||
group = {8},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
[200] = {
|
|
||||||
id = 200,
|
|
||||||
name = "Empty",
|
|
||||||
is_wild = false,
|
|
||||||
group = {200},
|
|
||||||
pay_rate = {0, 0, 0},
|
|
||||||
client_order = 0,
|
|
||||||
client_dsc = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.FortuneTigerSymbolBetRatio = {
|
|
||||||
{
|
|
||||||
bet_ratio = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,52 +0,0 @@
|
||||||
-- <important: auto generate by excel-to-lua converter, do not modify>
|
|
||||||
local _ = {}
|
|
||||||
|
|
||||||
_.PrizeModelPrizeModelTypeA = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
ani_type = "big_win",
|
|
||||||
min_multiple = 10,
|
|
||||||
max_multiple = 25,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
ani_type = "mega_win",
|
|
||||||
min_multiple = 25,
|
|
||||||
max_multiple = 50,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
ani_type = "epic_win",
|
|
||||||
min_multiple = 50,
|
|
||||||
max_multiple = -1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
_.PrizeModelPrizeModelTypeB = {
|
|
||||||
[1] = {
|
|
||||||
id = 1,
|
|
||||||
ani_type = "big_win",
|
|
||||||
min_multiple = 15,
|
|
||||||
max_multiple = 30,
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
id = 2,
|
|
||||||
ani_type = "mega_win",
|
|
||||||
min_multiple = 30,
|
|
||||||
max_multiple = 45,
|
|
||||||
},
|
|
||||||
[3] = {
|
|
||||||
id = 3,
|
|
||||||
ani_type = "epic_win",
|
|
||||||
min_multiple = 45,
|
|
||||||
max_multiple = 60,
|
|
||||||
},
|
|
||||||
[4] = {
|
|
||||||
id = 4,
|
|
||||||
ani_type = "epic_win",
|
|
||||||
min_multiple = 60,
|
|
||||||
max_multiple = -1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return _
|
|
|
@ -1,14 +0,0 @@
|
||||||
@echo off
|
|
||||||
if exist "external" (cd external)
|
|
||||||
|
|
||||||
if not exist converter.exe (
|
|
||||||
echo Building converter...
|
|
||||||
go build -o converter.exe ../tools/converter
|
|
||||||
) else (
|
|
||||||
echo converter.exe already exists.
|
|
||||||
)
|
|
||||||
|
|
||||||
converter.exe go /excel ../internal/exported/excel2go ..
|
|
||||||
echo Done.
|
|
||||||
pause
|
|
||||||
exit
|
|
|
@ -1,3 +0,0 @@
|
||||||
# external
|
|
||||||
|
|
||||||
### 后续需要移植出去,暂时放这里
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue