GameDefs.go 2.6 KB

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