176 lines
4.3 KiB
Go
176 lines
4.3 KiB
Go
package fruits
|
|
|
|
// 房间类型
|
|
const (
|
|
RoomMode_Classic int = iota //经典
|
|
RoomMode_Max
|
|
)
|
|
|
|
// 场景状态
|
|
const (
|
|
FruitsStateStart int = iota //默认状态
|
|
FruitsStateMax
|
|
)
|
|
|
|
// 玩家操作
|
|
const (
|
|
FruitsPlayerOpStart int = iota
|
|
FruitsPlayerOpSwitch
|
|
)
|
|
const NowByte int64 = 10000
|
|
const (
|
|
Normal = iota //正常
|
|
FreeGame //免费游戏
|
|
MaryGame //玛丽游戏
|
|
)
|
|
const (
|
|
Column = 3
|
|
Row = 5
|
|
)
|
|
const (
|
|
Wild int32 = iota //0
|
|
Bonus //1
|
|
Scatter //2
|
|
Bar //3
|
|
Cherry //4.樱桃
|
|
Bell //5.铃铛
|
|
Pineapple //6.菠萝
|
|
Grape //7.葡萄
|
|
Lemon //8.柠檬
|
|
Watermelon //9.西瓜
|
|
Banana //10.香蕉
|
|
Apple //11.苹果
|
|
Bomb //12.炸弹
|
|
EleMax
|
|
)
|
|
|
|
//0|0|0|0|1|0|1|1|1|1|1|1|1
|
|
|
|
//炸弹 香蕉 樱桃 西瓜 葡萄 菠萝 柠檬 苹果
|
|
|
|
//炸弹 香蕉 樱桃 西瓜 葡萄 菠萝
|
|
//炸弹 西瓜 香蕉 苹果 樱桃 柠檬
|
|
//炸弹 香蕉 菠萝 苹果 柠檬 葡萄
|
|
//炸弹 西瓜 菠萝 樱桃 柠檬 葡萄
|
|
|
|
var MaryEleArray = []int32{
|
|
Bomb, Banana, Cherry, Watermelon, Grape, Pineapple,
|
|
Bomb, Watermelon, Banana, Apple, Cherry, Lemon,
|
|
Bomb, Banana, Pineapple, Apple, Lemon, Grape,
|
|
Bomb, Watermelon, Pineapple, Cherry, Lemon, Grape,
|
|
}
|
|
|
|
// 玛丽外围元素概率
|
|
var MaryEleRate = []int32{
|
|
550, 500, 400, 100, 200, 700,
|
|
550, 100, 500, 600, 400, 300,
|
|
550, 500, 700, 600, 300, 200,
|
|
550, 100, 700, 400, 300, 200,
|
|
}
|
|
|
|
// 玛丽中间元素概率
|
|
var MaryMidEleRate = []int32{0, 0, 0, 0, 400, 0, 700, 200, 300, 100, 500, 600, 0}
|
|
|
|
// 元素对应数量的倍率
|
|
var EleNumRate = make(map[int32]map[int]int64)
|
|
|
|
// 9条线
|
|
var LineWinNum = [][]int{
|
|
{0, 1, 2, 3, 4},
|
|
{5, 6, 7, 8, 9},
|
|
{10, 11, 12, 13, 14},
|
|
{0, 6, 12, 8, 4},
|
|
{10, 6, 2, 8, 14},
|
|
{0, 1, 7, 13, 14},
|
|
{10, 11, 7, 3, 4},
|
|
{5, 1, 7, 13, 9},
|
|
{5, 11, 7, 3, 9},
|
|
}
|
|
|
|
type WinLine struct {
|
|
Lines []int32
|
|
Poss []int32
|
|
LineId int
|
|
Rate int64
|
|
}
|
|
type WinResult struct {
|
|
EleValue []int32
|
|
WinLine []WinLine //赢的线数
|
|
//玛丽游戏
|
|
MaryOutSide int32 //外围索引
|
|
MaryMidArray []int32 //中间数组
|
|
MaryOutRate int64
|
|
MaryMidRate int64
|
|
MaryLianXu int32 //中间n连续
|
|
}
|
|
|
|
var EleWeight = [][]int32{
|
|
{25, 100, 200, 170, 210, 255, 602, 1385, 1680, 3865, 10500},
|
|
{3365, 1273, 1000, 625, 685, 975, 1490, 4310, 9755, 10500},
|
|
{5766, 1050, 1050, 730, 815, 860, 1255, 1750, 3500, 8420, 9510},
|
|
{175, 1601, 1150, 645, 775, 820, 1460, 1680, 4050, 6000, 7850},
|
|
{150, 1498, 1168, 650, 688, 699, 8731, 1100, 2150, 2240, 2811},
|
|
|
|
{720, 495, 949, 780, 870, 945, 1170, 3150, 5715, 3210, 3270},
|
|
{5300, 564, 730, 1100, 1200, 1215, 3210, 3040, 3530, 2700, 3970},
|
|
{7800, 0, 0, 800, 880, 935, 2800, 5000, 4800, 6080, 7200},
|
|
{930, 1070, 1273, 1210, 1885, 2550, 4330, 5090, 5600, 9135, 9999},
|
|
{968, 1119, 1000, 1630, 2345, 3050, 3475, 3800, 3600, 4180, 5000},
|
|
|
|
{0, 0, 0, 0, 709, 0, 563, 6316, 5204, 9945, 1568, 1064, 88},
|
|
{0, 0, 0, 0, 673, 0, 539, 6317, 5296, 9958, 537, 1032},
|
|
}
|
|
|
|
func init() {
|
|
EleNumRate[Bonus] = make(map[int]int64)
|
|
EleNumRate[Bonus][3] = 25
|
|
EleNumRate[Bonus][4] = 50
|
|
EleNumRate[Bonus][5] = 400
|
|
|
|
EleNumRate[Scatter] = make(map[int]int64)
|
|
EleNumRate[Scatter][3] = 100
|
|
EleNumRate[Scatter][4] = 200
|
|
EleNumRate[Scatter][5] = 1750
|
|
|
|
EleNumRate[Bar] = make(map[int]int64)
|
|
EleNumRate[Bar][3] = 75
|
|
EleNumRate[Bar][4] = 175
|
|
EleNumRate[Bar][5] = 1250
|
|
|
|
EleNumRate[Cherry] = make(map[int]int64)
|
|
EleNumRate[Cherry][3] = 45
|
|
EleNumRate[Cherry][4] = 100
|
|
EleNumRate[Cherry][5] = 800
|
|
|
|
EleNumRate[Bell] = make(map[int]int64)
|
|
EleNumRate[Bell][3] = 35
|
|
EleNumRate[Bell][4] = 80
|
|
EleNumRate[Bell][5] = 650
|
|
|
|
EleNumRate[Pineapple] = make(map[int]int64)
|
|
EleNumRate[Pineapple][3] = 30
|
|
EleNumRate[Pineapple][4] = 70
|
|
EleNumRate[Pineapple][5] = 550
|
|
|
|
EleNumRate[Grape] = make(map[int]int64)
|
|
EleNumRate[Grape][3] = 25
|
|
EleNumRate[Grape][4] = 50
|
|
EleNumRate[Grape][5] = 400
|
|
|
|
EleNumRate[Lemon] = make(map[int]int64)
|
|
EleNumRate[Lemon][3] = 15
|
|
EleNumRate[Lemon][4] = 40
|
|
EleNumRate[Lemon][5] = 250
|
|
|
|
EleNumRate[Watermelon] = make(map[int]int64)
|
|
EleNumRate[Watermelon][3] = 3
|
|
EleNumRate[Watermelon][4] = 10
|
|
EleNumRate[Watermelon][5] = 85
|
|
|
|
EleNumRate[Banana] = make(map[int]int64)
|
|
EleNumRate[Banana][2] = 1
|
|
EleNumRate[Banana][3] = 3
|
|
EleNumRate[Banana][4] = 10
|
|
EleNumRate[Banana][5] = 75
|
|
}
|