Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop

This commit is contained in:
sk 2024-11-12 13:11:40 +08:00
commit 4da947cd56
53 changed files with 463 additions and 1410 deletions

View File

@ -18,16 +18,19 @@ func DataToCli(response any) interface{} {
} }
sort.Slice(Response.BetChangeList, func(i, j int) bool { return Response.BetChangeList[i] < Response.BetChangeList[j] }) sort.Slice(Response.BetChangeList, func(i, j int) bool { return Response.BetChangeList[i] < Response.BetChangeList[j] })
sort.Slice(Response.BetLevels, func(i, j int) bool { return Response.BetLevels[i] < Response.BetLevels[j] }) sort.Slice(Response.BetLevels, func(i, j int) bool { return Response.BetLevels[i] < Response.BetLevels[j] })
sort.Slice(Response.BaseBets, func(i, j int) bool { return Response.BaseBets[i] < Response.BaseBets[j] })
sort.Slice(BetSizes, func(i, j int) bool { return BetSizes[i] < BetSizes[j] }) sort.Slice(BetSizes, func(i, j int) bool { return BetSizes[i] < BetSizes[j] })
tableInfo.BetConfig = BetConfig{ tableInfo.BetConfig = BetConfig{
BetChangeList: Response.BetChangeList, BetChangeList: Response.BetChangeList,
BetSize: BetSizes, BetSize: BetSizes,
BaseBet: Response.BaseBets,
BetLevel: Response.BetLevels, BetLevel: Response.BetLevels,
BetLines: Response.BetLines, BetLines: Response.BetLines,
BetType: 1, BetType: 1,
BetSizeIndex: Response.BetSizeIndex, BetSizeIndex: Response.BetSizeIndex,
BetLevelIndex: Response.BetLevelIndex, BetLevelIndex: Response.BetLevelIndex,
BetLineIndex: Response.BetLineIndex, BetLineIndex: Response.BetLineIndex,
BaseBetIndex: Response.BaseBetIndex,
} }
tableInfo.Coin = float64(Response.Coin) / CoinRate tableInfo.Coin = float64(Response.Coin) / CoinRate
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////

View File

@ -47,10 +47,12 @@ type BetConfig struct {
BetSize []float64 `json:"bet_size"` //单注 BetSize []float64 `json:"bet_size"` //单注
BetLevel []int64 `json:"bet_level"` //下注线数 BetLevel []int64 `json:"bet_level"` //下注线数
BetLines []int64 `json:"bet_lines"` //可选线数 BetLines []int64 `json:"bet_lines"` //可选线数
BaseBet []int64 `json:"base_bet"` //下注基数
BetType int `json:"bet_type"` //total计算方式 1.显示成Lines betSize*betLevel*lines lines BetType int `json:"bet_type"` //total计算方式 1.显示成Lines betSize*betLevel*lines lines
BetSizeIndex int64 `json:"bet_size_index"` //选中的单注下标 BetSizeIndex int64 `json:"bet_size_index"` //选中的单注下标
BetLevelIndex int64 `json:"bet_level_index"` //选中的等级下标 BetLevelIndex int64 `json:"bet_level_index"` //选中的等级下标
BetLineIndex int64 `json:"bet_line_index"` //选中的线数下标 BetLineIndex int64 `json:"bet_line_index"` //选中的线数下标
BaseBetIndex int64 `json:"base_bet_index"` //选中的下注基数下标
} }
type TableInfo struct { type TableInfo struct {
SpinResult GameEnd `json:"spin_result"` SpinResult GameEnd `json:"spin_result"`

View File

@ -134,7 +134,8 @@ func init() {
CashManiaBetBetLine = map[int64]*structs.CashManiaBetBetLine{ CashManiaBetBetLine = map[int64]*structs.CashManiaBetBetLine{
0: { 0: {
Index: 0, Index: 0,
BetLine: 10, BetLine: 1,
BaseBet: 10,
}, },
} }
@ -194,6 +195,129 @@ func init() {
}, },
} }
CashManiaItemInfo = map[int64]*structs.CashManiaItemInfo{
1: {
Index: 1,
ItemID: 1,
Value: 10,
IsMid: false,
},
2: {
Index: 2,
ItemID: 2,
Value: 5,
IsMid: false,
},
3: {
Index: 3,
ItemID: 3,
Value: 1,
IsMid: false,
},
4: {
Index: 4,
ItemID: 4,
Value: 0.5,
IsMid: false,
},
5: {
Index: 5,
ItemID: 5,
Value: 0.1,
IsMid: false,
},
6: {
Index: 6,
ItemID: 6,
Value: 1,
IsMid: true,
},
7: {
Index: 7,
ItemID: 7,
Value: 1,
IsMid: true,
},
8: {
Index: 8,
ItemID: 8,
Value: 1,
IsMid: true,
},
9: {
Index: 9,
ItemID: 9,
Value: 1,
IsMid: true,
},
10: {
Index: 10,
ItemID: 10,
Value: 2,
IsMid: true,
},
11: {
Index: 11,
ItemID: 11,
Value: 3,
IsMid: true,
},
12: {
Index: 12,
ItemID: 12,
Value: 5,
IsMid: true,
},
13: {
Index: 13,
ItemID: 13,
Value: 10,
IsMid: true,
},
14: {
Index: 14,
ItemID: 14,
Value: 15,
IsMid: true,
},
15: {
Index: 15,
ItemID: 15,
Value: 20,
IsMid: true,
},
16: {
Index: 16,
ItemID: 16,
Value: 30,
IsMid: true,
},
17: {
Index: 17,
ItemID: 17,
Value: 40,
IsMid: true,
},
18: {
Index: 18,
ItemID: 18,
Value: 50,
IsMid: true,
},
19: {
Index: 19,
ItemID: 19,
Value: 100,
IsMid: true,
},
200: {
Index: 200,
ItemID: 200,
Value: 0,
IsMid: true,
},
}
CashManiaMapRTPMode = map[int64]*structs.CashManiaMapRTPMode{ CashManiaMapRTPMode = map[int64]*structs.CashManiaMapRTPMode{
1: { 1: {
ID: 1, ID: 1,
@ -468,7 +592,7 @@ func init() {
CashManiaSymbol = map[int64]*structs.CashManiaSymbol{ CashManiaSymbol = map[int64]*structs.CashManiaSymbol{
1: { 1: {
ID: 1, ID: 1,
Name: "100倍", Name: "10倍",
IsWild: false, IsWild: false,
Group: []int64{1}, Group: []int64{1},
PayRate: []int64{0, 0, 100}, PayRate: []int64{0, 0, 100},

View File

@ -174,6 +174,7 @@ func init() {
0: { 0: {
Index: 0, Index: 0,
BetLine: 5, BetLine: 5,
BaseBet: 1,
}, },
} }

View File

@ -135,6 +135,7 @@ func init() {
0: { 0: {
Index: 0, Index: 0,
BetLine: 5, BetLine: 5,
BaseBet: 1,
}, },
} }

View File

@ -10,79 +10,79 @@ func init() {
FortuneOxBetBetChangeList = map[int64]*structs.FortuneOxBetBetChangeList{ FortuneOxBetBetChangeList = map[int64]*structs.FortuneOxBetBetChangeList{
0: { 0: {
Index: 0, Index: 0,
BetChangeList: 0.3, BetChangeList: 300000,
BetSizeIndex: 0, BetSizeIndex: 0,
BetLevelIndex: 0, BetLevelIndex: 0,
}, },
1: { 1: {
Index: 1, Index: 1,
BetChangeList: 0.6, BetChangeList: 600000,
BetSizeIndex: 0, BetSizeIndex: 0,
BetLevelIndex: 1, BetLevelIndex: 1,
}, },
2: { 2: {
Index: 2, Index: 2,
BetChangeList: 0.9, BetChangeList: 900000,
BetSizeIndex: 0, BetSizeIndex: 0,
BetLevelIndex: 2, BetLevelIndex: 2,
}, },
3: { 3: {
Index: 3, Index: 3,
BetChangeList: 1, BetChangeList: 1000000,
BetSizeIndex: 1, BetSizeIndex: 1,
BetLevelIndex: 0, BetLevelIndex: 0,
}, },
4: { 4: {
Index: 4, Index: 4,
BetChangeList: 1.5, BetChangeList: 1500000,
BetSizeIndex: 0, BetSizeIndex: 0,
BetLevelIndex: 4, BetLevelIndex: 4,
}, },
5: { 5: {
Index: 5, Index: 5,
BetChangeList: 3, BetChangeList: 3000000,
BetSizeIndex: 0, BetSizeIndex: 0,
BetLevelIndex: 9, BetLevelIndex: 9,
}, },
6: { 6: {
Index: 6, Index: 6,
BetChangeList: 5, BetChangeList: 5000000,
BetSizeIndex: 1, BetSizeIndex: 1,
BetLevelIndex: 4, BetLevelIndex: 4,
}, },
7: { 7: {
Index: 7, Index: 7,
BetChangeList: 9, BetChangeList: 9000000,
BetSizeIndex: 3, BetSizeIndex: 3,
BetLevelIndex: 0, BetLevelIndex: 0,
}, },
8: { 8: {
Index: 8, Index: 8,
BetChangeList: 10, BetChangeList: 10000000,
BetSizeIndex: 1, BetSizeIndex: 1,
BetLevelIndex: 9, BetLevelIndex: 9,
}, },
9: { 9: {
Index: 9, Index: 9,
BetChangeList: 15, BetChangeList: 15000000,
BetSizeIndex: 2, BetSizeIndex: 2,
BetLevelIndex: 4, BetLevelIndex: 4,
}, },
10: { 10: {
Index: 10, Index: 10,
BetChangeList: 30, BetChangeList: 30000000,
BetSizeIndex: 2, BetSizeIndex: 2,
BetLevelIndex: 9, BetLevelIndex: 9,
}, },
11: { 11: {
Index: 11, Index: 11,
BetChangeList: 45, BetChangeList: 45000000,
BetSizeIndex: 3, BetSizeIndex: 3,
BetLevelIndex: 4, BetLevelIndex: 4,
}, },
12: { 12: {
Index: 12, Index: 12,
BetChangeList: 90, BetChangeList: 90000000,
BetSizeIndex: 3, BetSizeIndex: 3,
BetLevelIndex: 9, BetLevelIndex: 9,
}, },
@ -135,25 +135,26 @@ func init() {
0: { 0: {
Index: 0, Index: 0,
BetLine: 10, BetLine: 10,
BaseBet: 1,
}, },
} }
FortuneOxBetBetSize = map[int64]*structs.FortuneOxBetBetSize{ FortuneOxBetBetSize = map[int64]*structs.FortuneOxBetBetSize{
0: { 0: {
Index: 0, Index: 0,
BetSize: 300, BetSize: 300000000,
}, },
1: { 1: {
Index: 1, Index: 1,
BetSize: 1000, BetSize: 1000000000,
}, },
2: { 2: {
Index: 2, Index: 2,
BetSize: 3000, BetSize: 3000000000,
}, },
3: { 3: {
Index: 3, Index: 3,
BetSize: 9000, BetSize: 9000000000,
}, },
} }

View File

@ -135,6 +135,7 @@ func init() {
0: { 0: {
Index: 0, Index: 0,
BetLine: 10, BetLine: 10,
BaseBet: 1,
}, },
} }

View File

@ -135,6 +135,7 @@ func init() {
0: { 0: {
Index: 0, Index: 0,
BetLine: 5, BetLine: 5,
BaseBet: 1,
}, },
} }

View File

@ -10,6 +10,7 @@ var (
CashManiaBetBetSize = map[int64]*structs.CashManiaBetBetSize{} CashManiaBetBetSize = map[int64]*structs.CashManiaBetBetSize{}
CashManiaBetFirstBet = map[int64]*structs.CashManiaBetFirstBet{} CashManiaBetFirstBet = map[int64]*structs.CashManiaBetFirstBet{}
CashManiaFormation = []*structs.CashManiaFormation{} CashManiaFormation = []*structs.CashManiaFormation{}
CashManiaItemInfo = map[int64]*structs.CashManiaItemInfo{}
CashManiaMapRTPMode = map[int64]*structs.CashManiaMapRTPMode{} CashManiaMapRTPMode = map[int64]*structs.CashManiaMapRTPMode{}
CashManiaMidItemInfo = map[int64]*structs.CashManiaMidItemInfo{} CashManiaMidItemInfo = map[int64]*structs.CashManiaMidItemInfo{}
CashManiaOthers = []*structs.CashManiaOthers{} CashManiaOthers = []*structs.CashManiaOthers{}
@ -119,46 +120,6 @@ var (
FortuneTigerSuperStackWeight = []*structs.FortuneTigerSuperStackWeight{} FortuneTigerSuperStackWeight = []*structs.FortuneTigerSuperStackWeight{}
FortuneTigerSymbolBetRatio = []*structs.FortuneTigerSymbolBetRatio{} FortuneTigerSymbolBetRatio = []*structs.FortuneTigerSymbolBetRatio{}
FortuneTigerSymbol = map[int64]*structs.FortuneTigerSymbol{} FortuneTigerSymbol = map[int64]*structs.FortuneTigerSymbol{}
GateofOlympusBetBetChangeList = map[int64]*structs.GateofOlympusBetBetChangeList{}
GateofOlympusBetBetLevel = map[int64]*structs.GateofOlympusBetBetLevel{}
GateofOlympusBetBetLine = map[int64]*structs.GateofOlympusBetBetLine{}
GateofOlympusBetBetSize = map[int64]*structs.GateofOlympusBetBetSize{}
GateofOlympusBetFirstBet = map[int64]*structs.GateofOlympusBetFirstBet{}
GateofOlympusFormation = []*structs.GateofOlympusFormation{}
GateofOlympusMapRTPMode = map[int64]*structs.GateofOlympusMapRTPMode{}
GateofOlympusMultiplier = []*structs.GateofOlympusMultiplier{}
GateofOlympusMultiplierKeyID = map[int64]*structs.GateofOlympusMultiplierKeyID{}
GateofOlympusReelBaseSpin1Range = [][]int64{}
GateofOlympusReelBaseSpin1Reel = [][]int64{}
GateofOlympusReelBaseSpin1Weight = [][]float64{}
GateofOlympusReelBaseSpin2Range = [][]int64{}
GateofOlympusReelBaseSpin2Reel = [][]int64{}
GateofOlympusReelBaseSpin2Weight = [][]float64{}
GateofOlympusReelBaseSpin3Range = [][]int64{}
GateofOlympusReelBaseSpin3Reel = [][]int64{}
GateofOlympusReelBaseSpin3Weight = [][]float64{}
GateofOlympusReelBaseSpin7Range = [][]int64{}
GateofOlympusReelBaseSpin7Reel = [][]int64{}
GateofOlympusReelBaseSpin7Weight = [][]float64{}
GateofOlympusReelBaseSpin8Range = [][]int64{}
GateofOlympusReelBaseSpin8Reel = [][]int64{}
GateofOlympusReelBaseSpin8Weight = [][]float64{}
GateofOlympusReelBaseSpinRange = [][]int64{}
GateofOlympusReelBaseSpinReel = [][]int64{}
GateofOlympusReelBaseSpinWeight = [][]float64{}
GateofOlympusReelChoose = []*structs.GateofOlympusReelChoose{}
GateofOlympusReelFreeSpin4Range = [][]int64{}
GateofOlympusReelFreeSpin4Reel = [][]int64{}
GateofOlympusReelFreeSpin4Weight = [][]float64{}
GateofOlympusReelFreeSpin5Range = [][]int64{}
GateofOlympusReelFreeSpin5Reel = [][]int64{}
GateofOlympusReelFreeSpin5Weight = [][]float64{}
GateofOlympusReelFreeSpinRange = [][]int64{}
GateofOlympusReelFreeSpinReel = [][]int64{}
GateofOlympusReelFreeSpinWeight = [][]float64{}
GateofOlympusScatter = map[int64]*structs.GateofOlympusScatter{}
GateofOlympusSymbolBetRatio = []*structs.GateofOlympusSymbolBetRatio{}
GateofOlympusSymbol = map[int64]*structs.GateofOlympusSymbol{}
MatrixFeaturesForm15X1TypeA = []*structs.MatrixFeaturesForm15X1TypeA{} MatrixFeaturesForm15X1TypeA = []*structs.MatrixFeaturesForm15X1TypeA{}
MatrixFeaturesForm19X1TypeA = []*structs.MatrixFeaturesForm19X1TypeA{} MatrixFeaturesForm19X1TypeA = []*structs.MatrixFeaturesForm19X1TypeA{}
MatrixFeaturesForm20X1TypeA = []*structs.MatrixFeaturesForm20X1TypeA{} MatrixFeaturesForm20X1TypeA = []*structs.MatrixFeaturesForm20X1TypeA{}

View File

@ -69,6 +69,7 @@ func StoragesLoading(data map[string]string) {
Load(data, "Base.CashMania/Bet.BetSize", &base.CashManiaBetBetSize) Load(data, "Base.CashMania/Bet.BetSize", &base.CashManiaBetBetSize)
Load(data, "Base.CashMania/Bet.FirstBet", &base.CashManiaBetFirstBet) Load(data, "Base.CashMania/Bet.FirstBet", &base.CashManiaBetFirstBet)
Load(data, "Base.CashMania/Formation.Default", &base.CashManiaFormation) Load(data, "Base.CashMania/Formation.Default", &base.CashManiaFormation)
Load(data, "Base.CashMania/ItemInfo.Default", &base.CashManiaItemInfo)
Load(data, "Base.CashMania/Map.RTPMode", &base.CashManiaMapRTPMode) Load(data, "Base.CashMania/Map.RTPMode", &base.CashManiaMapRTPMode)
Load(data, "Base.CashMania/MidItemInfo.Default", &base.CashManiaMidItemInfo) Load(data, "Base.CashMania/MidItemInfo.Default", &base.CashManiaMidItemInfo)
Load(data, "Base.CashMania/Others.Default", &base.CashManiaOthers) Load(data, "Base.CashMania/Others.Default", &base.CashManiaOthers)
@ -178,46 +179,6 @@ func StoragesLoading(data map[string]string) {
Load(data, "Base.FortuneTiger/SuperStack.Weight", &base.FortuneTigerSuperStackWeight) Load(data, "Base.FortuneTiger/SuperStack.Weight", &base.FortuneTigerSuperStackWeight)
Load(data, "Base.FortuneTiger/Symbol.BetRatio", &base.FortuneTigerSymbolBetRatio) Load(data, "Base.FortuneTiger/Symbol.BetRatio", &base.FortuneTigerSymbolBetRatio)
Load(data, "Base.FortuneTiger/Symbol.Default", &base.FortuneTigerSymbol) Load(data, "Base.FortuneTiger/Symbol.Default", &base.FortuneTigerSymbol)
Load(data, "Base.GateofOlympus/Bet.BetChangeList", &base.GateofOlympusBetBetChangeList)
Load(data, "Base.GateofOlympus/Bet.BetLevel", &base.GateofOlympusBetBetLevel)
Load(data, "Base.GateofOlympus/Bet.BetLine", &base.GateofOlympusBetBetLine)
Load(data, "Base.GateofOlympus/Bet.BetSize", &base.GateofOlympusBetBetSize)
Load(data, "Base.GateofOlympus/Bet.FirstBet", &base.GateofOlympusBetFirstBet)
Load(data, "Base.GateofOlympus/Formation.Default", &base.GateofOlympusFormation)
Load(data, "Base.GateofOlympus/Map.RTPMode", &base.GateofOlympusMapRTPMode)
Load(data, "Base.GateofOlympus/Multiplier.Default", &base.GateofOlympusMultiplier)
Load(data, "Base.GateofOlympus/Multiplier.Default/ID", &base.GateofOlympusMultiplierKeyID)
Load(data, "Base.GateofOlympus/ReelBaseSpin1.Range", &base.GateofOlympusReelBaseSpin1Range)
Load(data, "Base.GateofOlympus/ReelBaseSpin1.Reel", &base.GateofOlympusReelBaseSpin1Reel)
Load(data, "Base.GateofOlympus/ReelBaseSpin1.Weight", &base.GateofOlympusReelBaseSpin1Weight)
Load(data, "Base.GateofOlympus/ReelBaseSpin2.Range", &base.GateofOlympusReelBaseSpin2Range)
Load(data, "Base.GateofOlympus/ReelBaseSpin2.Reel", &base.GateofOlympusReelBaseSpin2Reel)
Load(data, "Base.GateofOlympus/ReelBaseSpin2.Weight", &base.GateofOlympusReelBaseSpin2Weight)
Load(data, "Base.GateofOlympus/ReelBaseSpin3.Range", &base.GateofOlympusReelBaseSpin3Range)
Load(data, "Base.GateofOlympus/ReelBaseSpin3.Reel", &base.GateofOlympusReelBaseSpin3Reel)
Load(data, "Base.GateofOlympus/ReelBaseSpin3.Weight", &base.GateofOlympusReelBaseSpin3Weight)
Load(data, "Base.GateofOlympus/ReelBaseSpin7.Range", &base.GateofOlympusReelBaseSpin7Range)
Load(data, "Base.GateofOlympus/ReelBaseSpin7.Reel", &base.GateofOlympusReelBaseSpin7Reel)
Load(data, "Base.GateofOlympus/ReelBaseSpin7.Weight", &base.GateofOlympusReelBaseSpin7Weight)
Load(data, "Base.GateofOlympus/ReelBaseSpin8.Range", &base.GateofOlympusReelBaseSpin8Range)
Load(data, "Base.GateofOlympus/ReelBaseSpin8.Reel", &base.GateofOlympusReelBaseSpin8Reel)
Load(data, "Base.GateofOlympus/ReelBaseSpin8.Weight", &base.GateofOlympusReelBaseSpin8Weight)
Load(data, "Base.GateofOlympus/ReelBaseSpin.Range", &base.GateofOlympusReelBaseSpinRange)
Load(data, "Base.GateofOlympus/ReelBaseSpin.Reel", &base.GateofOlympusReelBaseSpinReel)
Load(data, "Base.GateofOlympus/ReelBaseSpin.Weight", &base.GateofOlympusReelBaseSpinWeight)
Load(data, "Base.GateofOlympus/ReelChoose.Default", &base.GateofOlympusReelChoose)
Load(data, "Base.GateofOlympus/ReelFreeSpin4.Range", &base.GateofOlympusReelFreeSpin4Range)
Load(data, "Base.GateofOlympus/ReelFreeSpin4.Reel", &base.GateofOlympusReelFreeSpin4Reel)
Load(data, "Base.GateofOlympus/ReelFreeSpin4.Weight", &base.GateofOlympusReelFreeSpin4Weight)
Load(data, "Base.GateofOlympus/ReelFreeSpin5.Range", &base.GateofOlympusReelFreeSpin5Range)
Load(data, "Base.GateofOlympus/ReelFreeSpin5.Reel", &base.GateofOlympusReelFreeSpin5Reel)
Load(data, "Base.GateofOlympus/ReelFreeSpin5.Weight", &base.GateofOlympusReelFreeSpin5Weight)
Load(data, "Base.GateofOlympus/ReelFreeSpin.Range", &base.GateofOlympusReelFreeSpinRange)
Load(data, "Base.GateofOlympus/ReelFreeSpin.Reel", &base.GateofOlympusReelFreeSpinReel)
Load(data, "Base.GateofOlympus/ReelFreeSpin.Weight", &base.GateofOlympusReelFreeSpinWeight)
Load(data, "Base.GateofOlympus/Scatter.Default", &base.GateofOlympusScatter)
Load(data, "Base.GateofOlympus/Symbol.BetRatio", &base.GateofOlympusSymbolBetRatio)
Load(data, "Base.GateofOlympus/Symbol.Default", &base.GateofOlympusSymbol)
Load(data, "Base.Matrix/FeaturesForm15X1TypeA.Default", &base.MatrixFeaturesForm15X1TypeA) Load(data, "Base.Matrix/FeaturesForm15X1TypeA.Default", &base.MatrixFeaturesForm15X1TypeA)
Load(data, "Base.Matrix/FeaturesForm19X1TypeA.Default", &base.MatrixFeaturesForm19X1TypeA) Load(data, "Base.Matrix/FeaturesForm19X1TypeA.Default", &base.MatrixFeaturesForm19X1TypeA)
Load(data, "Base.Matrix/FeaturesForm20X1TypeA.Default", &base.MatrixFeaturesForm20X1TypeA) Load(data, "Base.Matrix/FeaturesForm20X1TypeA.Default", &base.MatrixFeaturesForm20X1TypeA)
@ -330,6 +291,7 @@ func StoragesMapping() {
Set("Base", "CashMania/Bet", "BetSize", base.CashManiaBetBetSize) Set("Base", "CashMania/Bet", "BetSize", base.CashManiaBetBetSize)
Set("Base", "CashMania/Bet", "FirstBet", base.CashManiaBetFirstBet) Set("Base", "CashMania/Bet", "FirstBet", base.CashManiaBetFirstBet)
Set("Base", "CashMania/Formation", "Default", base.CashManiaFormation) Set("Base", "CashMania/Formation", "Default", base.CashManiaFormation)
Set("Base", "CashMania/ItemInfo", "Default", base.CashManiaItemInfo)
Set("Base", "CashMania/Map", "RTPMode", base.CashManiaMapRTPMode) Set("Base", "CashMania/Map", "RTPMode", base.CashManiaMapRTPMode)
Set("Base", "CashMania/MidItemInfo", "Default", base.CashManiaMidItemInfo) Set("Base", "CashMania/MidItemInfo", "Default", base.CashManiaMidItemInfo)
Set("Base", "CashMania/Others", "Default", base.CashManiaOthers) Set("Base", "CashMania/Others", "Default", base.CashManiaOthers)
@ -439,46 +401,6 @@ func StoragesMapping() {
Set("Base", "FortuneTiger/SuperStack", "Weight", base.FortuneTigerSuperStackWeight) Set("Base", "FortuneTiger/SuperStack", "Weight", base.FortuneTigerSuperStackWeight)
Set("Base", "FortuneTiger/Symbol", "BetRatio", base.FortuneTigerSymbolBetRatio) Set("Base", "FortuneTiger/Symbol", "BetRatio", base.FortuneTigerSymbolBetRatio)
Set("Base", "FortuneTiger/Symbol", "Default", base.FortuneTigerSymbol) Set("Base", "FortuneTiger/Symbol", "Default", base.FortuneTigerSymbol)
Set("Base", "GateofOlympus/Bet", "BetChangeList", base.GateofOlympusBetBetChangeList)
Set("Base", "GateofOlympus/Bet", "BetLevel", base.GateofOlympusBetBetLevel)
Set("Base", "GateofOlympus/Bet", "BetLine", base.GateofOlympusBetBetLine)
Set("Base", "GateofOlympus/Bet", "BetSize", base.GateofOlympusBetBetSize)
Set("Base", "GateofOlympus/Bet", "FirstBet", base.GateofOlympusBetFirstBet)
Set("Base", "GateofOlympus/Formation", "Default", base.GateofOlympusFormation)
Set("Base", "GateofOlympus/Map", "RTPMode", base.GateofOlympusMapRTPMode)
Set("Base", "GateofOlympus/Multiplier", "Default", base.GateofOlympusMultiplier)
Set("Base", "GateofOlympus/Multiplier", "Default/ID", base.GateofOlympusMultiplierKeyID)
Set("Base", "GateofOlympus/ReelBaseSpin1", "Range", base.GateofOlympusReelBaseSpin1Range)
Set("Base", "GateofOlympus/ReelBaseSpin1", "Reel", base.GateofOlympusReelBaseSpin1Reel)
Set("Base", "GateofOlympus/ReelBaseSpin1", "Weight", base.GateofOlympusReelBaseSpin1Weight)
Set("Base", "GateofOlympus/ReelBaseSpin2", "Range", base.GateofOlympusReelBaseSpin2Range)
Set("Base", "GateofOlympus/ReelBaseSpin2", "Reel", base.GateofOlympusReelBaseSpin2Reel)
Set("Base", "GateofOlympus/ReelBaseSpin2", "Weight", base.GateofOlympusReelBaseSpin2Weight)
Set("Base", "GateofOlympus/ReelBaseSpin3", "Range", base.GateofOlympusReelBaseSpin3Range)
Set("Base", "GateofOlympus/ReelBaseSpin3", "Reel", base.GateofOlympusReelBaseSpin3Reel)
Set("Base", "GateofOlympus/ReelBaseSpin3", "Weight", base.GateofOlympusReelBaseSpin3Weight)
Set("Base", "GateofOlympus/ReelBaseSpin7", "Range", base.GateofOlympusReelBaseSpin7Range)
Set("Base", "GateofOlympus/ReelBaseSpin7", "Reel", base.GateofOlympusReelBaseSpin7Reel)
Set("Base", "GateofOlympus/ReelBaseSpin7", "Weight", base.GateofOlympusReelBaseSpin7Weight)
Set("Base", "GateofOlympus/ReelBaseSpin8", "Range", base.GateofOlympusReelBaseSpin8Range)
Set("Base", "GateofOlympus/ReelBaseSpin8", "Reel", base.GateofOlympusReelBaseSpin8Reel)
Set("Base", "GateofOlympus/ReelBaseSpin8", "Weight", base.GateofOlympusReelBaseSpin8Weight)
Set("Base", "GateofOlympus/ReelBaseSpin", "Range", base.GateofOlympusReelBaseSpinRange)
Set("Base", "GateofOlympus/ReelBaseSpin", "Reel", base.GateofOlympusReelBaseSpinReel)
Set("Base", "GateofOlympus/ReelBaseSpin", "Weight", base.GateofOlympusReelBaseSpinWeight)
Set("Base", "GateofOlympus/ReelChoose", "Default", base.GateofOlympusReelChoose)
Set("Base", "GateofOlympus/ReelFreeSpin4", "Range", base.GateofOlympusReelFreeSpin4Range)
Set("Base", "GateofOlympus/ReelFreeSpin4", "Reel", base.GateofOlympusReelFreeSpin4Reel)
Set("Base", "GateofOlympus/ReelFreeSpin4", "Weight", base.GateofOlympusReelFreeSpin4Weight)
Set("Base", "GateofOlympus/ReelFreeSpin5", "Range", base.GateofOlympusReelFreeSpin5Range)
Set("Base", "GateofOlympus/ReelFreeSpin5", "Reel", base.GateofOlympusReelFreeSpin5Reel)
Set("Base", "GateofOlympus/ReelFreeSpin5", "Weight", base.GateofOlympusReelFreeSpin5Weight)
Set("Base", "GateofOlympus/ReelFreeSpin", "Range", base.GateofOlympusReelFreeSpinRange)
Set("Base", "GateofOlympus/ReelFreeSpin", "Reel", base.GateofOlympusReelFreeSpinReel)
Set("Base", "GateofOlympus/ReelFreeSpin", "Weight", base.GateofOlympusReelFreeSpinWeight)
Set("Base", "GateofOlympus/Scatter", "Default", base.GateofOlympusScatter)
Set("Base", "GateofOlympus/Symbol", "BetRatio", base.GateofOlympusSymbolBetRatio)
Set("Base", "GateofOlympus/Symbol", "Default", base.GateofOlympusSymbol)
Set("Base", "Matrix/FeaturesForm15X1TypeA", "Default", base.MatrixFeaturesForm15X1TypeA) Set("Base", "Matrix/FeaturesForm15X1TypeA", "Default", base.MatrixFeaturesForm15X1TypeA)
Set("Base", "Matrix/FeaturesForm19X1TypeA", "Default", base.MatrixFeaturesForm19X1TypeA) Set("Base", "Matrix/FeaturesForm19X1TypeA", "Default", base.MatrixFeaturesForm19X1TypeA)
Set("Base", "Matrix/FeaturesForm20X1TypeA", "Default", base.MatrixFeaturesForm20X1TypeA) Set("Base", "Matrix/FeaturesForm20X1TypeA", "Default", base.MatrixFeaturesForm20X1TypeA)
@ -618,12 +540,6 @@ func LinksMapping() {
Link("FortuneTiger/ReelBaseSpin", "Weight/1", "FortuneTiger/ReelBaseSpin", "Weight") Link("FortuneTiger/ReelBaseSpin", "Weight/1", "FortuneTiger/ReelBaseSpin", "Weight")
Link("FortuneTiger/ReelBaseSpin", "Weight/2", "FortuneTiger/ReelBaseSpin", "Weight") Link("FortuneTiger/ReelBaseSpin", "Weight/2", "FortuneTiger/ReelBaseSpin", "Weight")
Link("FortuneTiger/ReelBaseSpin", "Weight/3", "FortuneTiger/ReelBaseSpin", "Weight") Link("FortuneTiger/ReelBaseSpin", "Weight/3", "FortuneTiger/ReelBaseSpin", "Weight")
Link("GatesOfOlympus/MatrixSameForm5X6TypeA", "Default", "Matrix/SameForm5X6TypeA", "Default")
Link("GatesOfOlympus/MatrixSameForm5X6TypeB", "Default", "Matrix/SameForm5X6TypeB", "Default")
Link("GatesOfOlympus/PrizeModel", "Default", "PrizeModel/PrizeModelTypeB", "Default")
Link("GatesOfOlympus/ReelBaseSpin1", "Weight/1", "GatesOfOlympus/ReelBaseSpin1", "Weight")
Link("GatesOfOlympus/ReelBaseSpin1", "Weight/2", "GatesOfOlympus/ReelBaseSpin1", "Weight")
Link("GatesOfOlympus/ReelBaseSpin1", "Weight/3", "GatesOfOlympus/ReelBaseSpin1", "Weight")
Link("Test/MatrixLine1Form3X3TypeA", "Default", "Matrix/Line1Form3X3TypeA", "Default") Link("Test/MatrixLine1Form3X3TypeA", "Default", "Matrix/Line1Form3X3TypeA", "Default")
Link("Test/PrizeModel", "Default", "PrizeModel/PrizeModelTypeB", "Default") Link("Test/PrizeModel", "Default", "PrizeModel/PrizeModelTypeB", "Default")
Link("Test/ReelBaseSpin", "Weight/1", "Test/ReelBaseSpin", "Weight") Link("Test/ReelBaseSpin", "Weight/1", "Test/ReelBaseSpin", "Weight")

View File

@ -58,12 +58,20 @@ type (
BetLine struct { BetLine struct {
Index int64 Index int64
BetLine int64 BetLine int64
BaseBet int64
} }
// BetSize comment // BetSize comment
BetSize struct { BetSize struct {
Index int64 Index int64
BetSize int64 BetSize int64
} }
// CashManiaItemInfo comment
CashManiaItemInfo struct {
Index int64
ItemID int64
Value float64
IsMid bool
}
// CashManiaMidItemInfo comment // CashManiaMidItemInfo comment
CashManiaMidItemInfo struct { CashManiaMidItemInfo struct {
Index int64 Index int64
@ -164,19 +172,6 @@ type (
FreeSpinCount int64 FreeSpinCount int64
MaxWin int64 MaxWin int64
} }
// GateofOlympusMultiplier comment
GateofOlympusMultiplier struct {
Multiple int64
ID int64
Weights []int64
}
// GateofOlympusReelChoose comment
GateofOlympusReelChoose struct {
ID int64
IsFreeSpin bool
NodeType string
Weights []int64
}
// JackpotPrize comment // JackpotPrize comment
JackpotPrize struct { JackpotPrize struct {
PrizeType int64 PrizeType int64
@ -273,6 +268,11 @@ type (
SymbolBetRatio struct { SymbolBetRatio struct {
BetRatio float64 BetRatio float64
} }
// TestBetBetLine comment
TestBetBetLine struct {
Index int64
BetLine int64
}
// TestRandomWeight comment // TestRandomWeight comment
TestRandomWeight struct { TestRandomWeight struct {
ID int64 ID int64
@ -521,42 +521,6 @@ type (
// FortuneTigerSymbolBetRatio comment // FortuneTigerSymbolBetRatio comment
FortuneTigerSymbolBetRatio = SymbolBetRatio FortuneTigerSymbolBetRatio = SymbolBetRatio
// GateofOlympusBetBetChangeList comment
GateofOlympusBetBetChangeList = BetChangeList
// GateofOlympusBetBetLevel comment
GateofOlympusBetBetLevel = BetLevel
// GateofOlympusBetBetLine comment
GateofOlympusBetBetLine = BetLine
// GateofOlympusBetBetSize comment
GateofOlympusBetBetSize = BetSize
// GateofOlympusBetFirstBet comment
GateofOlympusBetFirstBet = FirstBet
// GateofOlympusFormation comment
GateofOlympusFormation = Formation
// GateofOlympusMapRTPMode comment
GateofOlympusMapRTPMode = MapRTPMode
// GateofOlympusMapRTPModeTypeWeight comment
GateofOlympusMapRTPModeTypeWeight = MapRTPModeTypeWeight
// GateofOlympusMultiplierKeyID comment
GateofOlympusMultiplierKeyID = GateofOlympusMultiplier
// GateofOlympusScatter comment
GateofOlympusScatter = Scatter
// GateofOlympusSymbol comment
GateofOlympusSymbol = Symbol
// GateofOlympusSymbolBetRatio comment
GateofOlympusSymbolBetRatio = SymbolBetRatio
// MatrixFeaturesForm15X1TypeA comment // MatrixFeaturesForm15X1TypeA comment
MatrixFeaturesForm15X1TypeA = Matrix MatrixFeaturesForm15X1TypeA = Matrix
@ -827,9 +791,6 @@ type (
// TestBetBetLevel comment // TestBetBetLevel comment
TestBetBetLevel = BetLevel TestBetBetLevel = BetLevel
// TestBetBetLine comment
TestBetBetLine = BetLine
// TestBetBetSize comment // TestBetBetSize comment
TestBetBetSize = BetSize TestBetBetSize = BetSize
@ -850,4 +811,5 @@ type (
// TestSymbolBetRatio comment // TestSymbolBetRatio comment
TestSymbolBetRatio = SymbolBetRatio TestSymbolBetRatio = SymbolBetRatio
) )

View File

@ -73,4 +73,12 @@ type SpinLock struct {
Prize [][]float64 `json:"pe,omitempty"` Prize [][]float64 `json:"pe,omitempty"`
//OXSpecial //OXSpecial
NewSuperStack []int64 `json:"nss,omitempty"` NewSuperStack []int64 `json:"nss,omitempty"`
//CashMania
FeatureType int `json:"feature_type,omitempty"` //0.无特性 1.nudge 2.respin
NudgeDirection int `json:"nudge_direction,omitempty"` //1.上 2.下
FreeSpinItemId int64 `json:"free_item_id,omitempty"`
Multiple int64 `json:"multiple,omitempty"` //倍乘倍数
Irv [][]float64 `json:"irv,omitempty"`
Frv [][]float64 `json:"frv,omitempty"`
} }

View File

@ -34,7 +34,7 @@ func (n *MachineDesc) Sheet(excel string, sheet string) interface{} {
return n.DataSet.GetMachineSheet(n.Theme, excel, sheet, 0) return n.DataSet.GetMachineSheet(n.Theme, excel, sheet, 0)
} }
func (n *MachineDesc) GetLineBet(betSizeIndex int64, betLevelIndex int64) int64 { func (n *MachineDesc) GetLineBet(betSizeIndex, betLevelIndex, betLineIndex int64) int64 {
betSizeRows, ok := n.Sheet("Bet", "BetSize").(map[int64]*structs.BetSize) betSizeRows, ok := n.Sheet("Bet", "BetSize").(map[int64]*structs.BetSize)
if !ok { if !ok {
panic(errors.ConfigTypeError.ErrorWith(n.Theme, "BetSize")) panic(errors.ConfigTypeError.ErrorWith(n.Theme, "BetSize"))
@ -55,7 +55,17 @@ func (n *MachineDesc) GetLineBet(betSizeIndex int64, betLevelIndex int64) int64
panic(errors.ConfigRowNoMatch.ErrorWith(n.Theme, "BetLevel", betLevelIndex)) panic(errors.ConfigRowNoMatch.ErrorWith(n.Theme, "BetLevel", betLevelIndex))
} }
return betSizeRow.BetSize * betLevelRow.BetLevel betLineRows, ok := n.Sheet("Bet", "BetLine").(map[int64]*structs.BetLine)
if !ok {
panic(errors.ConfigTypeError.ErrorWith(n.Theme, "BetLine"))
}
betLineRow, ok := betLineRows[betLineIndex]
if !ok {
panic(errors.ConfigRowNoMatch.ErrorWith(n.Theme, "BetLine", betLineIndex))
}
return betSizeRow.BetSize * betLevelRow.BetLevel * betLineRow.BaseBet
} }
func (n *MachineDesc) BetSizes() []int64 { func (n *MachineDesc) BetSizes() []int64 {
betSizeRows, ok := n.Sheet("Bet", "BetSize").(map[int64]*structs.BetSize) betSizeRows, ok := n.Sheet("Bet", "BetSize").(map[int64]*structs.BetSize)
@ -90,6 +100,17 @@ func (n *MachineDesc) BetLines() []int64 {
} }
return lists return lists
} }
func (n *MachineDesc) BaseBets() []int64 {
baseBetRows, ok := n.Sheet("Bet", "BetLine").(map[int64]*structs.BetLine)
if !ok {
panic(errors.ConfigTypeError.ErrorWith(n.Theme, "BaseBet"))
}
var lists []int64
for _, list := range baseBetRows {
lists = append(lists, list.BaseBet)
}
return lists
}
func (n *MachineDesc) BetChangeList() []float64 { func (n *MachineDesc) BetChangeList() []float64 {
betChangeListRows, ok := n.Sheet("Bet", "BetChangeList").(map[int64]*structs.BetChangeList) betChangeListRows, ok := n.Sheet("Bet", "BetChangeList").(map[int64]*structs.BetChangeList)
if !ok { if !ok {

View File

@ -281,11 +281,11 @@ func (e *Entity) CalcWinType(multi float64) int64 {
} }
func (e *Entity) GetLineBetByType(nodeType string) int64 { func (e *Entity) GetLineBetByType(nodeType string) int64 {
return e.MachineDesc.GetLineBet(e.NodeTree.Act.BetSizeIndex, e.NodeTree.Act.BetLevelIndex) return e.MachineDesc.GetLineBet(e.NodeTree.Act.BetSizeIndex, e.NodeTree.Act.BetLevelIndex, e.NodeTree.Act.BetLineIndex)
} }
func (e *Entity) GetMinLineBet(nodeType string) int64 { func (e *Entity) GetMinLineBet(nodeType string) int64 {
return e.MachineDesc.GetLineBet(1, 1) return e.MachineDesc.GetLineBet(1, 1, 1)
} }
func (e *Entity) SetBetCoin(betCoin player.DecCoin) { func (e *Entity) SetBetCoin(betCoin player.DecCoin) {

View File

@ -46,6 +46,7 @@ func (sm *SlotsMgr) Enter(s *base.SlotsSession, gameId int64) (*cli.SlotsEnterRe
BetSizes: m.BetSizes(), BetSizes: m.BetSizes(),
BetLevels: m.BetLevels(), BetLevels: m.BetLevels(),
BetLines: m.BetLines(), BetLines: m.BetLines(),
BaseBets: m.BaseBets(),
BetChangeList: m.BetChangeList(), BetChangeList: m.BetChangeList(),
} }

View File

@ -42,6 +42,7 @@ type Spinner interface {
BetSizes() []int64 BetSizes() []int64
BetLevels() []int64 BetLevels() []int64
BetLines() []int64 BetLines() []int64
BaseBets() []int64
BetChangeList() []float64 BetChangeList() []float64
Choice() int64 Choice() int64

View File

@ -39,6 +39,9 @@ func (m *Machine) BetLevels() []int64 {
func (m *Machine) BetLines() []int64 { func (m *Machine) BetLines() []int64 {
return m.MachineDesc.BetLines() return m.MachineDesc.BetLines()
} }
func (m *Machine) BaseBets() []int64 {
return m.MachineDesc.BaseBets()
}
func (m *Machine) BetChangeList() []float64 { func (m *Machine) BetChangeList() []float64 {
return m.MachineDesc.BetChangeList() return m.MachineDesc.BetChangeList()
} }

View File

@ -29,8 +29,21 @@ type CustomRespin struct {
// 本次的symbol // 本次的symbol
ItemId int64 ItemId int64
} }
type CustomFortune struct { type CustomFortune struct {
ForceRound int64 `json:"fr"` //第n次 ForceRound int64 `json:"fr"` //第n次
FeatureType int `json:"feature_type"` //0.无特性 1.nudge 2.respin
NudgeDirection int `json:"nudge_direction"` //1.上 2.下
FreeSpinItemId int64 `json:"free_item_id"`
Multiple int64 `json:"multiple"` //倍乘倍数
FreeStatus int `json:"fs"`
FreeSpinNum int64 `json:"fsn"` //剩余freespin
FreeNumMax int64 `json:"fnm"` //总次数
FreeNumTrigger int64 `json:"fnt"` //新增freespin
} }
// Theme is called to get feature theme // Theme is called to get feature theme
@ -44,8 +57,8 @@ func (p *PluginBase) Customs() []interface{} {
&CustomMidInfo{}, &CustomMidInfo{},
&CustomNudge{}, &CustomNudge{},
&CustomRespin{}, &CustomRespin{},
&Special{}, &CustomFortune{},
&CustomFortune{}) &Special{})
} }
// OnStepBegin is called on initializing a step // OnStepBegin is called on initializing a step
@ -58,6 +71,9 @@ func (p *PluginBase) BeforeDisplay(m intf.Master) {
case key.BaseSpin: case key.BaseSpin:
p.changeItem(m, false) p.changeItem(m, false)
case key.FreeSpin: case key.FreeSpin:
Fortune := getCustomFortune(m)
Fortune.FreeStatus = 0
Fortune.FreeNumTrigger = 0
p.changeItem(m, true) p.changeItem(m, true)
} }
@ -67,9 +83,15 @@ func (p *PluginBase) AfterDisplay(m intf.Master) {
isFreeSpin := m.Cursor().GetType() == key.FreeSpin isFreeSpin := m.Cursor().GetType() == key.FreeSpin
cursorFormation := m.CursorFormation() cursorFormation := m.CursorFormation()
symbols := cursorFormation.GetSymbols() symbols := cursorFormation.GetSymbols()
Fortune := getCustomFortune(m)
Fortune.FeatureType = WU
if m.Bool("Nudge") { if m.Bool("Nudge") {
Fortune.FeatureType = Nudge
//todo 如果当前是nudge //todo 如果当前是nudge
if m.Bool("NudgeDown") { if m.Bool("NudgeDown") {
Fortune.NudgeDirection = Nudge_Down
symbols[9] = symbols[8] symbols[9] = symbols[8]
symbols[8] = symbols[7] symbols[8] = symbols[7]
symbols[7] = symbols[6] symbols[7] = symbols[6]
@ -77,6 +99,7 @@ func (p *PluginBase) AfterDisplay(m intf.Master) {
symbols[5] = Descx(m).RandomMidItems(isFreeSpin, 1)[0] symbols[5] = Descx(m).RandomMidItems(isFreeSpin, 1)[0]
m.Remove("NudgeDown") m.Remove("NudgeDown")
} else if m.Bool("NudgeUp") { } else if m.Bool("NudgeUp") {
Fortune.NudgeDirection = Nudge_Up
symbols[5] = symbols[6] symbols[5] = symbols[6]
symbols[6] = symbols[7] symbols[6] = symbols[7]
symbols[7] = symbols[8] symbols[7] = symbols[8]
@ -86,6 +109,7 @@ func (p *PluginBase) AfterDisplay(m intf.Master) {
} }
m.Remove("Nudge") m.Remove("Nudge")
} else if m.Bool("Respin") { } else if m.Bool("Respin") {
Fortune.FeatureType = Respin
//todo 如果当前是respin //todo 如果当前是respin
if m.Int64("respinsymbols") > 0 { if m.Int64("respinsymbols") > 0 {
symbols[2] = m.Int64("respinsymbols") symbols[2] = m.Int64("respinsymbols")
@ -109,6 +133,14 @@ func (p *PluginBase) AfterSpin(m intf.Master) {
p.checkMid(m, false) p.checkMid(m, false)
case key.FreeSpin: case key.FreeSpin:
p.checkMid(m, true) p.checkMid(m, true)
Fortune := getCustomFortune(m)
if Fortune.FreeSpinNum > 0 {
if Fortune.FreeSpinNum == 1 {
Fortune.FreeStatus = 3
}
Fortune.FreeSpinNum--
//logx.Errorf("这里是哇哇哇 Trigger[%v] FreeNumMax[%v] FreeSpinNum[%v]", Fortune.FreeNumTrigger, Fortune.FreeNumMax, Fortune.FreeSpinNum)
}
} }
} }
@ -133,26 +165,24 @@ func (p *PluginBase) Nudge(m intf.Master, symbols []int64) {
} }
} }
// 获取特性数据
func (p *PluginBase) getCustomFortune(m intf.Master) *CustomFortune {
customFortune := new(CustomFortune)
if len(m.CursorCustoms(customFortune)) == 0 {
m.AddCursorFeature(customFortune)
}
return m.CursorCustom(customFortune).(*CustomFortune)
}
func (p *PluginBase) changeItem(m intf.Master, isFreeSpin bool) { func (p *PluginBase) changeItem(m intf.Master, isFreeSpin bool) {
curFormation := m.CursorFormation() curFormation := m.CursorFormation()
symbols := curFormation.GetSymbols() symbols := curFormation.GetSymbols()
isWin := Descx(m).CheckWin(isFreeSpin) isWin := Descx(m).CheckWin(isFreeSpin)
//todo ceshi
//isWin = true
if isFreeSpin { if isFreeSpin {
Fortune := p.getCustomFortune(m) Fortune := getCustomFortune(m)
if Fortune.ForceRound == m.GetProgressValue() { if Fortune.ForceRound == m.GetProgressValue() {
isWin = true isWin = true
} }
} }
isNudge, isReSpin := Descx(m).GetNudgeAndReSpin(isWin) isNudge, isReSpin := Descx(m).GetNudgeAndReSpin(isWin)
//todo ceshi
//isNudge = true
//isReSpin = true
if isWin { if isWin {
itemId := Descx(m).GetWinItem(isFreeSpin) itemId := Descx(m).GetWinItem(isFreeSpin)
symbols[2] = itemId symbols[2] = itemId
@ -267,13 +297,35 @@ func (p *PluginBase) checkMid(m intf.Master, isFreeSpin bool) {
FreeSpinCount: freeSpinCount, FreeSpinCount: freeSpinCount,
}).SetWin(win * (multi - 1)) }).SetWin(win * (multi - 1))
Fortune := getCustomFortune(m)
Fortune.Multiple = multi
//Fortune.MultipleWin = win * (multi - 1)
Fortune.FreeSpinItemId = symbols[7]
if freeSpinCount > 0 { if freeSpinCount > 0 {
customFortune := getCustomFortune(m)
if isFreeSpin { if isFreeSpin {
//logx.Errorf("----ReTrigger[%v] FreeNumMax[%v] FreeSpinNum[%v]", customFortune.FreeNumTrigger, customFortune.FreeNumMax, customFortune.FreeSpinNum)
customFortune.FreeStatus = 2
customFortune.FreeNumTrigger = freeSpinCount
customFortune.FreeNumMax += freeSpinCount
customFortune.FreeSpinNum += freeSpinCount
//logx.Errorf("----2ReTrigger[%v] FreeNumMax[%v] FreeSpinNum[%v]", customFortune.FreeNumTrigger, customFortune.FreeNumMax, customFortune.FreeSpinNum)
m.AddProgress(freeSpinCount) m.AddProgress(freeSpinCount)
m.AddCursorFeature(&generic.CustomExtraFreeSpin{ExtraTimes: freeSpinCount}).SetLifetime(1) //m.AddCursorFeature(customFortune).SetLifetime(customFortune.FreeSpinNum)
m.CursorFeature(customFortune).SetLifetime(customFortune.FreeSpinNum)
} else { } else {
//logx.Errorf("11Trigger[%v] FreeNumMax[%v] FreeSpinNum[%v]", customFortune.FreeNumTrigger, customFortune.FreeNumMax, customFortune.FreeSpinNum)
customFortune.FreeStatus = 1
customFortune.FreeNumTrigger = freeSpinCount
customFortune.FreeNumMax += freeSpinCount
customFortune.FreeSpinNum = freeSpinCount
ForceRound := m.Randx().Int63n(freeSpinCount) ForceRound := m.Randx().Int63n(freeSpinCount)
m.AddNodeFeature(m.AddNodeOnCursor(key.FreeSpin, freeSpinCount).GetID(), &CustomFortune{ForceRound: ForceRound}) customFortune.ForceRound = ForceRound
//logx.Errorf("1111111Trigger[%v] FreeNumMax[%v] FreeSpinNum[%v]", customFortune.FreeNumTrigger, customFortune.FreeNumMax, customFortune.FreeSpinNum)
m.AddNodeFeature(m.AddNodeOnCursor(key.FreeSpin, freeSpinCount).GetID(), customFortune).SetLifetime(freeSpinCount)
} }
} }
} }

View File

@ -2,6 +2,25 @@ package cashmania
import "mongo.games.com/game/gamesrv/slotspkg/slots/intf" import "mongo.games.com/game/gamesrv/slotspkg/slots/intf"
const (
WU int = iota
Nudge
Respin
)
const (
Nudge_WU int = iota
Nudge_Up
Nudge_Down
)
// 获取特性数据
func getCustomFortune(m intf.Master) *CustomFortune {
customFortune := new(CustomFortune)
if len(m.CursorCustoms(customFortune)) == 0 {
m.AddCursorFeature(customFortune)
}
return m.CursorCustom(customFortune).(*CustomFortune)
}
func (p *PluginBase) RandomItemsByMid(m intf.Master, isFreeSpin bool, symbols []int64, poss ...int) { func (p *PluginBase) RandomItemsByMid(m intf.Master, isFreeSpin bool, symbols []int64, poss ...int) {
items := Descx(m).RandomMidItems(isFreeSpin, len(poss)) items := Descx(m).RandomMidItems(isFreeSpin, len(poss))
for i, pos := range poss { for i, pos := range poss {

View File

@ -19,6 +19,14 @@ func Descx(m intf.Master) *descx {
NodeDesc: m.Desc(), NodeDesc: m.Desc(),
} }
} }
func (n descx) GetItemInfo() map[int64]*structs.CashManiaItemInfo {
sheet := n.DefaultSheet("ItemInfo")
rows, ok := sheet.(map[int64]*structs.CashManiaItemInfo)
if !ok {
panic(errors.ConfigTypeError.ErrorWith(n.Theme, "CashMania", "S_ItemInfo"))
}
return rows
}
// 判断是否触发respin // 判断是否触发respin
func (n descx) CheckWin(isFreeSpin bool) bool { func (n descx) CheckWin(isFreeSpin bool) bool {

View File

@ -2,6 +2,7 @@ package cashmania
var Plugins = []interface{}{ var Plugins = []interface{}{
&PluginBase{}, &PluginBase{},
&PluginSpecial{},
} }
var SimulatorPlugins = []interface{}{ var SimulatorPlugins = []interface{}{

View File

@ -17,6 +17,17 @@ func (p *PluginSpecial) Theme() string {
// Special // Special
type Special struct { type Special struct {
FreeStatus int `json:"fs"`
FreeSpinNum int64 `json:"fsn"` //剩余freespin
FreeNumMax int64 `json:"fnm"` //总次数
FreeNumTrigger int64 `json:"fnt"` //新增freespin
FeatureType int `json:"feature_type"` //0.无特性 1.nudge 2.respin
NudgeDirection int `json:"nudge_direction"` //1.上 2.下
FreeSpinItemId int64 `json:"free_item_id"`
Multiple int64 `json:"multiple"` //倍乘倍数
Irv [][]float64 `json:"irv"`
Frv [][]float64 `json:"frv"`
} }
// 获取特性数据 // 获取特性数据
@ -28,5 +39,56 @@ func (p *PluginSpecial) getCustomSpecial(m intf.Master) *Special {
return m.CursorCustom(customSpecial).(*Special) return m.CursorCustom(customSpecial).(*Special)
} }
func (p *PluginSpecial) AfterSpin(m intf.Master) { func (p *PluginSpecial) AfterSpin(m intf.Master) {
Fortune := getCustomFortune(m)
sp := p.getCustomSpecial(m)
sp.FeatureType = Fortune.FeatureType
sp.NudgeDirection = Fortune.NudgeDirection
sp.FreeStatus = Fortune.FreeStatus
sp.FreeSpinNum = Fortune.FreeSpinNum
sp.FreeNumMax = Fortune.FreeNumMax
sp.FreeNumTrigger = Fortune.FreeNumTrigger
sp.FreeSpinItemId = Fortune.FreeSpinItemId
sp.Multiple = Fortune.Multiple
itemInfo := Descx(m).GetItemInfo()
displaySymbols := m.CursorFormation().GetReelFormattedDisplaySymbols()
var irv = copyMatrix(displaySymbols)
for i, symbol := range displaySymbols {
for i2, i3 := range symbol {
if itemInfo[i3].IsMid {
irv[i][i2] = itemInfo[i3].Value
} else {
irv[i][i2] = itemInfo[i3].Value * float64(m.Bet()) / 10000
}
}
}
sp.Irv = irv
finalSymbols := m.CursorFormation().GetMatrixFormattedFinalSymbols()
var frv = copyMatrix(finalSymbols)
for i, symbol := range finalSymbols {
for i2, i3 := range symbol {
if itemInfo[i3].IsMid {
frv[i][i2] = itemInfo[i3].Value
} else {
frv[i][i2] = itemInfo[i3].Value * float64(m.Bet()) / 10000
}
}
}
sp.Frv = frv
} }
func copyMatrix(mat [][]int64) [][]float64 {
if mat == nil {
return nil
}
var newMat [][]float64
for _, row := range mat {
var r []float64
for _, val := range row {
r = append(r, 0*float64(val))
}
newMat = append(newMat, r)
}
return newMat
}

View File

@ -12,10 +12,12 @@ type SlotsEnterResponse struct {
BetSizeIndex int64 BetSizeIndex int64
BetLevelIndex int64 BetLevelIndex int64
BetLineIndex int64 BetLineIndex int64
BaseBetIndex int64
BetChangeList []float64 BetChangeList []float64
BetSizes []int64 BetSizes []int64
BetLevels []int64 BetLevels []int64
BetLines []int64 BetLines []int64
BaseBets []int64
} }
type SlotsPlayRequest struct { type SlotsPlayRequest struct {
Theme string Theme string