GameDefs.go 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. package TribalSlot
  2. const (
  3. COLUMN_COUNT = 5
  4. ROW_COUNT = 3
  5. RESULT_COUNT = 15
  6. GAMEID = 87
  7. GAME_NAME = "tribalslot"
  8. // EVENT_BROADCAST = "TribalSlot.Broadcast"
  9. //EVENT_JACKPOT = "TribalSlot.Jackpot"
  10. GAME_MESSAGE = "tribalslot"
  11. )
  12. type Slot struct {
  13. SlotID int // 编号
  14. Name string // 描述
  15. IsMagic int // 万能牌
  16. }
  17. func (s *Slot) isMagic() bool {
  18. return s.IsMagic > 0
  19. }
  20. type SlotCount struct {
  21. SlotID int
  22. Count int
  23. }
  24. // 中奖连线信息
  25. type Result struct {
  26. SlotID int // 格子ID
  27. SlotCount int // 数量
  28. WinShapeID int // 连线ID
  29. WinRate int // 赢的倍数
  30. }
  31. type SlotCount_Rate struct {
  32. P int // 概率
  33. S []int // 数量
  34. }
  35. // 消息定义
  36. const (
  37. Msg_Bet = 1 // 下注
  38. Msg_Result = 2 // 发送结果
  39. Msg_Jackpot = 3 // 获取彩池额度
  40. Msg_Slots = 4 // 获取目前使用的Slot类型
  41. Msg_WinShapes = 5
  42. Msg_GetConfig = 6 // 获取配置信息
  43. Msg_Broadcast = 7 // 奖池广播
  44. Msg_Enter = 8 // 进入游戏
  45. Msg_Exit = 9 // 离开游戏
  46. Msg_FreeAdConfig = 10 // 广告配置及自己的剩余
  47. Msg_UseAd = 11 // 看广告后请求免费次数
  48. )
  49. type TribalSlot_Message struct {
  50. MsgID int
  51. Data string
  52. }
  53. type TribalSlot_Bet struct {
  54. Amount int
  55. ErrorMsg string
  56. }
  57. type SpecialResult struct {
  58. SlotID int
  59. SlotCount int
  60. WinRate1 int
  61. WinRate2 int
  62. }
  63. type JackpotResult struct {
  64. WinShapeID int // 连线ID
  65. Amount int // 中奖金额
  66. }
  67. type TribalSlot_Result struct {
  68. BetAmount int // 下注金额
  69. WinAmount int // 共赢金额
  70. Slots []int // 15个格子ID
  71. Lines []Result // 中奖连线
  72. Special SpecialResult // 特殊奖励,如果没有,则SlotCount == 0
  73. Jackpot JackpotResult // 是否中了奖池
  74. FreeSpin int // 本次结果获取的免费次数
  75. }
  76. type TribalSlot_Jackpot struct {
  77. Amount int
  78. }
  79. type JackPot_Broadcast struct {
  80. UserID int
  81. Amount int
  82. FaceID int
  83. FaceChangeIndex int
  84. FaceUrl string
  85. NickName string
  86. Vip int
  87. Sex int
  88. }
  89. type TestSlots struct {
  90. Slots []int
  91. }
  92. type FafafaSlot_FreeAdBet struct {
  93. AdCount int
  94. BetAmount int
  95. }
  96. type FafafaSlot_FreeAdConfig struct {
  97. TotalAdCount int // 每日免费次数
  98. AdCount int // 剩余次数
  99. FreeSpinCount int // 看广告后获取的免费次数
  100. Bet int // 本次看视频获得的底注
  101. AdBets []FafafaSlot_FreeAdBet
  102. }
  103. // 下行数据,上行无数据
  104. type FafafaSlot_UsedAd struct {
  105. FreeSpinCount int // 获取免费次数,如果为0 表示没有免费
  106. Bet int // 免费次数的底注
  107. AdCount int // 剩余次数
  108. NextAdBetAmount int // 下次广告的底注
  109. }