lowcode

package
v0.13.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AwardUnknow                   int = 0  // 未知的奖励
	AwardCash                     int = 1  // 直接奖励cash
	AwardCollector                int = 2  // 奖励收集器
	AwardRespinTimes              int = 3  // 奖励respin次数
	AwardGameMulti                int = 4  // 奖励游戏整体倍数
	AwardStepMulti                int = 5  // 奖励这个step里的倍数
	AwardInitMask                 int = 6  // 初始化mask
	AwardTriggerRespin            int = 7  // 弃用,触发respin,理论上,在respin外面应该用AwardTriggerRespin,在respin里面应该用AwardRespinTimes,如果分不清楚,就统一用AwardTriggerRespin
	AwardNoLevelUpCollector       int = 8  // 奖励收集器,但不会触发升级奖励
	AwardWeightGameRNG            int = 9  // 权重产生一个rng,供后续逻辑用,全局用,不同step不会reset这个rng
	AwardPushSymbolCollection     int = 10 // 根据SymbolCollection自己的逻辑,产生一定数量的Symbol到SymbolCollection里
	AwardGameCoinMulti            int = 11 // 奖励游戏整体的coin倍数
	AwardStepCoinMulti            int = 12 // 奖励这个step里的coin倍数
	AwardRetriggerRespin          int = 13 // 奖励再次触发respin,这种只会用前面记录下的retrigger次数
	AwardAddRetriggerRespinNum    int = 14 // 奖励再次触发respin次数,这种会在前面的基础上增加
	AwardSetMaskVal               int = 15 // 设置mask的值
	AwardTriggerRespin2           int = 16 // 新的触发respin,不需要考虑trigger、retrigger、respinTimes,直接用这个就行,如果次数给-1,就会用当前的retriggerRespinNum
	AwardSetComponentConfigVal    int = 17 // 设置组件的configVal
	AwardSetComponentConfigIntVal int = 18 // 设置组件的configIntVal
	AwardChgComponentConfigIntVal int = 19 // 改变组件的configIntVal
)
View Source
const (
	WinTypeLines              = "lines"
	WinTypeWays               = "ways"
	WinTypeScatters           = "scatters"
	WinTypeCountScatter       = "countscatter"
	WinTypeCountScatterInArea = "countscatterInArea"

	BetTypeNormal   = "bet"
	BetTypeTotalBet = "totalBet"
	BetTypeNoPay    = "noPay"
)
View Source
const (
	FixSymbolsTypeUnknow    int = 0 // unknow
	FixSymbolsTypeMergeDown int = 1 // merge & down
)
View Source
const (
	LightningTypeVal = "val"
	LightningTypeMul = "mul"

	LightningFeatureCollector = "collector"
)
View Source
const (
	MaskTypeNone         int = 0
	MaskTypeSymbolInReel int = 1
)
View Source
const (
	SelectSymbolR2L = "selectSymbolR2L"
	SelectSymbolL2R = "selectSymbolL2R"
	SelectWithXY    = "selectWithXY"
)
View Source
const (
	MoveTypeXY = "xy"
	MoveTypeYX = "yx"
)
View Source
const (
	OtherSceneFeatureUnknow       int = 0
	OtherSceneFeatureGameMulti    int = 1 // GameMulti,默认用乘法
	OtherSceneFeatureGameMultiSum int = 2 // GameMulti,默认用加法
	OtherSceneFeatureStepMulti    int = 3 // StepMulti,默认用乘法
	OtherSceneFeatureStepMultiSum int = 4 // StepMulti,默认用加法
)
View Source
const (
	GamePropWidth        = 1
	GamePropHeight       = 2
	GamePropCurPaytables = 3
	GamePropCurReels     = 4
	GamePropCurLineData  = 5
	GamePropCurLineNum   = 6
	GamePropCurBetIndex  = 7

	GamePropStepMulti     = 100
	GamePropGameMulti     = 101
	GamePropGameCoinMulti = 102 // 这次spin的全部step都生效,是只有coin玩法才生效的倍数
	GamePropStepCoinMulti = 103 // 这次spin的step才生效,是只有coin玩法才生效的倍数

	GamePropNextComponent   = 200
	GamePropRespinComponent = 201
)
View Source
const (
	StatusTypeUnknow         int = 0
	StatusTypeRespinEnding   int = 1
	StatusTypeRespinNum      int = 2
	StatusTypeRespinWin      int = 3
	StatusTypeRespinStartNum int = 4
	StatusTypeRespinStart    int = 5
	StatusTypeRespinStartEx  int = 6
)
View Source
const (
	STDVSymbolNum string = "symbolNum" // 触发后,中奖的符号数量
	STDVWildNum   string = "wildNum"   // 触发后,中奖符号里的wild数量
	STDVRespinNum string = "respinNum" // 触发后,如果有产生respin的逻辑,这就是最终respin的次数
	STDVWins      string = "wins"      // 中奖的数值,线注的倍数
)
View Source
const (
	SVWDVWins         string = "wins"         // 中奖的数值,线注的倍数
	SVWDVSymbolNum    string = "symbolNum"    // 符号数量
	SVWDVCollectorNum string = "collectorNum" // 收集器数量
)
View Source
const (
	BRCVReelSet string = "reelSet" // 可以修改配置项里的ReelSet
)
View Source
const BasicReelsTypeName = "basicReels"
View Source
const BasicWinsTypeName = "basicWins"
View Source
const BookOf2TypeName = "bookOf2"
View Source
const BookOfTypeName = "bookOf"
View Source
const (
	CTCVWinMulti string = "winMulti" // 可以修改配置项里的winMulti
)
View Source
const ChgSymbolTypeName = "chgSymbol"
View Source
const ClusterTriggerTypeName = "clusterTrigger"
View Source
const CollectorTypeName = "collector"
View Source
const ComponentTriggerTypeName = "componentTrigger"
View Source
const ComponentValTriggerTypeName = "componentValTrigger"
View Source
const DefaultCmd = "SPIN"
View Source
const DropDownSymbolsTypeName = "dropDownSymbols"
View Source
const FixSymbolsTypeName = "fixSymbols"
View Source
const (
	LTCVWinMulti string = "winMulti" // 可以修改配置项里的winMulti
)
View Source
const LightningTypeName = "lightning"
View Source
const LinesTriggerTypeName = "linesTrigger"
View Source
const MaskBranchTypeName = "maskBranch"
View Source
const MaskTypeName = "mask"
View Source
const MaxComponentNumInStep = 100
View Source
const MaxStepNum = 1000
View Source
const MergeSymbolTypeName = "mergeSymbol"
View Source
const MoveReelTypeName = "moveReel"
View Source
const MoveSymbolTypeName = "moveSymbol"
View Source
const MultiLevelMysteryTypeName = "multiLevelMystery"
View Source
const MultiLevelReelsTypeName = "multiLevelReels"
View Source
const MultiLevelReplaceReelTypeName = "multiLevelReplaceReel"
View Source
const MultiRespinTypeName = "multiRespin"
View Source
const MultiWeightAwardsTypeName = "multiWeightAwards"
View Source
const MysteryTypeName = "mystery"
View Source
const OverlaySymbolTypeName = "overlaySymbol"
View Source
const (
	QBDVQueue string = "queue" // 队列数量
)
View Source
const QueueBranchTypeName = "queueBranch"
View Source
const (
	RSDVSymbol string = "symbol" // roll a symbol
)
View Source
const ReRollReelTypeName = "reRollReel"
View Source
const ReelModifierTypeName = "reelModifier"
View Source
const ReelSetMysteryTypeName = "reelSetMystery"
View Source
const RefillSymbolsTypeName = "refillSymbols"
View Source
const RemoveSymbolsTypeName = "removeSymbols"
View Source
const ReplaceReelTypeName = "replaceReel"
View Source
const ReplaceSymbolGroupTypeName = "replaceSymbolGroup"
View Source
const ReplaceSymbolTypeName = "replaceSymbol"
View Source
const Respin2TypeName = "respin2"
View Source
const RespinTypeName = "respin"
View Source
const RollSymbolTypeName = "rollSymbol"
View Source
const (
	STCVWinMulti string = "winMulti" // 可以修改配置项里的winMulti
)
View Source
const (
	SVCVWeightVal string = "weightVal" // 可以修改配置项里的 weightVal
)
View Source
const ScatterTriggerTypeName = "scatterTrigger"
View Source
const SymbolCollectionTypeName = "symbolCollection"
View Source
const SymbolModifierTypeName = "symbolModifier"
View Source
const SymbolMultiTypeName = "symbolMulti"
View Source
const SymbolTriggerTypeName = "symbolTrigger"
View Source
const SymbolVal2TypeName = "symbolVal2"
View Source
const SymbolValTypeName = "symbolVal"
View Source
const SymbolValWinsTypeName = "symbolValWins"
View Source
const (
	TagCurReels = "reels"
)
View Source
const (
	WBDVValue string = "value" // 权重表最终的value
)
View Source
const (
	WCSCVMapChgWeight string = "mapChgWeight" // 可以修改配置项里的mapChgWeight,这里因为是个map,所以要当成 mapChgWeight:S 这样传递
)
View Source
const (
	WRMCVWinMulti string = "winMulti" // 可以修改配置项里的winMulti
)
View Source
const (
	WT2CVTriggerWeight string = "triggerWeight" // 可以修改配置项里的triggerWeight
)
View Source
const (
	WTCVWinMulti string = "winMulti" // 可以修改配置项里的winMulti
)
View Source
const WaysTriggerTypeName = "waysTrigger"
View Source
const WeightAwardsTypeName = "weightAwards"
View Source
const WeightBranchTypeName = "weightBranch"
View Source
const WeightChgSymbolTypeName = "weightChgSymbol"
View Source
const WeightReelsTypeName = "weightReels"
View Source
const WeightTrigger2TypeName = "weightTrigger2"
View Source
const WeightTriggerTypeName = "weightTrigger"
View Source
const WinResultMultiTypeName = "winResultMulti"

Variables

View Source
var (
	// ErrUnkonow - unknow error
	ErrUnkonow = errors.New("unknow error")

	// ErrMustHaveMainPaytables - must have main paytables
	ErrMustHaveMainPaytables = errors.New("must have main paytables")

	// ErrInvalidGameMod - invalid gamemod
	ErrInvalidGameMod = errors.New("invalid gamemod")

	// ErrInvalidComponent - invalid component
	ErrInvalidComponent = errors.New("invalid component")

	// ErrInvalidReels - invalid reels
	ErrInvalidReels = errors.New("invalid reels")

	// ErrInvalidSymbol - invalid symbol
	ErrInvalidSymbol = errors.New("invalid symbol")

	// ErrInvalidPaytables - invalid paytables
	ErrInvalidPaytables = errors.New("invalid paytables")

	// ErrInvalidGamePropertyString - invalid gameProperty string
	ErrInvalidGamePropertyString = errors.New("invalid gameProperty string")

	// ErrParseScript - parse script error
	ErrParseScript = errors.New("parse script error")
	// ErrNoFunctionInScript - no function in script
	ErrNoFunctionInScript = errors.New("no function in script")
	// ErrWrongFunctionInScript - wrong function in script
	ErrWrongFunctionInScript = errors.New("wrong function in script")

	// ErrIvalidComponentName - invalid component name
	ErrIvalidComponentName = errors.New("invalid component name")

	// ErrIvalidCurGameModParams - invalid CurGameModParams
	ErrIvalidCurGameModParams = errors.New("invalid CurGameModParams")

	// ErrIvalidPlayResultLength - invalid PlayResult Length
	ErrIvalidPlayResultLength = errors.New("invalid PlayResult Length")

	// ErrIvalidMultiLevelReelsConfig - invalid MultiLevelReels config
	ErrIvalidMultiLevelReelsConfig = errors.New("invalid MultiLevelReels config")

	// ErrIvalidStatsSymbolsInConfig - invalid StatsSymbols in config
	ErrIvalidStatsSymbolsInConfig = errors.New("invalid StatsSymbols in config")
	// ErrIvalidStatsComponentInConfig - invalid Stats's component in config
	ErrIvalidStatsComponentInConfig = errors.New("invalid Stats's component in config")

	// ErrIvalidComponentConfig - invalid component config
	ErrIvalidComponentConfig = errors.New("invalid component config")

	// ErrIvalidGameData - invalid gameData
	ErrIvalidGameData = errors.New("invalid gameData")

	// ErrIvalidCmd - invalid cmd
	ErrIvalidCmd = errors.New("invalid cmd")
	// ErrIvalidCmdParam - invalid cmdparam
	ErrIvalidCmdParam = errors.New("invalid cmdparam")

	// ErrIvalidTagCurReels - invalid TagCurReels
	ErrIvalidTagCurReels = errors.New("invalid TagCurReels")

	// ErrIvalidSymbolCollection - invalid SymbolColletion
	ErrIvalidSymbolCollection = errors.New("invalid SymbolColletion")

	// ErrIvalidCustomNode - invalid custom-node
	ErrIvalidCustomNode = errors.New("invalid custom-node")
	// ErrIvalidTriggerLabel - invalid trigger label
	ErrIvalidTriggerLabel = errors.New("invalid trigger label")
	// ErrIvalidPayTables - invalid paytables
	ErrIvalidPayTables = errors.New("invalid paytables")
	// ErrIvalidSymbolInReels - invalid symbol in reels
	ErrIvalidSymbolInReels = errors.New("invalid symbol in reels")
	// ErrNoComponentValues - no componentValues
	ErrNoComponentValues = errors.New("no componentValues")
	// ErrUnsupportedComponentType - unsupported componentType
	ErrUnsupportedComponentType = errors.New("unsupported componentType")
	// ErrUnsupportedLinkType - unsupported link type
	ErrUnsupportedLinkType = errors.New("unsupported link type")
	// ErrUnsupportedControllerType - unsupported ControllerType
	ErrUnsupportedControllerType = errors.New("unsupported ControllerType")
	// ErrInvalidJsonNode - invalid json node
	ErrInvalidJsonNode = errors.New("invalid json node")
	// ErrIvalidReels - invalid reels
	ErrIvalidReels = errors.New("invalid reels")

	// ErrIvalidDefaultScene - invalid default scene
	ErrIvalidDefaultScene = errors.New("invalid default scene")
	// ErrIvalidWidth - invalid width
	ErrIvalidWidth = errors.New("invalid width")
	// ErrIvalidHeight - invalid height
	ErrIvalidHeight = errors.New("invalid height")

	// ErrIvalidProto - invalid proto
	ErrIvalidProto = errors.New("invalid proto")

	// ErrIvalidSymbol - invalid symbol
	ErrIvalidSymbol = errors.New("invalid symbol")

	// ErrIvalidSymbolTriggerType - invalid SymbolTriggerType
	ErrIvalidSymbolTriggerType = errors.New("invalid SymbolTriggerType")

	// ErrNotMask - not mask
	ErrNotMask = errors.New("not mask")
	// ErrNotRespin - not respin
	ErrNotRespin = errors.New("not respin")

	// ErrInvalidSymbolNum - invalid SymbolNum
	ErrInvalidSymbolNum = errors.New("invalid SymbolNum")
	// ErrInvalidComponentVal - invalid ComponentVal
	ErrInvalidComponentVal = errors.New("invalid ComponentVal")
	// ErrInvalidBet - invalid Bet
	ErrInvalidBet = errors.New("invalid Bet")

	// ErrInvalidWeightVal - invalid weight value
	ErrInvalidWeightVal = errors.New("invalid weight value")

	// ErrComponentDoNothing - component do nothing
	ErrComponentDoNothing = errors.New("component do nothing")

	// ErrTooManySteps - too many steps
	ErrTooManySteps = errors.New("too many steps")
	// ErrTooManyComponentsInStep - too many components in step
	ErrTooManyComponentsInStep = errors.New("too many components in step")

	// ErrCannotForceOutcome - cannot force outcome
	ErrCannotForceOutcome = errors.New("cannot force outcome")
)
View Source
var IsStatsComponentMsg bool
View Source
var MapProperty map[string]int

Functions

func GetComponentDataVal added in v0.13.11

func GetComponentDataVal(pb proto.Message, val string) (int, bool)

func GetExcludeSymbols added in v0.12.216

func GetExcludeSymbols(pt *sgc7game.PayTables, symbols []int) []int

func IsInPosArea added in v0.12.230

func IsInPosArea(x, y int, posArea []int) bool

func NewStats2 added in v0.13.8

func NewStats2(components *ComponentList) *stats2.Stats

func NewStatsFeature

func NewStatsFeature(parent *sgc7stats.Feature, name string, onAnalyze sgc7stats.FuncAnalyzeFeature, width int, symbols []mathtoolset.SymbolType, statusType int, respinName string) *sgc7stats.Feature

func SetAllowForceOutcome added in v0.13.11

func SetAllowForceOutcome(maxTry int)

func SetAllowStatsV2 added in v0.13.8

func SetAllowStatsV2()

func SetForceDisableStats

func SetForceDisableStats()

SetForceDisableStats - disable stats

func SetJsonMode added in v0.12.281

func SetJsonMode()

func SetReleaseMode added in v0.12.250

func SetReleaseMode()

SetReleaseMode - release mode

func Spin added in v0.13.11

func Spin(game *Game, ips sgc7game.IPlayerState, plugin sgc7plugin.IPlugin, stake *sgc7game.Stake, cmd string, params string, cheat string) ([]*sgc7game.PlayResult, error)

func StartRTP

func StartRTP(gamecfg string, icore int, ispinnums int64, outputPath string, bet int64) error

func String2Property

func String2Property(str string) (int, error)

Types

type Award added in v0.10.273

type Award struct {
	AwardType       string   `yaml:"awardType" json:"awardType"`
	Type            int      `yaml:"-" json:"-"`
	Val             int      `yaml:"val" json:"-"`                           // 弃用,代码里已经不用了,初始化时会把数据转存到Vals里,为了兼容性保留配置
	StrParam        string   `yaml:"strParam" json:"-"`                      // 弃用,代码里已经不用了,初始化时会把数据转存到StrParams里,为了兼容性保留配置
	Vals            []int    `yaml:"vals" json:"vals"`                       // 数值参数
	StrParams       []string `yaml:"strParams" json:"strParams"`             // 字符串参数
	ComponentVals   []string `yaml:"componentVals" json:"componentVals"`     // 可以用component数值来替代常量,如果val长度为2,需要替换第二个参数,那么第一个参数应该给空字符串
	OnTriggerRespin string   `yaml:"onTriggerRespin" json:"onTriggerRespin"` // 在这个respin再次触发时才生效,这个时候会用当前respin的LastTriggerNum+CurTriggerNum作为TriggerIndex记下,当TriggerIndex==CurTriggerNum时才生效
	TriggerIndex    int      `yaml:"-" json:"-"`                             // 见上
}

func (*Award) GetVal added in v0.12.225

func (cfg *Award) GetVal(gameProp *GameProperty, i int) int

func (*Award) Init added in v0.10.323

func (cfg *Award) Init()

type AwardsNode added in v0.10.323

type AwardsNode struct {
	Weight int      `yaml:"weight" json:"weight"`
	Awards []*Award `yaml:"awards" json:"awards"`
}

type AwardsWeights added in v0.10.323

type AwardsWeights struct {
	Nodes     []*AwardsNode `yaml:"nodes" json:"nodes"`
	MaxWeight int           `yaml:"-" json:"-"`
}

func (*AwardsWeights) Init added in v0.10.323

func (aw *AwardsWeights) Init()

func (*AwardsWeights) RandVal added in v0.10.323

func (aw *AwardsWeights) RandVal(plugin sgc7plugin.IPlugin) (*AwardsNode, error)

type BasicComponent

type BasicComponent struct {
	Config      *BasicComponentConfig
	Name        string
	SrcSceneNum int
}

func NewBasicComponent

func NewBasicComponent(name string, srcSceneNum int) *BasicComponent

func (*BasicComponent) AddOtherScene

func (basicComponent *BasicComponent) AddOtherScene(gameProp *GameProperty, curpr *sgc7game.PlayResult,
	sc *sgc7game.GameScene, basicCD *BasicComponentData)

AddOtherScene -

func (*BasicComponent) AddRNG

func (basicComponent *BasicComponent) AddRNG(gameProp *GameProperty, rng int, basicCD *BasicComponentData)

AddRNG -

func (*BasicComponent) AddResult

func (basicComponent *BasicComponent) AddResult(curpr *sgc7game.PlayResult, ret *sgc7game.Result, basicCD *BasicComponentData)

AddResult -

func (*BasicComponent) AddScene

func (basicComponent *BasicComponent) AddScene(gameProp *GameProperty, curpr *sgc7game.PlayResult,
	sc *sgc7game.GameScene, basicCD *BasicComponentData)

AddScene -

func (*BasicComponent) AddSymbol added in v0.13.17

func (basicComponent *BasicComponent) AddSymbol(gameProp *GameProperty, symbol int)

AddSymbol -

func (*BasicComponent) ClearOtherScene added in v0.12.220

func (basicComponent *BasicComponent) ClearOtherScene(gameProp *GameProperty)

ClearOtherScene -

func (*BasicComponent) EachUsedResults

func (basicComponent *BasicComponent) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*BasicComponent) GetName added in v0.10.285

func (basicComponent *BasicComponent) GetName() string

GetName -

func (*BasicComponent) GetSymbols added in v0.13.17

func (basicComponent *BasicComponent) GetSymbols(gameProp *GameProperty) []int

GetSymbols -

func (*BasicComponent) GetTargetOtherScene

func (basicComponent *BasicComponent) GetTargetOtherScene(gameProp *GameProperty, curpr *sgc7game.PlayResult, basicCD *BasicComponentData) *sgc7game.GameScene

GetTargetOtherScene -

func (*BasicComponent) GetTargetOtherScene2 added in v0.12.205

func (basicComponent *BasicComponent) GetTargetOtherScene2(gameProp *GameProperty, curpr *sgc7game.PlayResult, basicCD *BasicComponentData, component string, tag string) *sgc7game.GameScene

func (*BasicComponent) GetTargetScene

func (basicComponent *BasicComponent) GetTargetScene(gameProp *GameProperty, curpr *sgc7game.PlayResult, basicCD *BasicComponentData, targetScene string) *sgc7game.GameScene

GetTargetScene -

func (*BasicComponent) GetTargetScene2 added in v0.12.205

func (basicComponent *BasicComponent) GetTargetScene2(gameProp *GameProperty, curpr *sgc7game.PlayResult, basicCD *BasicComponentData, component string, tag string) *sgc7game.GameScene

func (*BasicComponent) GetTargetScene3 added in v0.12.272

func (basicComponent *BasicComponent) GetTargetScene3(gameProp *GameProperty, curpr *sgc7game.PlayResult, basicCD *BasicComponentData, component string, tag string, si int) *sgc7game.GameScene

func (*BasicComponent) IsMask added in v0.12.170

func (basicComponent *BasicComponent) IsMask() bool

IsMask -

func (*BasicComponent) IsRespin added in v0.12.157

func (basicComponent *BasicComponent) IsRespin() bool

IsRespin -

func (*BasicComponent) NewComponentData

func (basicComponent *BasicComponent) NewComponentData() IComponentData

NewComponentData -

func (*BasicComponent) NewStats2 added in v0.13.8

func (basicComponent *BasicComponent) NewStats2() *stats2.Feature

NewStats2 -

func (*BasicComponent) OnNewGame

func (basicComponent *BasicComponent) OnNewGame(gameProp *GameProperty) error

OnNewGame -

func (*BasicComponent) OnNewStep

func (basicComponent *BasicComponent) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*BasicComponent) OnPlayGameEnd added in v0.10.273

func (basicComponent *BasicComponent) OnPlayGameEnd(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

OnPlayGame - on playgame

func (*BasicComponent) OnStats2 added in v0.13.8

func (basicComponent *BasicComponent) OnStats2(icd IComponentData, s2 *stats2.Stats)

OnStats2

func (*BasicComponent) OnStatsWithPB

func (basicComponent *BasicComponent) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

func (*BasicComponent) OnStatsWithPBBasicComponentData

func (basicComponent *BasicComponent) OnStatsWithPBBasicComponentData(feature *sgc7stats.Feature, pbComponent *sgc7pb.ComponentData, pr *sgc7game.PlayResult) int64

OnStatsWithComponent -

func (*BasicComponent) ReTagScene added in v0.10.267

func (basicComponent *BasicComponent) ReTagScene(gameProp *GameProperty, curpr *sgc7game.PlayResult,
	si int, basicCD *BasicComponentData)

ReTagScene -

type BasicComponentConfig

type BasicComponentConfig struct {
	DefaultNextComponent   string            `yaml:"defaultNextComponent" json:"defaultNextComponent"`     // next component, if it is empty jump to ending
	TagScenes              []string          `yaml:"tagScenes" json:"tagScenes"`                           // tag scenes,v0.13开始弃用
	TagOtherScenes         []string          `yaml:"tagOtherScenes" json:"tagOtherScenes"`                 // tag otherScenes,v0.13开始弃用
	TargetScene            string            `yaml:"targetScene" json:"targetScene"`                       // target scenes,v0.13开始弃用
	TargetOtherScene       string            `yaml:"targetOtherScene" json:"targetOtherScene"`             // target otherscenes,v0.13开始弃用
	TagGlobalScenes        []string          `yaml:"tagGlobalScenes" json:"tagGlobalScenes"`               // tag global scenes,v0.13开始弃用
	TargetGlobalScene      string            `yaml:"targetGlobalScene" json:"targetGlobalScene"`           // target global scenes,v0.13开始弃用
	TagGlobalOtherScenes   []string          `yaml:"tagGlobalOtherScenes" json:"tagGlobalOtherScenes"`     // tag global other scenes,v0.13开始弃用
	TargetGlobalOtherScene string            `yaml:"targetGlobalOtherScene" json:"targetGlobalOtherScene"` // target global other scenes,v0.13开始弃用
	Scene2Components       []string          `yaml:"scene2Components" json:"scene2Components"`             // 新版本,关于scene换了个思路,用目标对象来驱动
	OtherScene2Components  []string          `yaml:"otherScene2Components" json:"otherScene2Components"`   // 新版本,关于other scene换了个思路,用目标对象来驱动
	TagRNG                 []string          `yaml:"tagRNG" json:"tagRNG"`                                 // tag RNG
	InitStrVals            map[string]string `yaml:"initStrVals" json:"initStrVals"`                       // 只要这个组件被执行,就会初始化这些strvals
	UseFileMapping         bool              `yaml:"useFileMapping" json:"useFileMapping"`                 // 兼容性配置,新配置应该一定用filemapping
	ComponentType          string            `yaml:"-" json:"componentType"`                               // 组件类型
	UseSceneV2             bool              `yaml:"useSceneV2" json:"useSceneV2"`                         // 新版本的scene
	TargetScenes3          [][]string        `yaml:"targetScenes3" json:"targetScenes3"`                   // target scenes V3
	UseSceneV3             bool              `yaml:"useSceneV3" json:"useSceneV3"`                         // 新版本的scene
	IsNeedCacheScene3      bool              `yaml:"isNeedCacheScene3" json:"isNeedCacheScene3"`           // 是否需要缓存scene
}

新思路:尽量弱化变量的概念,所有变量都放到component里面去,譬如循环、scene、分支等,这样逻辑会更清晰

type BasicComponentData

type BasicComponentData struct {
	UsedScenes            []int
	UsedOtherScenes       []int
	UsedResults           []int
	UsedPrizeScenes       []int
	CashWin               int64
	CoinWin               int
	TargetSceneIndex      int
	TargetOtherSceneIndex int
	RNG                   []int
	MapConfigVals         map[string]string
	MapConfigIntVals      map[string]int
	SrcScenes             []int
}

func (*BasicComponentData) BuildPBBasicComponentData

func (basicComponentData *BasicComponentData) BuildPBBasicComponentData() *sgc7pb.ComponentData

BuildPBBasicComponentData

func (*BasicComponentData) BuildPBComponentData

func (basicComponentData *BasicComponentData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*BasicComponentData) ChgConfigIntVal added in v0.13.11

func (basicComponentData *BasicComponentData) ChgConfigIntVal(key string, off int)

ChgConfigIntVal -

func (*BasicComponentData) GetConfigIntVal added in v0.12.278

func (basicComponentData *BasicComponentData) GetConfigIntVal(key string) (int, bool)

GetConfigIntVal -

func (*BasicComponentData) GetConfigVal added in v0.12.244

func (basicComponentData *BasicComponentData) GetConfigVal(key string) string

GetConfigVal -

func (*BasicComponentData) GetResults added in v0.13.8

func (basicComponentData *BasicComponentData) GetResults() []int

GetResults -

func (*BasicComponentData) GetVal added in v0.12.225

func (basicComponentData *BasicComponentData) GetVal(key string) int

GetVal -

func (*BasicComponentData) OnNewGame

func (basicComponentData *BasicComponentData) OnNewGame()

OnNewGame -

func (*BasicComponentData) OnNewStep

func (basicComponentData *BasicComponentData) OnNewStep()

OnNewStep -

func (*BasicComponentData) SetConfigIntVal added in v0.12.278

func (basicComponentData *BasicComponentData) SetConfigIntVal(key string, val int)

SetConfigIntVal -

func (*BasicComponentData) SetConfigVal added in v0.12.244

func (basicComponentData *BasicComponentData) SetConfigVal(key string, val string)

SetConfigVal -

func (*BasicComponentData) SetVal added in v0.12.225

func (basicComponentData *BasicComponentData) SetVal(key string, val int)

SetVal -

type BasicGameMod

type BasicGameMod struct {
	*sgc7game.BasicGameMod
	Pool          *GamePropertyPool
	MapComponents map[int]*ComponentList
}

BasicGameMod - basic gamemod

func NewBasicGameMod

func NewBasicGameMod(pool *GamePropertyPool, cfgGameMod *GameModConfig, mgrComponent *ComponentMgr) *BasicGameMod

NewBasicGameMod - new BaseGame

func NewBasicGameMod2 added in v0.12.36

func NewBasicGameMod2(pool *GamePropertyPool, cfgGameMod *GameModConfig, mgrComponent *ComponentMgr) (*BasicGameMod, error)

NewBasicGameMod2 - new BaseGame

func (*BasicGameMod) OnAsciiGame

func (bgm *BasicGameMod) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult) error

OnAsciiGame - outpur to asciigame

func (*BasicGameMod) OnNewGame

func (bgm *BasicGameMod) OnNewGame(gameProp *GameProperty, stake *sgc7game.Stake) error

OnNewGame -

func (*BasicGameMod) OnNewStep

func (bgm *BasicGameMod) OnNewStep(gameProp *GameProperty, stake *sgc7game.Stake) error

OnNewStep -

func (*BasicGameMod) OnPlay

func (bgm *BasicGameMod) OnPlay(game sgc7game.IGame, plugin sgc7plugin.IPlugin, cmd string, param string,
	ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult, gameData any) (*sgc7game.PlayResult, error)

OnPlay - on play

func (*BasicGameMod) ResetConfig

func (bgm *BasicGameMod) ResetConfig(cfg *Config)

ResetConfig

type BasicReels

type BasicReels struct {
	*BasicComponent `json:"-"`
	Config          *BasicReelsConfig     `json:"config"`
	ReelSetWeights  *sgc7game.ValWeights2 `json:"-"`
}

func (*BasicReels) GetReelSet added in v0.12.244

func (basicReels *BasicReels) GetReelSet(basicCD *BasicComponentData) string

func (*BasicReels) Init

func (basicReels *BasicReels) Init(fn string, pool *GamePropertyPool) error

Init -

func (*BasicReels) InitEx added in v0.12.33

func (basicReels *BasicReels) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*BasicReels) OnAsciiGame

func (basicReels *BasicReels) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*BasicReels) OnPlayGame

func (basicReels *BasicReels) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*BasicReels) OnStats

func (basicReels *BasicReels) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type BasicReelsConfig

type BasicReelsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	ReelSetsWeight       string `yaml:"reelSetWeight" json:"reelSetWeight"`
	ReelSet              string `yaml:"reelSet" json:"reelSet"`
	IsExpandReel         bool   `yaml:"isExpandReel" json:"isExpandReel"`
}

BasicReelsConfig - configuration for BasicReels

func (*BasicReelsConfig) SetLinkComponent added in v0.12.278

func (cfg *BasicReelsConfig) SetLinkComponent(link string, componentName string)

SetLinkComponent

type BasicWins

type BasicWins struct {
	*BasicComponent `json:"-"`
	Config          *BasicWinsConfig `json:"config"`
	ExcludeSymbols  []int            `json:"-"`
	WildSymbols     []int            `json:"-"`
}

func (*BasicWins) EachUsedResults added in v0.10.251

func (basicWins *BasicWins) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*BasicWins) Init

func (basicWins *BasicWins) Init(fn string, pool *GamePropertyPool) error

Init -

func (*BasicWins) InitEx added in v0.12.33

func (basicWins *BasicWins) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*BasicWins) NewComponentData added in v0.10.251

func (basicWins *BasicWins) NewComponentData() IComponentData

NewComponentData -

func (*BasicWins) OnAsciiGame

func (basicWins *BasicWins) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*BasicWins) OnPlayGame

func (basicWins *BasicWins) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*BasicWins) OnStats

func (basicWins *BasicWins) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*BasicWins) OnStatsWithPB added in v0.10.256

func (basicWins *BasicWins) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

func (*BasicWins) ProcTriggerFeature

func (basicWins *BasicWins) ProcTriggerFeature(tf *TriggerFeatureConfig, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult, bwd *BasicWinsData) *sgc7game.Result

AddResult -

type BasicWinsConfig

type BasicWinsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	MainType             string                  `yaml:"mainType" json:"mainType"`             // lines or ways
	BetType              string                  `yaml:"betType" json:"betType"`               // bet or totalBet
	StrCheckWinType      string                  `yaml:"checkWinType" json:"checkWinType"`     // left2right or right2left or all
	CheckWinType         CheckWinType            `yaml:"-" json:"-"`                           //
	SIWMSymbols          []string                `yaml:"SIWMSymbols" json:"SIWMSymbols"`       // SIWM就是如果有符号参与中奖考虑倍数,这里是SIWM的图标
	SIWMSymbolCodes      []int                   `yaml:"-" json:"-"`                           //
	SIWMMul              int                     `yaml:"SIWMMul" json:"SIWMMul"`               // 这里是SIWM的倍数
	ExcludeSymbols       []string                `yaml:"excludeSymbols" json:"excludeSymbols"` // w/s etc
	WildSymbols          []string                `yaml:"wildSymbols" json:"wildSymbols"`       // wild etc
	BeforMain            []*TriggerFeatureConfig `yaml:"beforMain" json:"beforMain"`           // befor the maintype
	AfterMain            []*TriggerFeatureConfig `yaml:"afterMain" json:"afterMain"`           // after the maintype
	BeforMainTriggerName []string                `yaml:"-" json:"-"`                           // befor the maintype
	AfterMainTriggerName []string                `yaml:"-" json:"-"`                           // after the maintype
	IsRespinBreak        bool                    `yaml:"isRespinBreak" json:"isRespinBreak"`   // 如果触发了respin就不执行next,这个是兼容性配置,新游戏应该给true,维持逻辑的一致性
}

BasicWinsConfig - configuration for BasicWins

type BasicWinsData added in v0.10.251

type BasicWinsData struct {
	BasicComponentData
	NextComponent string
}

func (*BasicWinsData) BuildPBComponentData added in v0.10.251

func (basicWinsData *BasicWinsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*BasicWinsData) OnNewGame added in v0.10.251

func (basicWinsData *BasicWinsData) OnNewGame()

OnNewGame -

func (*BasicWinsData) OnNewStep added in v0.10.251

func (basicWinsData *BasicWinsData) OnNewStep()

OnNewStep -

type BetType added in v0.12.147

type BetType int
const (
	BTypeNoPay    BetType = 0
	BTypeBet      BetType = 1
	BTypeTotalBet BetType = 2
)

func ParseBetType added in v0.12.147

func ParseBetType(str string) BetType

type BookOf

type BookOf struct {
	*BasicComponent `json:"-"`
	Config          *BookOfConfig         `json:"config"`
	WeightTrigger   *sgc7game.ValWeights2 `json:"-"`
	WeightSymbolNum *sgc7game.ValWeights2 `json:"-"`
	WeightSymbol    *sgc7game.ValWeights2 `json:"-"`
}

func (*BookOf) EachUsedResults

func (bookof *BookOf) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*BookOf) Init

func (bookof *BookOf) Init(fn string, pool *GamePropertyPool) error

Init -

func (*BookOf) InitEx added in v0.12.33

func (bookof *BookOf) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*BookOf) NewComponentData

func (bookof *BookOf) NewComponentData() IComponentData

NewComponentData -

func (*BookOf) OnAsciiGame

func (bookof *BookOf) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*BookOf) OnPlayGame

func (bookof *BookOf) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*BookOf) OnStats

func (bookof *BookOf) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*BookOf) OnStatsWithPB

func (bookof *BookOf) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type BookOf2 added in v0.12.145

type BookOf2 struct {
	*BasicComponent `json:"-"`
	Config          *BookOf2Config `json:"config"`
}

func (*BookOf2) EachUsedResults added in v0.12.145

func (bookof2 *BookOf2) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*BookOf2) Init added in v0.12.145

func (bookof2 *BookOf2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*BookOf2) InitEx added in v0.12.145

func (bookof2 *BookOf2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*BookOf2) NewComponentData added in v0.12.145

func (bookof2 *BookOf2) NewComponentData() IComponentData

NewComponentData -

func (*BookOf2) OnAsciiGame added in v0.12.145

func (bookof2 *BookOf2) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*BookOf2) OnPlayGame added in v0.12.145

func (bookof2 *BookOf2) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*BookOf2) OnStats added in v0.12.145

func (bookof2 *BookOf2) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*BookOf2) OnStatsWithPB added in v0.12.145

func (bookof2 *BookOf2) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type BookOf2Config added in v0.12.145

type BookOf2Config struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	BetType              string                `yaml:"betType" json:"betType"`         // bet or totalBet
	WildSymbols          []string              `yaml:"wildSymbols" json:"wildSymbols"` // 可以不要wild
	WildSymbolCodes      []int                 `yaml:"-" json:"-"`
	ForceTrigger         bool                  `yaml:"forceTrigger" json:"forceTrigger"`
	WeightTrigger        string                `yaml:"weightTrigger" json:"weightTrigger"`
	WeightTriggerVW      *sgc7game.ValWeights2 `json:"-"`
	WeightSymbolNum      string                `yaml:"weightSymbolNum" json:"weightSymbolNum"`
	WeightSymbolNumVW    *sgc7game.ValWeights2 `json:"-"`
	WeightSymbol         string                `yaml:"weightSymbol" json:"weightSymbol"`
	WeightSymbolVW       *sgc7game.ValWeights2 `json:"-"`
	ForceSymbolNum       int                   `yaml:"forceSymbolNum" json:"forceSymbolNum"`
	SymbolRNG            string                `yaml:"symbolRNG" json:"symbolRNG"`               // 只在ForceSymbolNum为1时有效
	SymbolCollection     string                `yaml:"symbolCollection" json:"symbolCollection"` // 图标从一个SymbolCollection里获取
	MapSymbols           map[string][]string   `yaml:"mapSymbols" json:"mapSymbols"`             // 一个符号对应1+wild数量个变化,第1个是被选中,第2个是wild[0]变化效果,第3个是wild[1]变化效果
	MapSymbolCodes       map[int][]int         `yaml:"-" json:"-"`
}

BookOf2Config - configuration for BookOf feature

type BookOf2Data added in v0.12.145

type BookOf2Data struct {
	BasicComponentData
	Symbols []int
}

func (*BookOf2Data) BuildPBComponentData added in v0.12.145

func (bookOf2Data *BookOf2Data) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*BookOf2Data) OnNewGame added in v0.12.145

func (bookOf2Data *BookOf2Data) OnNewGame()

OnNewGame -

func (*BookOf2Data) OnNewStep added in v0.12.145

func (bookOf2Data *BookOf2Data) OnNewStep()

OnNewStep -

type BookOfConfig

type BookOfConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	BetType              string   `yaml:"betType" json:"betType"`         // bet or totalBet
	WildSymbols          []string `yaml:"wildSymbols" json:"wildSymbols"` // 可以不要wild
	WildSymbolCodes      []int    `yaml:"-" json:"-"`
	ForceTrigger         bool     `yaml:"forceTrigger" json:"forceTrigger"`
	WeightTrigger        string   `yaml:"weightTrigger" json:"weightTrigger"`
	WeightSymbolNum      string   `yaml:"weightSymbolNum" json:"weightSymbolNum"`
	WeightSymbol         string   `yaml:"weightSymbol" json:"weightSymbol"`
	ForceSymbolNum       int      `yaml:"forceSymbolNum" json:"forceSymbolNum"`
	SymbolRNG            string   `yaml:"symbolRNG" json:"symbolRNG"`               // 只在ForceSymbolNum为1时有效
	SymbolCollection     string   `yaml:"symbolCollection" json:"symbolCollection"` // 图标从一个SymbolCollection里获取
}

BookOfConfig - configuration for BookOf feature

type BookOfData added in v0.10.273

type BookOfData struct {
	BasicComponentData
	Symbols []int
}

func (*BookOfData) BuildPBComponentData added in v0.10.273

func (bookOfData *BookOfData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*BookOfData) OnNewGame added in v0.10.273

func (bookOfData *BookOfData) OnNewGame()

OnNewGame -

func (*BookOfData) OnNewStep added in v0.10.273

func (bookOfData *BookOfData) OnNewStep()

OnNewStep -

type BranchNode added in v0.13.17

type BranchNode struct {
	Awards          []*Award `yaml:"awards" json:"awards"` // 新的奖励系统
	JumpToComponent string   `yaml:"jumpToComponent" json:"jumpToComponent"`
}

BranchNode -

type CheckWinType added in v0.12.16

type CheckWinType int
const (
	// CheckWinTypeLeftRight - left -> right
	CheckWinTypeLeftRight CheckWinType = 0
	// CheckWinTypeRightLeft - right -> left
	CheckWinTypeRightLeft CheckWinType = 1
	// CheckWinTypeAll - left -> right & right -> left
	CheckWinTypeAll CheckWinType = 2
)

func ParseCheckWinType added in v0.12.16

func ParseCheckWinType(str string) CheckWinType

type ChgSymbol added in v0.10.273

type ChgSymbol struct {
	*BasicComponent `json:"-"`
	Config          *ChgSymbolConfig `json:"config"`
}

func (*ChgSymbol) Init added in v0.10.273

func (chgSymbol *ChgSymbol) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ChgSymbol) InitEx added in v0.12.33

func (chgSymbol *ChgSymbol) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ChgSymbol) OnAsciiGame added in v0.10.273

func (chgSymbol *ChgSymbol) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*ChgSymbol) OnPlayGame added in v0.10.273

func (chgSymbol *ChgSymbol) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*ChgSymbol) OnStats added in v0.10.273

func (chgSymbol *ChgSymbol) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type ChgSymbolConfig added in v0.10.273

type ChgSymbolConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Nodes                []*ChgSymbolNodeConfig `yaml:"nodes" json:"nodes"`
}

ChgSymbolConfig - configuration for ChgSymbol feature

type ChgSymbolNodeConfig added in v0.10.273

type ChgSymbolNodeConfig struct {
	X          int    `yaml:"x" json:"x"`
	Y          int    `yaml:"y" json:"y"`
	Symbol     string `yaml:"symbol" json:"symbol"`
	SymbolCode int    `yaml:"symbolCode" json:"symbolCode"`
}

ChgSymbolNodeConfig -

type ClusterTrigger added in v0.13.8

type ClusterTrigger struct {
	*BasicComponent `json:"-"`
	Config          *ClusterTriggerConfig `json:"config"`
}

func (*ClusterTrigger) CanTrigger added in v0.13.8

func (clusterTrigger *ClusterTrigger) CanTrigger(gameProp *GameProperty, gs *sgc7game.GameScene, curpr *sgc7game.PlayResult, stake *sgc7game.Stake, isSaveResult bool) (bool, []*sgc7game.Result)

CanTrigger -

func (*ClusterTrigger) GetWinMulti added in v0.13.8

func (clusterTrigger *ClusterTrigger) GetWinMulti(basicCD *BasicComponentData) int

func (*ClusterTrigger) Init added in v0.13.8

func (clusterTrigger *ClusterTrigger) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ClusterTrigger) InitEx added in v0.13.8

func (clusterTrigger *ClusterTrigger) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ClusterTrigger) NewComponentData added in v0.13.8

func (clusterTrigger *ClusterTrigger) NewComponentData() IComponentData

NewComponentData -

func (*ClusterTrigger) OnAsciiGame added in v0.13.8

func (clusterTrigger *ClusterTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*ClusterTrigger) OnPlayGame added in v0.13.8

func (clusterTrigger *ClusterTrigger) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*ClusterTrigger) OnStats added in v0.13.8

func (clusterTrigger *ClusterTrigger) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*ClusterTrigger) OnStatsWithPB added in v0.13.8

func (clusterTrigger *ClusterTrigger) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type ClusterTriggerConfig added in v0.13.8

type ClusterTriggerConfig struct {
	BasicComponentConfig            `yaml:",inline" json:",inline"`
	Symbols                         []string                      `yaml:"symbols" json:"symbols"`                                             // like scatter
	SymbolCodes                     []int                         `yaml:"-" json:"-"`                                                         // like scatter
	ExcludeSymbolCodes              []int                         `yaml:"-" json:"-"`                                                         // 在 lines 和 ways 里有用
	Type                            string                        `yaml:"type" json:"type"`                                                   // like scatters
	TriggerType                     SymbolTriggerType             `yaml:"-" json:"-"`                                                         // SymbolTriggerType
	BetTypeString                   string                        `yaml:"betType" json:"betType"`                                             // bet or totalBet or noPay
	BetType                         BetType                       `yaml:"-" json:"-"`                                                         // bet or totalBet or noPay
	MinNum                          int                           `yaml:"minNum" json:"minNum"`                                               // like 3,countscatter 或 countscatterInArea 或 checkLines 或 checkWays 时生效
	WildSymbols                     []string                      `yaml:"wildSymbols" json:"wildSymbols"`                                     // wild etc
	WildSymbolCodes                 []int                         `yaml:"-" json:"-"`                                                         // wild symbolCode
	StrCheckWinType                 string                        `yaml:"checkWinType" json:"checkWinType"`                                   // left2right or right2left or all
	CheckWinType                    CheckWinType                  `yaml:"-" json:"-"`                                                         //
	WinMulti                        int                           `yaml:"winMulti" json:"winMulti"`                                           // winMulti,最后的中奖倍数,默认为1
	JumpToComponent                 string                        `yaml:"jumpToComponent" json:"jumpToComponent"`                             // jump to
	ForceToNext                     bool                          `yaml:"forceToNext" json:"forceToNext"`                                     // 如果触发,默认跳转jump to,这里可以强制走next分支
	Awards                          []*Award                      `yaml:"awards" json:"awards"`                                               // 新的奖励系统
	SymbolAwardsWeights             *AwardsWeights                `yaml:"symbolAwardsWeights" json:"symbolAwardsWeights"`                     // 每个中奖符号随机一组奖励
	TargetMask                      string                        `yaml:"targetMask" json:"targetMask"`                                       // 如果是scatter这一组判断,可以把结果传递给一个mask
	IsReverse                       bool                          `yaml:"isReverse" json:"isReverse"`                                         // 如果isReverse,表示判定为否才触发
	NeedDiscardResults              bool                          `yaml:"needDiscardResults" json:"needDiscardResults"`                       // 如果needDiscardResults,表示抛弃results
	IsAddRespinMode                 bool                          `yaml:"isAddRespinMode" json:"isAddRespinMode"`                             // 是否是增加respinNum模式,默认是增加triggerNum模式
	RespinNum                       int                           `yaml:"respinNum" json:"respinNum"`                                         // respin number
	RespinNumWeight                 string                        `yaml:"respinNumWeight" json:"respinNumWeight"`                             // respin number weight
	RespinNumWeightVW               *sgc7game.ValWeights2         `yaml:"-" json:"-"`                                                         // respin number weight
	RespinNumWithScatterNum         map[int]int                   `yaml:"respinNumWithScatterNum" json:"respinNumWithScatterNum"`             // respin number with scatter number
	RespinNumWeightWithScatterNum   map[int]string                `yaml:"respinNumWeightWithScatterNum" json:"respinNumWeightWithScatterNum"` // respin number weight with scatter number
	RespinNumWeightWithScatterNumVW map[int]*sgc7game.ValWeights2 `yaml:"-" json:"-"`                                                         // respin number weight with scatter number
}

ClusterTriggerConfig - configuration for ClusterTrigger 需要特别注意,当判断scatter时,symbols里的符号会当作同一个符号来处理

func (*ClusterTriggerConfig) SetLinkComponent added in v0.13.8

func (cfg *ClusterTriggerConfig) SetLinkComponent(link string, componentName string)

SetLinkComponent

type ClusterTriggerData added in v0.13.8

type ClusterTriggerData struct {
	BasicComponentData
	NextComponent string
	SymbolNum     int
	WildNum       int
	RespinNum     int
	Wins          int
	WinMulti      int
}

func (*ClusterTriggerData) BuildPBComponentData added in v0.13.8

func (clusterTriggerData *ClusterTriggerData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*ClusterTriggerData) GetVal added in v0.13.8

func (clusterTriggerData *ClusterTriggerData) GetVal(key string) int

GetVal -

func (*ClusterTriggerData) OnNewGame added in v0.13.8

func (clusterTriggerData *ClusterTriggerData) OnNewGame()

OnNewGame -

func (*ClusterTriggerData) OnNewStep added in v0.13.8

func (clusterTriggerData *ClusterTriggerData) OnNewStep()

OnNewStep -

func (*ClusterTriggerData) SetVal added in v0.13.8

func (clusterTriggerData *ClusterTriggerData) SetVal(key string, val int)

SetVal -

type Collector

type Collector struct {
	*BasicComponent `json:"-"`
	Config          *CollectorConfig `json:"config"`
	SymbolCode      int              `json:"-"`
}

func (*Collector) Add added in v0.10.323

func (collector *Collector) Add(plugin sgc7plugin.IPlugin, num int, cd *CollectorData, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, noProcLevelUp bool) error

Add -

func (*Collector) EachUsedResults

func (collector *Collector) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*Collector) Init

func (collector *Collector) Init(fn string, pool *GamePropertyPool) error

Init -

func (*Collector) InitEx added in v0.12.33

func (collector *Collector) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*Collector) NewComponentData

func (collector *Collector) NewComponentData() IComponentData

NewComponentData -

func (*Collector) OnAsciiGame

func (collector *Collector) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*Collector) OnPlayGame

func (collector *Collector) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*Collector) OnStats

func (collector *Collector) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*Collector) OnStatsWithPB

func (collector *Collector) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type CollectorConfig

type CollectorConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Symbol               string           `yaml:"symbol" json:"symbol"`
	MaxVal               int              `yaml:"maxVal" json:"maxVal"`
	PerLevelAwards       []*Award         `yaml:"perLevelAwards" json:"perLevelAwards"`
	MapSPLevelAwards     map[int][]*Award `yaml:"mapSPLevelAwards" json:"mapSPLevelAwards"`
}

CollectorConfig - configuration for Collector

type CollectorData

type CollectorData struct {
	BasicComponentData
	Val          int // 当前总值, Current total value
	NewCollector int // 这一个step收集到的, The values collected in this step
}

func (*CollectorData) BuildPBComponentData

func (collectorData *CollectorData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*CollectorData) OnNewGame

func (collectorData *CollectorData) OnNewGame()

OnNewGame -

func (*CollectorData) OnNewStep

func (collectorData *CollectorData) OnNewStep()

OnNewStep -

type ComponentConfig

type ComponentConfig struct {
	Name   string `yaml:"name"`
	Type   string `yaml:"type"`
	Config string `yaml:"config"`
}

type ComponentList

type ComponentList struct {
	Components    []IComponent
	MapComponents map[string]IComponent
	Stats2        *stats2.Stats
}

func NewComponentList

func NewComponentList() *ComponentList

func (*ComponentList) AddComponent

func (lst *ComponentList) AddComponent(name string, component IComponent)

type ComponentMgr

type ComponentMgr struct {
	MapComponent map[string]FuncNewComponent
}

func NewComponentMgr

func NewComponentMgr() *ComponentMgr

func (*ComponentMgr) NewComponent

func (mgr *ComponentMgr) NewComponent(cfgComponent *ComponentConfig) IComponent

func (*ComponentMgr) Reg

func (mgr *ComponentMgr) Reg(component string, funcNew FuncNewComponent)

type ComponentTrigger added in v0.12.233

type ComponentTrigger struct {
	*BasicComponent `json:"-"`
	Config          *ComponentTriggerConfig `json:"config"`
}

func (*ComponentTrigger) Init added in v0.12.233

func (componentTrigger *ComponentTrigger) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ComponentTrigger) InitEx added in v0.12.233

func (componentTrigger *ComponentTrigger) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ComponentTrigger) OnAsciiGame added in v0.12.233

func (componentTrigger *ComponentTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*ComponentTrigger) OnPlayGame added in v0.12.233

func (componentTrigger *ComponentTrigger) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*ComponentTrigger) OnStats added in v0.12.233

func (componentTrigger *ComponentTrigger) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type ComponentTriggerConfig added in v0.12.233

type ComponentTriggerConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	CheckRunComponents   []string `yaml:"checkRunComponents" json:"checkRunComponents"` // 这一组components只要有1个已经运行过就算触发
	JumpToComponent      string   `yaml:"jumpToComponent" json:"jumpToComponent"`       // jump to
	IsReverse            bool     `yaml:"isReverse" json:"isReverse"`                   // 如果isReverse,表示判定为否才触发
}

ComponentTriggerConfig - configuration for ComponentTrigger

type ComponentValTrigger added in v0.12.236

type ComponentValTrigger struct {
	*BasicComponent `json:"-"`
	Config          *ComponentValTriggerConfig `json:"config"`
}

func (*ComponentValTrigger) Init added in v0.12.236

func (componentValTrigger *ComponentValTrigger) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ComponentValTrigger) InitEx added in v0.12.236

func (componentValTrigger *ComponentValTrigger) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ComponentValTrigger) OnAsciiGame added in v0.12.236

func (componentTrigger *ComponentValTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*ComponentValTrigger) OnPlayGame added in v0.12.236

func (componentValTrigger *ComponentValTrigger) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*ComponentValTrigger) OnStats added in v0.12.236

func (componentTrigger *ComponentValTrigger) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type ComponentValTriggerConfig added in v0.12.236

type ComponentValTriggerConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	ComponentVals        []string      `yaml:"componentVals" json:"componentVals"`     // 用来检查的值,bg-wins.wins 这样的命名方式
	OperateString        []string      `yaml:"operate" json:"operate"`                 // ==/>=/<=/>/</!=
	Operate              []OperateType `yaml:"-" json:"-"`                             //
	TargetVals           []int         `yaml:"targetVals" json:"targetVals"`           // 目标值
	JumpToComponent      string        `yaml:"jumpToComponent" json:"jumpToComponent"` // jump to
}

ComponentValTriggerConfig - configuration for ComponentValTrigger

type Config

type Config struct {
	Name              string                         `yaml:"name"`
	Width             int                            `yaml:"width"`
	Height            int                            `yaml:"height"`
	Linedata          map[string]string              `yaml:"linedata"`
	MapLinedate       map[string]*sgc7game.LineData  `yaml:"-"`
	Paytables         map[string]string              `yaml:"paytables"`
	MapPaytables      map[string]*sgc7game.PayTables `yaml:"-"`
	IsIntReel         bool                           `yaml:"isIntReel"`
	Reels             map[string]string              `yaml:"reels"`
	MapReels          map[string]*sgc7game.ReelsData `yaml:"-"`
	FileMapping       map[string]string              `yaml:"fileMapping"`
	SymbolsViewer     string                         `yaml:"symbolsViewer"`
	DefaultScene      string                         `yaml:"defaultScene"`
	DefaultPaytables  string                         `yaml:"defaultPaytables"`
	DefaultLinedata   string                         `yaml:"defaultLinedata"`
	Bets              []int                          `yaml:"bets"`
	TotalBetInWins    []int                          `yaml:"totalBetInWins"`
	StartComponents   map[int]string                 `yaml:"startComponents"`
	GameMods          []*GameModConfig               `yaml:"gamemods"`
	StatsSymbols      []string                       `yaml:"statsSymbols"`
	StatsSymbolCodes  []mathtoolset.SymbolType       `yaml:"-"`
	Stats             *StatsConfig                   `yaml:"stats"`
	RTP               *RTPConfig                     `yaml:"rtp"`
	MainPath          string                         `yaml:"mainPath"`
	MapCmdComponent   map[string]string              `yaml:"mapCmdComponent"`
	ComponentsMapping map[int]map[string]string      `yaml:"componentsMapping"`
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig(fn string) (*Config, error)

func (*Config) BuildStatsSymbolCodes

func (cfg *Config) BuildStatsSymbolCodes(paytables *sgc7game.PayTables) error

func (*Config) GetDefaultLineData

func (cfg *Config) GetDefaultLineData() *sgc7game.LineData

func (*Config) GetDefaultPaytables

func (cfg *Config) GetDefaultPaytables() *sgc7game.PayTables

func (*Config) GetPath added in v0.10.251

func (cfg *Config) GetPath(fn string, useFileMapping bool) string
type DropDownSymbols struct {
	*BasicComponent `json:"-"`
	Config          *DropDownSymbolsConfig `json:"config"`
}
func (dropDownSymbols *DropDownSymbols) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (dropDownSymbols *DropDownSymbols) Init(fn string, pool *GamePropertyPool) error

Init -

func (dropDownSymbols *DropDownSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (dropDownSymbols *DropDownSymbols) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (dropDownSymbols *DropDownSymbols) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (dropDownSymbols *DropDownSymbols) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (dropDownSymbols *DropDownSymbols) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type DropDownSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	HoldSymbols          []string `yaml:"holdSymbols" json:"holdSymbols"` // 不需要下落的symbol
	HoldSymbolCodes      []int    `yaml:"-" json:"-"`                     // 不需要下落的symbol
}

DropDownSymbolsConfig - configuration for DropDownSymbols

type FOData added in v0.13.11

type FOData struct {
	Component   string
	Value       string
	Operator    string
	TargetValue int
}

func ParseFOData added in v0.13.11

func ParseFOData(str string) *FOData

parse a parse a.b >= 1

func (*FOData) IsValid added in v0.13.11

func (fod *FOData) IsValid(lst []*sgc7game.PlayResult) bool

type FixSymbols added in v0.10.350

type FixSymbols struct {
	*BasicComponent `json:"-"`
	Config          *FixSymbolsConfig `json:"config"`
	SymbolCodes     []int             `json:"-"`
	Type            int               `json:"-"`
}

func (*FixSymbols) Init added in v0.10.350

func (fixSymbols *FixSymbols) Init(fn string, pool *GamePropertyPool) error

Init -

func (*FixSymbols) InitEx added in v0.12.33

func (fixSymbols *FixSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*FixSymbols) OnAsciiGame added in v0.10.350

func (fixSymbols *FixSymbols) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*FixSymbols) OnPlayGame added in v0.10.350

func (fixSymbols *FixSymbols) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*FixSymbols) OnStats added in v0.10.350

func (fixSymbols *FixSymbols) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type FixSymbolsConfig added in v0.10.350

type FixSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Type                 string   `yaml:"type" json:"type"`
	Symbols              []string `yaml:"symbols" json:"symbols"`
}

FixSymbolsConfig - configuration for FixSymbols feature

type ForceOutcome added in v0.13.11

type ForceOutcome struct {
	Data []*FOData
}

func ParseForceOutcome added in v0.13.11

func ParseForceOutcome(str string) *ForceOutcome

func ProcCheat added in v0.13.11

func ProcCheat(plugin sgc7plugin.IPlugin, cheat string) (*ForceOutcome, error)

ProcCheat -

func (*ForceOutcome) IsValid added in v0.13.11

func (fo *ForceOutcome) IsValid(lst []*sgc7game.PlayResult) bool

type FuncNewComponent

type FuncNewComponent func(name string) IComponent

type FuncOnEachUsedResult

type FuncOnEachUsedResult func(*sgc7game.Result)

type Game

type Game struct {
	*sgc7game.BasicGame
	Pool         *GamePropertyPool
	MgrComponent *ComponentMgr
}

Game - game

func NewGame

func NewGame(cfgfn string) (*Game, error)

NewGame - new a Game

func NewGame2 added in v0.12.31

func NewGame2(fn string, funcNewPlugin sgc7plugin.FuncNewPlugin) (*Game, error)

func NewGame2ForRTP added in v0.12.228

func NewGame2ForRTP(bet int, fn string, funcNewPlugin sgc7plugin.FuncNewPlugin) (*Game, error)

func NewGame2WithData added in v0.12.57

func NewGame2WithData(data []byte, funcNewPlugin sgc7plugin.FuncNewPlugin) (*Game, error)

func NewGame3 added in v0.12.36

func NewGame3(fn string, funcNewPlugin sgc7plugin.FuncNewPlugin) (*Game, error)

func NewGame3ForRTP added in v0.12.228

func NewGame3ForRTP(bet int, fn string, funcNewPlugin sgc7plugin.FuncNewPlugin) (*Game, error)

func NewGameEx

func NewGameEx(cfgfn string, funcNewPlugin sgc7plugin.FuncNewPlugin) (*Game, error)

NewGame - new a Game

func NewGameExForRTP added in v0.12.228

func NewGameExForRTP(bet int, cfgfn string, funcNewPlugin sgc7plugin.FuncNewPlugin) (*Game, error)

NewGame - new a Game

func (*Game) BuildGameConfigData added in v0.12.61

func (game *Game) BuildGameConfigData() error

BuildGameConfigData - build game configration data

func (*Game) CheckStake

func (game *Game) CheckStake(stake *sgc7game.Stake) error

CheckStake - check stake

func (*Game) DeleteGameData added in v0.12.225

func (game *Game) DeleteGameData(gamed sgc7game.IGameData)

DeleteGameData - delete GameData

func (*Game) Init

func (game *Game) Init(cfgfn string) error

Init - initial game

func (*Game) Init2 added in v0.12.36

func (game *Game) Init2(cfg *Config) error

Init - initial game

func (*Game) Init2ForRTP added in v0.12.228

func (game *Game) Init2ForRTP(cfg *Config, bet int) error

Init - initial game

func (*Game) InitForRTP added in v0.12.228

func (game *Game) InitForRTP(bet int, cfgfn string) error

Init - initial game

func (*Game) NewGameData

func (game *Game) NewGameData(stake *sgc7game.Stake) sgc7game.IGameData

NewGameData - new GameData

func (*Game) NewPlayerState

func (game *Game) NewPlayerState() sgc7game.IPlayerState

NewPlayerState - new playerstate

func (*Game) OnAsciiGame

func (game *Game) OnAsciiGame(gameProp *GameProperty, stake *sgc7game.Stake, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult) error

OnAsciiGame - outpur to asciigame

func (*Game) ResetConfig

func (game *Game) ResetConfig(cfg any)

ResetConfig

type GameModConfig

type GameModConfig struct {
	Type       string             `yaml:"type"`
	Components []*ComponentConfig `yaml:"components"`
}

type GameParams

type GameParams struct {
	sgc7pb.GameParam `json:",inline"`
	LastScene        *sgc7game.GameScene      `json:"-"`
	LastOtherScene   *sgc7game.GameScene      `json:"-"`
	MapComponentMsgs map[string]proto.Message `json:"-"`
}

func NewGameParam added in v0.12.25

func NewGameParam() *GameParams

func (*GameParams) AddComponentData

func (gp *GameParams) AddComponentData(name string, cd IComponentData) error

func (*GameParams) SetGameProp added in v0.12.16

func (gp *GameParams) SetGameProp(gameProp *GameProperty) error

type GameProperty

type GameProperty struct {
	CurBetMul        int
	Pool             *GamePropertyPool
	MapVals          map[int]int
	MapStrVals       map[int]string
	CurPaytables     *sgc7game.PayTables
	CurLineData      *sgc7game.LineData
	CurReels         *sgc7game.ReelsData
	MapIntValWeights map[string]*sgc7game.ValWeights2
	MapStats         map[string]*sgc7stats.Feature

	MapComponentData  map[string]IComponentData
	HistoryComponents []IComponent
	RespinComponents  []string
	PoolScene         *sgc7game.GameScenePoolEx
	Components        *ComponentList
	SceneStack        *SceneStack
	// contains filtered or unexported fields
}

func (*GameProperty) AddComponent2History added in v0.12.2

func (gameProp *GameProperty) AddComponent2History(component IComponent, gp *GameParams)

func (*GameProperty) AddComponentSymbol added in v0.13.17

func (gameProp *GameProperty) AddComponentSymbol(componentName string, symbolCode int)

func (*GameProperty) AddVal

func (gameProp *GameProperty) AddVal(prop int, val int) error

func (*GameProperty) BuildGameParam added in v0.10.285

func (gameProp *GameProperty) BuildGameParam(gp *GameParams)

func (*GameProperty) CanTrigger added in v0.12.230

func (gameProp *GameProperty) CanTrigger(componentName string, gs *sgc7game.GameScene, curpr *sgc7game.PlayResult, stake *sgc7game.Stake) bool

CanTrigger -

func (*GameProperty) ChgComponentConfigIntVal added in v0.13.11

func (gameProp *GameProperty) ChgComponentConfigIntVal(componentConfigValName string, off int) error

func (*GameProperty) ClearComponentOtherScene added in v0.12.220

func (gameProp *GameProperty) ClearComponentOtherScene(component string)

func (*GameProperty) GetBet added in v0.12.28

func (gameProp *GameProperty) GetBet(stake *sgc7game.Stake, bettype string) int

func (*GameProperty) GetBet2 added in v0.12.147

func (gameProp *GameProperty) GetBet2(stake *sgc7game.Stake, bt BetType) int

func (*GameProperty) GetBetMul added in v0.12.225

func (gameProp *GameProperty) GetBetMul() int

func (*GameProperty) GetComponentOtherScene added in v0.12.205

func (gameProp *GameProperty) GetComponentOtherScene(component string) *sgc7game.GameScene

func (*GameProperty) GetComponentScene added in v0.12.205

func (gameProp *GameProperty) GetComponentScene(component string) *sgc7game.GameScene

func (*GameProperty) GetComponentSymbols added in v0.13.17

func (gameProp *GameProperty) GetComponentSymbols(componentName string) []int

func (*GameProperty) GetComponentVal added in v0.12.225

func (gameProp *GameProperty) GetComponentVal(componentVal string) (int, error)

func (*GameProperty) GetGlobalScene added in v0.12.155

func (gameProp *GameProperty) GetGlobalScene(tag string) *sgc7game.GameScene

func (*GameProperty) GetIntValWeights added in v0.10.251

func (gameProp *GameProperty) GetIntValWeights(fn string, useFileMapping bool) (*sgc7game.ValWeights2, error)

func (*GameProperty) GetLastRespinNum added in v0.12.200

func (gameProp *GameProperty) GetLastRespinNum(respinComponent string) int

func (*GameProperty) GetOtherScene

func (gameProp *GameProperty) GetOtherScene(pr *sgc7game.PlayResult, tag string) (*sgc7game.GameScene, int)

func (*GameProperty) GetScene

func (gameProp *GameProperty) GetScene(pr *sgc7game.PlayResult, tag string) (*sgc7game.GameScene, int)

func (*GameProperty) GetStrVal

func (gameProp *GameProperty) GetStrVal(prop int) string

func (*GameProperty) GetTagGlobalStr added in v0.10.361

func (gameProp *GameProperty) GetTagGlobalStr(tag string) string

func (*GameProperty) GetTagInt added in v0.10.251

func (gameProp *GameProperty) GetTagInt(tag string) int

func (*GameProperty) GetTagStr added in v0.10.267

func (gameProp *GameProperty) GetTagStr(tag string) string

func (*GameProperty) GetVal

func (gameProp *GameProperty) GetVal(prop int) int

func (*GameProperty) InHistoryComponents added in v0.12.233

func (gameProp *GameProperty) InHistoryComponents(componentName string) bool

func (*GameProperty) IsEndingRespin added in v0.12.234

func (gameProp *GameProperty) IsEndingRespin(componentName string) bool

func (*GameProperty) IsRespin added in v0.12.225

func (gameProp *GameProperty) IsRespin(componentName string) bool

func (*GameProperty) IsStartedRespin added in v0.12.234

func (gameProp *GameProperty) IsStartedRespin(componentName string) bool

func (*GameProperty) OnNewGame added in v0.10.285

func (gameProp *GameProperty) OnNewGame(stake *sgc7game.Stake) error

func (*GameProperty) OnNewStep

func (gameProp *GameProperty) OnNewStep() error

func (*GameProperty) ProcMulti added in v0.10.290

func (gameProp *GameProperty) ProcMulti(ret *sgc7game.Result)

func (*GameProperty) ProcRespin added in v0.10.277

func (gameProp *GameProperty) ProcRespin(pr *sgc7game.PlayResult, gp *GameParams)

func (*GameProperty) Respin

func (gameProp *GameProperty) Respin(pr *sgc7game.PlayResult, gp *GameParams, respinComponent string, gs *sgc7game.GameScene, os *sgc7game.GameScene)

func (*GameProperty) SaveRetriggerRespinNum added in v0.12.167

func (gameProp *GameProperty) SaveRetriggerRespinNum(respinComponent string) error

func (*GameProperty) SetComponentConfigIntVal added in v0.12.278

func (gameProp *GameProperty) SetComponentConfigIntVal(componentConfigValName string, val int) error

func (*GameProperty) SetComponentConfigVal added in v0.12.244

func (gameProp *GameProperty) SetComponentConfigVal(componentConfigValName string, val string) error

func (*GameProperty) SetComponentOtherScene added in v0.12.205

func (gameProp *GameProperty) SetComponentOtherScene(component string, gs *sgc7game.GameScene)

func (*GameProperty) SetComponentScene added in v0.12.205

func (gameProp *GameProperty) SetComponentScene(component string, gs *sgc7game.GameScene)

func (*GameProperty) SetStrVal

func (gameProp *GameProperty) SetStrVal(prop int, val string) error

func (*GameProperty) SetVal

func (gameProp *GameProperty) SetVal(prop int, val int) error

func (*GameProperty) TagGlobalScene added in v0.12.155

func (gameProp *GameProperty) TagGlobalScene(tag string, gs *sgc7game.GameScene)

func (*GameProperty) TagGlobalStr added in v0.10.361

func (gameProp *GameProperty) TagGlobalStr(tag string, val string)

func (*GameProperty) TagInt added in v0.10.251

func (gameProp *GameProperty) TagInt(tag string, val int)

func (*GameProperty) TagOtherScene

func (gameProp *GameProperty) TagOtherScene(pr *sgc7game.PlayResult, tag string, sceneIndex int)

func (*GameProperty) TagScene

func (gameProp *GameProperty) TagScene(pr *sgc7game.PlayResult, tag string, sceneIndex int)

func (*GameProperty) TagStr added in v0.10.267

func (gameProp *GameProperty) TagStr(tag string, val string)

func (*GameProperty) TriggerRespin added in v0.10.275

func (gameProp *GameProperty) TriggerRespin(plugin sgc7plugin.IPlugin, pr *sgc7game.PlayResult, gp *GameParams, respinNum int, respinComponent string, usePushTrigger bool) error

func (*GameProperty) TriggerRespinWithWeights added in v0.10.275

func (gameProp *GameProperty) TriggerRespinWithWeights(pr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin, fn string, useFileMapping bool, respinComponent string, usePushTrigger bool) (int, error)

type GamePropertyPool

type GamePropertyPool struct {
	MapGamePropPool  map[int]*sync.Pool
	Config           *Config
	DefaultPaytables *sgc7game.PayTables
	DefaultLineData  *sgc7game.LineData
	SymbolsViewer    *SymbolsViewer
	MapSymbolColor   *asciigame.SymbolColorMap
	Stats            *Stats
	// contains filtered or unexported fields
}

func (*GamePropertyPool) GetComponentList added in v0.12.228

func (pool *GamePropertyPool) GetComponentList(bet int) *ComponentList

func (*GamePropertyPool) GetMask added in v0.12.155

func (pool *GamePropertyPool) GetMask(name string, gameProp *GameProperty) ([]bool, error)

func (*GamePropertyPool) InitStats

func (pool *GamePropertyPool) InitStats(betMul int) error

func (*GamePropertyPool) LoadIntWeights added in v0.12.72

func (pool *GamePropertyPool) LoadIntWeights(fn string, useFileMapping bool) (*sgc7game.ValWeights2, error)

LoadIntWeights - load xlsx file

func (*GamePropertyPool) LoadStrWeights added in v0.12.72

func (pool *GamePropertyPool) LoadStrWeights(fn string, useFileMapping bool) (*sgc7game.ValWeights2, error)

LoadStrWeights - load xlsx file

func (*GamePropertyPool) LoadSymbolWeights added in v0.12.72

func (pool *GamePropertyPool) LoadSymbolWeights(fn string, headerVal string, headerWeight string, paytables *sgc7game.PayTables, useFileMapping bool) (*sgc7game.ValWeights2, error)

LoadSymbolWeights - load xlsx file

func (*GamePropertyPool) NewStatsWithConfig

func (pool *GamePropertyPool) NewStatsWithConfig(betMul int, parent *sgc7stats.Feature, cfg *StatsConfig) (*sgc7stats.Feature, error)

func (*GamePropertyPool) PushTrigger added in v0.12.193

func (pool *GamePropertyPool) PushTrigger(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, name string, num int) error

func (*GamePropertyPool) SetMask added in v0.12.155

func (pool *GamePropertyPool) SetMask(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, name string, mask []bool, isOnlyTrue bool) error

func (*GamePropertyPool) SetMaskVal added in v0.12.170

func (pool *GamePropertyPool) SetMaskVal(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, name string, index int, mask bool) error

type IComponent

type IComponent interface {
	// Init -
	Init(fn string, pool *GamePropertyPool) error
	// InitEx -
	InitEx(cfg any, pool *GamePropertyPool) error
	// OnNewGame - 这个一定要注意处理正确,为了节省cpu,没有主动处理componentData的该接口,如果确定需要,要自己调用
	OnNewGame(gameProp *GameProperty) error
	// OnNewStep -
	OnNewStep(gameProp *GameProperty) error
	// OnPlayGame - on playgame
	OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
		cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error
	// OnAsciiGame - outpur to asciigame
	OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error
	// OnStats -
	OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)
	// NewComponentData -
	NewComponentData() IComponentData
	// EachUsedResults -
	EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)
	// OnPlayGame - on playgame
	OnPlayGameEnd(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
		cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error
	// GetName -
	GetName() string

	// IsMask -
	IsMask() bool

	// IsRespin -
	IsRespin() bool

	// NewStats2 -
	NewStats2() *stats2.Feature
	// OnStats2
	OnStats2(icd IComponentData, s2 *stats2.Stats)

	// GetSymbols -
	GetSymbols(gameProp *GameProperty) []int
	// AddSymbol -
	AddSymbol(gameProp *GameProperty, symbolCode int)
}

func NewBasicReels

func NewBasicReels(name string) IComponent

func NewBasicWins

func NewBasicWins(name string) IComponent

func NewBookOf

func NewBookOf(name string) IComponent

func NewBookOf2 added in v0.12.145

func NewBookOf2(name string) IComponent

func NewChgSymbol added in v0.10.273

func NewChgSymbol(name string) IComponent

func NewClusterTrigger added in v0.13.8

func NewClusterTrigger(name string) IComponent

func NewCollector

func NewCollector(name string) IComponent

func NewComponentTrigger added in v0.12.233

func NewComponentTrigger(name string) IComponent

func NewComponentValTrigger added in v0.12.236

func NewComponentValTrigger(name string) IComponent

func NewDropDownSymbols added in v0.13.17

func NewDropDownSymbols(name string) IComponent

func NewFixSymbols added in v0.10.350

func NewFixSymbols(name string) IComponent

func NewLightning

func NewLightning(name string) IComponent

func NewLinesTrigger added in v0.12.264

func NewLinesTrigger(name string) IComponent

func NewMask added in v0.10.285

func NewMask(name string) IComponent

func NewMaskBranch added in v0.12.170

func NewMaskBranch(name string) IComponent

func NewMergeSymbol added in v0.12.155

func NewMergeSymbol(name string) IComponent

func NewMoveReel added in v0.12.155

func NewMoveReel(name string) IComponent

func NewMoveSymbol added in v0.12.148

func NewMoveSymbol(name string) IComponent

func NewMultiLevelMystery

func NewMultiLevelMystery(name string) IComponent

func NewMultiLevelReels

func NewMultiLevelReels(name string) IComponent

func NewMultiLevelReplaceReel added in v0.10.308

func NewMultiLevelReplaceReel(name string) IComponent

func NewMultiRespin added in v0.10.279

func NewMultiRespin(name string) IComponent

func NewMultiWeightAwards added in v0.12.170

func NewMultiWeightAwards(name string) IComponent

func NewMystery

func NewMystery(name string) IComponent

func NewOverlaySymbol

func NewOverlaySymbol(name string) IComponent

func NewQueueBranch added in v0.13.19

func NewQueueBranch(name string) IComponent

func NewReRollReel added in v0.12.156

func NewReRollReel(name string) IComponent

func NewReelModifier added in v0.12.250

func NewReelModifier(name string) IComponent

func NewReelSetMystery added in v0.10.267

func NewReelSetMystery(name string) IComponent

func NewRefillSymbols added in v0.13.17

func NewRefillSymbols(name string) IComponent

func NewRemoveSymbols added in v0.13.17

func NewRemoveSymbols(name string) IComponent

func NewReplaceReel added in v0.12.147

func NewReplaceReel(name string) IComponent

func NewReplaceSymbol added in v0.10.285

func NewReplaceSymbol(name string) IComponent

func NewReplaceSymbolGroup added in v0.13.17

func NewReplaceSymbolGroup(name string) IComponent

func NewRespin added in v0.10.273

func NewRespin(name string) IComponent

func NewRespin2 added in v0.12.225

func NewRespin2(name string) IComponent

func NewRollSymbol added in v0.13.17

func NewRollSymbol(name string) IComponent

func NewScatterTrigger added in v0.12.264

func NewScatterTrigger(name string) IComponent

func NewSymbolCollection added in v0.12.2

func NewSymbolCollection(name string) IComponent

func NewSymbolModifier added in v0.12.230

func NewSymbolModifier(name string) IComponent

func NewSymbolMulti

func NewSymbolMulti(name string) IComponent

func NewSymbolTrigger added in v0.12.147

func NewSymbolTrigger(name string) IComponent

func NewSymbolVal

func NewSymbolVal(name string) IComponent

func NewSymbolVal2

func NewSymbolVal2(name string) IComponent

func NewSymbolValWins

func NewSymbolValWins(name string) IComponent

func NewWaysTrigger added in v0.12.264

func NewWaysTrigger(name string) IComponent

func NewWeightAwards added in v0.12.264

func NewWeightAwards(name string) IComponent

func NewWeightBranch added in v0.13.17

func NewWeightBranch(name string) IComponent

func NewWeightChgSymbol added in v0.12.132

func NewWeightChgSymbol(name string) IComponent

func NewWeightReels added in v0.12.264

func NewWeightReels(name string) IComponent

func NewWeightTrigger added in v0.10.270

func NewWeightTrigger(name string) IComponent

func NewWeightTrigger2 added in v0.12.230

func NewWeightTrigger2(name string) IComponent

func NewWinResultMulti added in v0.13.8

func NewWinResultMulti(name string) IComponent

type IComponentConfig added in v0.12.278

type IComponentConfig interface {
	// SetLinkComponent
	SetLinkComponent(link string, componentName string)
}

type IComponentData

type IComponentData interface {
	// OnNewGame -
	OnNewGame()
	// OnNewStep -
	OnNewStep()
	// BuildPBComponentData
	BuildPBComponentData() proto.Message
	// GetVal -
	GetVal(key string) int
	// SetVal -
	SetVal(key string, val int)
	// GetConfigVal -
	GetConfigVal(key string) string
	// SetConfigVal -
	SetConfigVal(key string, val string)
	// GetConfigIntVal -
	GetConfigIntVal(key string) (int, bool)
	// SetConfigIntVal -
	SetConfigIntVal(key string, val int)
	// ChgConfigIntVal -
	ChgConfigIntVal(key string, off int)
	// GetResults -
	GetResults() []int
}

type IMask added in v0.12.170

type IMask interface {
	// SetMask -
	SetMask(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, mask []bool) error
	// SetMaskVal -
	SetMaskVal(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, index int, mask bool) error
	// SetMaskOnlyTrue -
	SetMaskOnlyTrue(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, mask []bool) error
	// GetMask -
	GetMask(gameProp *GameProperty) []bool
}

type IRespin added in v0.12.157

type IRespin interface {
	// AddRespinTimes -
	AddRespinTimes(gameProp *GameProperty, num int)
	// SaveRetriggerRespinNum -
	SaveRetriggerRespinNum(gameProp *GameProperty)
	// AddRetriggerRespinNum -
	AddRetriggerRespinNum(gameProp *GameProperty, num int)
	// // Retrigger -
	// Retrigger(gameProp *GameProperty)
	// Trigger -
	Trigger(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams)
	// PushTrigger -
	PushTrigger(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, num int)
	// AddTriggerAward -
	AddTriggerAward(gameProp *GameProperty, award *Award)

	// GetLastRespinNum -
	GetLastRespinNum(gameProp *GameProperty) int

	// IsEnding -
	IsEnding(gameProp *GameProperty) bool
	// IsStarted -
	IsStarted(gameProp *GameProperty) bool
}

type ISymbolTrigger added in v0.12.213

type ISymbolTrigger interface {
	// CanTrigger -
	CanTrigger(gameProp *GameProperty, gs *sgc7game.GameScene, curpr *sgc7game.PlayResult, stake *sgc7game.Stake, isSaveResult bool) (bool, []*sgc7game.Result)
}

type Lightning

type Lightning struct {
	*BasicComponent          `json:"-"`
	Config                   *LightningConfig                       `json:"config"`
	SymbolCode               int                                    `json:"-"`
	Weight                   *sgc7game.ValWeights2                  `json:"-"`
	MapSymbols               map[int]*LightningSymbolData           `json:"-"`
	MapSymbolTriggerFeatures map[int]*LightningTriggerFeatureConfig `json:"-"`
	ValSymbolCode            int                                    `json:"-"`
	MulSymbolCode            int                                    `json:"-"`
	CollectorSymbolCode      int                                    `json:"-"`
}

func (*Lightning) EachUsedResults

func (lightning *Lightning) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*Lightning) Init

func (lightning *Lightning) Init(fn string, pool *GamePropertyPool) error

Init -

func (*Lightning) InitEx added in v0.12.33

func (lightning *Lightning) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*Lightning) NewComponentData

func (lightning *Lightning) NewComponentData() IComponentData

NewComponentData -

func (*Lightning) OnAsciiGame

func (lightning *Lightning) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*Lightning) OnPlayGame

func (lightning *Lightning) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*Lightning) OnStats

func (lightning *Lightning) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*Lightning) OnStatsWithPB

func (lightning *Lightning) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type LightningConfig

type LightningConfig struct {
	BasicComponentConfig  `yaml:",inline" json:",inline"`
	Symbol                string                           `yaml:"symbol" json:"symbol"`
	Weight                string                           `yaml:"weight" json:"weight"`
	SymbolVals            []*LightningSymbolValConfig      `yaml:"symbolVals" json:"symbolVals"`
	SymbolTriggerFeatures []*LightningTriggerFeatureConfig `yaml:"symbolTriggerFeatures" json:"symbolTriggerFeatures"`
	EndingFirstComponent  string                           `yaml:"endingFirstComponent" json:"endingFirstComponent"`
}

LightningConfig - configuration for Lightning

type LightningData

type LightningData struct {
	BasicComponentData
	Collector    int
	Val          int
	Mul          int
	NewConnector int
}

func (*LightningData) BuildPBComponentData

func (lightningData *LightningData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*LightningData) OnNewGame

func (lightningData *LightningData) OnNewGame()

OnNewGame -

func (*LightningData) OnNewStep

func (lightningData *LightningData) OnNewStep()

OnNewGame -

type LightningSymbolData

type LightningSymbolData struct {
	SymbolCode int
	Weight     *sgc7game.ValWeights2
	Config     *LightningSymbolValConfig
}

LightningSymbolData - symbol data for Lightning

type LightningSymbolValConfig

type LightningSymbolValConfig struct {
	Symbol string `yaml:"symbol" json:"symbol"`
	Weight string `yaml:"weight" json:"weight"`
	Type   string `yaml:"type" json:"type"` // like val or mul
}

LightningSymbolValConfig - configuration for symbol value

type LightningTriggerFeatureConfig

type LightningTriggerFeatureConfig struct {
	Symbol  string `yaml:"symbol" json:"symbol"`   // like NEW_COLLECTOR
	Feature string `yaml:"feature" json:"feature"` // like collector
}

LightningTriggerFeatureConfig - configuration for lightning trigger feature

type LinesTrigger added in v0.12.264

type LinesTrigger struct {
	*BasicComponent `json:"-"`
	Config          *LinesTriggerConfig `json:"config"`
}

func (*LinesTrigger) CanTrigger added in v0.12.264

func (linesTrigger *LinesTrigger) CanTrigger(gameProp *GameProperty, gs *sgc7game.GameScene, curpr *sgc7game.PlayResult, stake *sgc7game.Stake, isSaveResult bool) (bool, []*sgc7game.Result)

CanTrigger -

func (*LinesTrigger) GetWinMulti added in v0.12.278

func (linesTrigger *LinesTrigger) GetWinMulti(basicCD *BasicComponentData) int

func (*LinesTrigger) Init added in v0.12.264

func (linesTrigger *LinesTrigger) Init(fn string, pool *GamePropertyPool) error

Init -

func (*LinesTrigger) InitEx added in v0.12.264

func (linesTrigger *LinesTrigger) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*LinesTrigger) NewComponentData added in v0.12.264

func (linesTrigger *LinesTrigger) NewComponentData() IComponentData

NewComponentData -

func (*LinesTrigger) OnAsciiGame added in v0.12.264

func (linesTrigger *LinesTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*LinesTrigger) OnPlayGame added in v0.12.264

func (linesTrigger *LinesTrigger) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*LinesTrigger) OnStats added in v0.12.264

func (linesTrigger *LinesTrigger) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*LinesTrigger) OnStatsWithPB added in v0.12.264

func (linesTrigger *LinesTrigger) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type LinesTriggerConfig added in v0.12.264

type LinesTriggerConfig struct {
	BasicComponentConfig            `yaml:",inline" json:",inline"`
	Symbols                         []string                      `yaml:"symbols" json:"symbols"`                                             // like scatter
	SymbolCodes                     []int                         `yaml:"-" json:"-"`                                                         // like scatter
	ExcludeSymbolCodes              []int                         `yaml:"-" json:"-"`                                                         // 在 lines 和 ways 里有用
	Type                            string                        `yaml:"type" json:"type"`                                                   // like scatters
	TriggerType                     SymbolTriggerType             `yaml:"-" json:"-"`                                                         // SymbolTriggerType
	BetTypeString                   string                        `yaml:"betType" json:"betType"`                                             // bet or totalBet or noPay
	BetType                         BetType                       `yaml:"-" json:"-"`                                                         // bet or totalBet or noPay
	MinNum                          int                           `yaml:"minNum" json:"minNum"`                                               // like 3,countscatter 或 countscatterInArea 或 checkLines 或 checkWays 时生效
	WildSymbols                     []string                      `yaml:"wildSymbols" json:"wildSymbols"`                                     // wild etc
	WildSymbolCodes                 []int                         `yaml:"-" json:"-"`                                                         // wild symbolCode
	StrCheckWinType                 string                        `yaml:"checkWinType" json:"checkWinType"`                                   // left2right or right2left or all
	CheckWinType                    CheckWinType                  `yaml:"-" json:"-"`                                                         //
	WinMulti                        int                           `yaml:"winMulti" json:"winMulti"`                                           // winMulti,最后的中奖倍数,默认为1
	JumpToComponent                 string                        `yaml:"jumpToComponent" json:"jumpToComponent"`                             // jump to
	ForceToNext                     bool                          `yaml:"forceToNext" json:"forceToNext"`                                     // 如果触发,默认跳转jump to,这里可以强制走next分支
	Awards                          []*Award                      `yaml:"awards" json:"awards"`                                               // 新的奖励系统
	SymbolAwardsWeights             *AwardsWeights                `yaml:"symbolAwardsWeights" json:"symbolAwardsWeights"`                     // 每个中奖符号随机一组奖励
	TargetMask                      string                        `yaml:"targetMask" json:"targetMask"`                                       // 如果是scatter这一组判断,可以把结果传递给一个mask
	IsReverse                       bool                          `yaml:"isReverse" json:"isReverse"`                                         // 如果isReverse,表示判定为否才触发
	NeedDiscardResults              bool                          `yaml:"needDiscardResults" json:"needDiscardResults"`                       // 如果needDiscardResults,表示抛弃results
	IsAddRespinMode                 bool                          `yaml:"isAddRespinMode" json:"isAddRespinMode"`                             // 是否是增加respinNum模式,默认是增加triggerNum模式
	RespinNum                       int                           `yaml:"respinNum" json:"respinNum"`                                         // respin number
	RespinNumWeight                 string                        `yaml:"respinNumWeight" json:"respinNumWeight"`                             // respin number weight
	RespinNumWeightVW               *sgc7game.ValWeights2         `yaml:"-" json:"-"`                                                         // respin number weight
	RespinNumWithScatterNum         map[int]int                   `yaml:"respinNumWithScatterNum" json:"respinNumWithScatterNum"`             // respin number with scatter number
	RespinNumWeightWithScatterNum   map[int]string                `yaml:"respinNumWeightWithScatterNum" json:"respinNumWeightWithScatterNum"` // respin number weight with scatter number
	RespinNumWeightWithScatterNumVW map[int]*sgc7game.ValWeights2 `yaml:"-" json:"-"`                                                         // respin number weight with scatter number
}

LinesTriggerConfig - configuration for LinesTrigger 需要特别注意,当判断scatter时,symbols里的符号会当作同一个符号来处理

func (*LinesTriggerConfig) SetLinkComponent added in v0.12.278

func (cfg *LinesTriggerConfig) SetLinkComponent(link string, componentName string)

SetLinkComponent

type LinesTriggerData added in v0.12.264

type LinesTriggerData struct {
	BasicComponentData
	NextComponent string
	SymbolNum     int
	WildNum       int
	RespinNum     int
	Wins          int
	WinMulti      int
}

func (*LinesTriggerData) BuildPBComponentData added in v0.12.264

func (linesTriggerData *LinesTriggerData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*LinesTriggerData) GetVal added in v0.12.264

func (linesTriggerData *LinesTriggerData) GetVal(key string) int

GetVal -

func (*LinesTriggerData) OnNewGame added in v0.12.264

func (linesTriggerData *LinesTriggerData) OnNewGame()

OnNewGame -

func (*LinesTriggerData) OnNewStep added in v0.12.264

func (linesTriggerData *LinesTriggerData) OnNewStep()

OnNewStep -

func (*LinesTriggerData) SetVal added in v0.12.264

func (linesTriggerData *LinesTriggerData) SetVal(key string, val int)

SetVal -

type Mask added in v0.10.285

type Mask struct {
	*BasicComponent `json:"-"`
	Config          *MaskConfig `json:"config"`
	MaskType        int         `json:"-"`
	SymbolCode      int         `json:"-"`
}

func (*Mask) ChgMask added in v0.10.285

func (mask *Mask) ChgMask(plugin sgc7plugin.IPlugin, gameProp *GameProperty, md *MaskData, curpr *sgc7game.PlayResult, gp *GameParams, curMask int, val bool, noProcSPLevel bool)

onMaskChg -

func (*Mask) EachUsedResults added in v0.10.285

func (mask *Mask) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*Mask) GetMask added in v0.12.160

func (mask *Mask) GetMask(gameProp *GameProperty) []bool

GetMask -

func (*Mask) Init added in v0.10.285

func (mask *Mask) Init(fn string, pool *GamePropertyPool) error

Init -

func (*Mask) InitEx added in v0.12.33

func (mask *Mask) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*Mask) IsMask added in v0.12.170

func (mask *Mask) IsMask() bool

IsMask -

func (*Mask) NewComponentData added in v0.10.285

func (mask *Mask) NewComponentData() IComponentData

NewComponentData -

func (*Mask) OnAsciiGame added in v0.10.285

func (mask *Mask) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*Mask) OnPlayGame added in v0.10.285

func (mask *Mask) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*Mask) OnPlayGameEnd added in v0.10.285

func (mask *Mask) OnPlayGameEnd(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

OnPlayGame - on playgame

func (*Mask) OnStats added in v0.10.285

func (mask *Mask) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*Mask) OnStatsWithPB added in v0.10.285

func (mask *Mask) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

func (*Mask) ProcMask added in v0.10.297

func (mask *Mask) ProcMask(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, targetScene string)

onMaskChg -

func (*Mask) SetMask added in v0.12.155

func (mask *Mask) SetMask(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, arrMask []bool) error

SetMask -

func (*Mask) SetMaskOnlyTrue added in v0.12.267

func (mask *Mask) SetMaskOnlyTrue(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, arrMask []bool) error

SetMaskOnlyTrue -

func (*Mask) SetMaskVal added in v0.12.170

func (mask *Mask) SetMaskVal(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, index int, val bool) error

SetMaskVal -

type MaskBranch added in v0.12.170

type MaskBranch struct {
	*BasicComponent `json:"-"`
	Config          *MaskBranchConfig `json:"config"`
}

func (*MaskBranch) Init added in v0.12.170

func (maskBranch *MaskBranch) Init(fn string, pool *GamePropertyPool) error

Init -

func (*MaskBranch) InitEx added in v0.12.170

func (maskBranch *MaskBranch) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*MaskBranch) OnAsciiGame added in v0.12.170

func (maskBranch *MaskBranch) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*MaskBranch) OnPlayGame added in v0.12.170

func (maskBranch *MaskBranch) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*MaskBranch) OnStats added in v0.12.170

func (maskBranch *MaskBranch) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type MaskBranchConfig added in v0.12.170

type MaskBranchConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Mask                 string            `yaml:"mask" json:"mask"`   // mask
	Nodes                []*MaskBranchNode `yaml:"nodes" json:"nodes"` // 可以不用配置全,如果没有配置的,就跳转默认的next
}

MaskBranchConfig - configuration for MaskBranch

type MaskBranchNode added in v0.12.170

type MaskBranchNode struct {
	MaskVal         []bool   `yaml:"mask" json:"mask"`
	Awards          []*Award `yaml:"awards" json:"awards"` // 新的奖励系统
	JumpToComponent string   `yaml:"jumpToComponent" json:"jumpToComponent"`
}

MaskBranchNode -

type MaskConfig added in v0.10.285

type MaskConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	MaskType             string           `yaml:"maskType" json:"maskType"`
	Symbol               string           `yaml:"symbol" json:"symbol"`
	Num                  int              `yaml:"num" json:"num"`
	PerMaskAwards        []*Award         `yaml:"perMaskAwards" json:"perMaskAwards"`
	MapSPMaskAwards      map[int][]*Award `yaml:"mapSPMaskAwards" json:"mapSPMaskAwards"` // -1表示全满的奖励
	EndingSPAward        string           `yaml:"endingSPAward" json:"endingSPAward"`
}

MaskConfig - configuration for Mask

type MaskData added in v0.10.285

type MaskData struct {
	BasicComponentData
	Num      int
	Vals     []bool
	NewChged int
	NewVals  []bool
}

func (*MaskData) BuildPBComponentData added in v0.10.285

func (maskData *MaskData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*MaskData) IsFull added in v0.10.285

func (maskData *MaskData) IsFull() bool

IsFull -

func (*MaskData) OnNewGame added in v0.10.285

func (maskData *MaskData) OnNewGame()

OnNewGame -

func (*MaskData) OnNewStep added in v0.10.285

func (maskData *MaskData) OnNewStep()

OnNewStep -

type MergeSymbol added in v0.12.155

type MergeSymbol struct {
	*BasicComponent `json:"-"`
	Config          *MergeSymbolConfig `json:"config"`
}

func (*MergeSymbol) Init added in v0.12.155

func (mergeSymbol *MergeSymbol) Init(fn string, pool *GamePropertyPool) error

Init -

func (*MergeSymbol) InitEx added in v0.12.155

func (mergeSymbol *MergeSymbol) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*MergeSymbol) OnAsciiGame added in v0.12.155

func (mergeSymbol *MergeSymbol) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*MergeSymbol) OnPlayGame added in v0.12.155

func (mergeSymbol *MergeSymbol) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*MergeSymbol) OnStats added in v0.12.155

func (mergeSymbol *MergeSymbol) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type MergeSymbolConfig added in v0.12.155

type MergeSymbolConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	SrcScene             []string `yaml:"srcScene" json:"srcScene"`                     // 2个scene,mask false表示用0,true表示用1
	TargetMask           string   `yaml:"targetMask" json:"targetMask"`                 // mask
	EmptyOtherSceneVal   int      `yaml:"emptyOtherSceneVal" json:"emptyOtherSceneVal"` // 如果要合并otherscene时,某一个otherscene不存在时,就用这个作默认值
}

MergeSymbolConfig - configuration for MergeSymbol

type MoveData added in v0.12.148

type MoveData struct {
	Src              *SelectPosData `yaml:"src" json:"src"`
	Target           *SelectPosData `yaml:"target" json:"target"`
	MoveType         string         `yaml:"moveType" json:"moveType"`
	TargetSymbol     string         `yaml:"targetSymbol" json:"targetSymbol"`
	TargetSymbolCode int            `yaml:"-" json:"-"`
	OverrideSrc      bool           `yaml:"overrideSrc" json:"overrideSrc"`
	OverrideTarget   bool           `yaml:"overrideTarget" json:"overrideTarget"`
	OverridePath     bool           `yaml:"overridePath" json:"overridePath"`
}

func (*MoveData) Move added in v0.12.148

func (md *MoveData) Move(gs *sgc7game.GameScene, sx, sy, tx, ty int, symbolCode int)

type MoveReel added in v0.12.155

type MoveReel struct {
	*BasicComponent `json:"-"`
	Config          *MoveReelConfig `json:"config"`
}

func (*MoveReel) Init added in v0.12.155

func (moveReel *MoveReel) Init(fn string, pool *GamePropertyPool) error

Init -

func (*MoveReel) InitEx added in v0.12.155

func (moveReel *MoveReel) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*MoveReel) OnAsciiGame added in v0.12.155

func (moveReel *MoveReel) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*MoveReel) OnPlayGame added in v0.12.155

func (moveReel *MoveReel) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*MoveReel) OnStats added in v0.12.155

func (moveReel *MoveReel) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type MoveReelConfig added in v0.12.155

type MoveReelConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	MoveReelIndex        []int `yaml:"moveReelIndex" json:"moveReelIndex"`           // 每个轴的移动幅度,-1是上移
	EmptyOtherSceneVal   int   `yaml:"emptyOtherSceneVal" json:"emptyOtherSceneVal"` // 如果要移动otherscene时,这个是移出去以后的默认值
}

MoveReelConfig - configuration for MoveReel

type MoveSymbol added in v0.12.148

type MoveSymbol struct {
	*BasicComponent `json:"-"`
	Config          *MoveSymbolConfig `json:"config"`
}

func (*MoveSymbol) Init added in v0.12.148

func (moveSymbol *MoveSymbol) Init(fn string, pool *GamePropertyPool) error

Init -

func (*MoveSymbol) InitEx added in v0.12.148

func (moveSymbol *MoveSymbol) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*MoveSymbol) NewStats2 added in v0.13.8

func (moveSymbol *MoveSymbol) NewStats2() *stats2.Feature

NewStats2 -

func (*MoveSymbol) OnAsciiGame added in v0.12.148

func (moveSymbol *MoveSymbol) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*MoveSymbol) OnPlayGame added in v0.12.148

func (moveSymbol *MoveSymbol) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*MoveSymbol) OnStats added in v0.12.148

func (moveSymbol *MoveSymbol) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*MoveSymbol) OnStats2 added in v0.13.8

func (moveSymbol *MoveSymbol) OnStats2(icd IComponentData, s2 *stats2.Stats)

OnStats2

type MoveSymbolConfig added in v0.12.148

type MoveSymbolConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	MoveData             []*MoveData `yaml:"moveData" json:"moveData"`
}

MoveSymbolConfig - configuration for MoveSymbol

func (*MoveSymbolConfig) SetLinkComponent added in v0.12.278

func (cfg *MoveSymbolConfig) SetLinkComponent(link string, componentName string)

SetLinkComponent

type MultiLevelMystery

type MultiLevelMystery struct {
	*BasicComponent          `json:"-"`
	Config                   *MultiLevelMysteryConfig             `json:"config"`
	MapMysteryTriggerFeature map[int]*MysteryTriggerFeatureConfig `json:"-"`
	LevelMysteryWeights      []*sgc7game.ValWeights2              `json:"-"`
	MysterySymbols           []int                                `json:"-"`
}

func (*MultiLevelMystery) EachUsedResults

func (multiLevelMystery *MultiLevelMystery) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*MultiLevelMystery) Init

func (multiLevelMystery *MultiLevelMystery) Init(fn string, pool *GamePropertyPool) error

Init -

func (*MultiLevelMystery) InitEx added in v0.12.33

func (multiLevelMystery *MultiLevelMystery) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*MultiLevelMystery) NewComponentData

func (multiLevelMystery *MultiLevelMystery) NewComponentData() IComponentData

NewComponentData -

func (*MultiLevelMystery) OnAsciiGame

func (multiLevelMystery *MultiLevelMystery) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*MultiLevelMystery) OnNewStep

func (multiLevelMystery *MultiLevelMystery) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*MultiLevelMystery) OnPlayGame

func (multiLevelMystery *MultiLevelMystery) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*MultiLevelMystery) OnStats

func (multiLevelMystery *MultiLevelMystery) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*MultiLevelMystery) OnStatsWithPB

func (multiLevelMystery *MultiLevelMystery) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type MultiLevelMysteryConfig

type MultiLevelMysteryConfig struct {
	BasicComponentConfig   `yaml:",inline" json:",inline"`
	Mystery                string                          `yaml:"mystery" json:"-"`
	Mysterys               []string                        `yaml:"mysterys" json:"mysterys"`
	Levels                 []*MultiLevelMysteryLevelConfig `yaml:"levels" json:"levels"`
	MysteryTriggerFeatures []*MysteryTriggerFeatureConfig  `yaml:"mysteryTriggerFeatures" json:"mysteryTriggerFeatures"`
}

MultiLevelMysteryConfig - configuration for MultiLevelMystery

type MultiLevelMysteryData

type MultiLevelMysteryData struct {
	BasicComponentData
	CurLevel       int
	CurMysteryCode int
}

func (*MultiLevelMysteryData) BuildPBComponentData

func (multiLevelMysteryData *MultiLevelMysteryData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*MultiLevelMysteryData) OnNewGame

func (multiLevelMysteryData *MultiLevelMysteryData) OnNewGame()

OnNewGame -

func (*MultiLevelMysteryData) OnNewStep

func (multiLevelMysteryData *MultiLevelMysteryData) OnNewStep()

OnNewStep -

type MultiLevelMysteryLevelConfig

type MultiLevelMysteryLevelConfig struct {
	MysteryWeight string `yaml:"mysteryWeight" json:"mysteryWeight"`
	Collector     string `yaml:"collector" json:"collector"`
	CollectorVal  int    `yaml:"collectorVal" json:"collectorVal"`
}

MultiLevelMysteryLevelConfig - configuration for MultiLevelMystery's Level

type MultiLevelReels

type MultiLevelReels struct {
	*BasicComponent     `json:"-"`
	Config              *MultiLevelReelsConfig  `json:"config"`
	LevelReelSetWeights []*sgc7game.ValWeights2 `json:"-"`
}

func (*MultiLevelReels) EachUsedResults

func (multiLevelReels *MultiLevelReels) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*MultiLevelReels) Init

func (multiLevelReels *MultiLevelReels) Init(fn string, pool *GamePropertyPool) error

Init -

func (*MultiLevelReels) InitEx added in v0.12.33

func (multiLevelReels *MultiLevelReels) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*MultiLevelReels) NewComponentData

func (multiLevelReels *MultiLevelReels) NewComponentData() IComponentData

NewComponentData -

func (*MultiLevelReels) OnAsciiGame

func (multiLevelReels *MultiLevelReels) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*MultiLevelReels) OnNewStep

func (multiLevelReels *MultiLevelReels) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*MultiLevelReels) OnPlayGame

func (multiLevelReels *MultiLevelReels) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*MultiLevelReels) OnStats

func (multiLevelReels *MultiLevelReels) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*MultiLevelReels) OnStatsWithPB

func (multiLevelReels *MultiLevelReels) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type MultiLevelReelsConfig

type MultiLevelReelsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Levels               []*MultiLevelReelsLevelConfig `yaml:"levels" json:"levels"`
}

MultiLevelReelsConfig - configuration for MultiLevelReels

type MultiLevelReelsData

type MultiLevelReelsData struct {
	BasicComponentData
	CurLevel int
}

func (*MultiLevelReelsData) BuildPBComponentData

func (multiLevelReelsData *MultiLevelReelsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*MultiLevelReelsData) OnNewGame

func (multiLevelReelsData *MultiLevelReelsData) OnNewGame()

OnNewGame -

func (*MultiLevelReelsData) OnNewStep

func (multiLevelReelsData *MultiLevelReelsData) OnNewStep()

OnNewStep -

type MultiLevelReelsLevelConfig

type MultiLevelReelsLevelConfig struct {
	Reel           string `yaml:"reel" json:"reel"`
	ReelSetsWeight string `yaml:"reelSetWeight" json:"reelSetWeight"`
	Collector      string `yaml:"collector" json:"collector"`
	CollectorVal   int    `yaml:"collectorVal" json:"collectorVal"`
}

MultiLevelReelsLevelConfig - configuration for MultiLevelReels's Level

type MultiLevelReplaceReel added in v0.10.308

type MultiLevelReplaceReel struct {
	*BasicComponent `json:"-"`
	Config          *MultiLevelReplaceReelDataConfig `json:"config"`
}

func (*MultiLevelReplaceReel) EachUsedResults added in v0.10.308

func (multiLevelReplaceReel *MultiLevelReplaceReel) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*MultiLevelReplaceReel) Init added in v0.10.308

func (multiLevelReplaceReel *MultiLevelReplaceReel) Init(fn string, pool *GamePropertyPool) error

Init -

func (*MultiLevelReplaceReel) InitEx added in v0.12.33

func (multiLevelReplaceReel *MultiLevelReplaceReel) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*MultiLevelReplaceReel) NewComponentData added in v0.10.308

func (multiLevelReplaceReel *MultiLevelReplaceReel) NewComponentData() IComponentData

NewComponentData -

func (*MultiLevelReplaceReel) OnAsciiGame added in v0.10.308

func (multiLevelReplaceReel *MultiLevelReplaceReel) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*MultiLevelReplaceReel) OnNewStep added in v0.10.308

func (multiLevelReplaceReel *MultiLevelReplaceReel) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*MultiLevelReplaceReel) OnPlayGame added in v0.10.308

func (multiLevelReplaceReel *MultiLevelReplaceReel) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*MultiLevelReplaceReel) OnStats added in v0.10.308

func (multiLevelReplaceReel *MultiLevelReplaceReel) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*MultiLevelReplaceReel) OnStatsWithPB added in v0.10.308

func (multiLevelReplaceReel *MultiLevelReplaceReel) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type MultiLevelReplaceReelData added in v0.10.308

type MultiLevelReplaceReelData struct {
	BasicComponentData
	CurLevel int
}

func (*MultiLevelReplaceReelData) BuildPBComponentData added in v0.10.308

func (multiLevelReplaceReelData *MultiLevelReplaceReelData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*MultiLevelReplaceReelData) OnNewGame added in v0.10.308

func (multiLevelReplaceReelData *MultiLevelReplaceReelData) OnNewGame()

OnNewGame -

func (*MultiLevelReplaceReelData) OnNewStep added in v0.10.308

func (multiLevelReplaceReelData *MultiLevelReplaceReelData) OnNewStep()

OnNewStep -

type MultiLevelReplaceReelDataConfig added in v0.10.308

type MultiLevelReplaceReelDataConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Levels               []*MultiLevelReplaceReelLevelConfig `yaml:"levels" json:"levels"`
}

MultiLevelReplaceReelDataConfig - configuration for MultiLevelReplaceReelData

type MultiLevelReplaceReelLevelConfig added in v0.10.308

type MultiLevelReplaceReelLevelConfig struct {
	Reels           map[int][]string `yaml:"reels" json:"reels"` // x - [0, width)
	SymbolCodeReels map[int][]int    `yaml:"-" json:"-"`
	Collector       string           `yaml:"collector" json:"collector"`
	CollectorVal    int              `yaml:"collectorVal" json:"collectorVal"`
}

MultiLevelReplaceReelLevelConfig - configuration for MultiLevelReplaceReelData's Level

type MultiRespin added in v0.10.279

type MultiRespin struct {
	*BasicComponent `json:"-"`
	Config          *MultiRespinConfig `json:"config"`
}

func (*MultiRespin) Init added in v0.10.279

func (multiRespin *MultiRespin) Init(fn string, pool *GamePropertyPool) error

Init -

func (*MultiRespin) InitEx added in v0.12.33

func (multiRespin *MultiRespin) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*MultiRespin) OnAsciiGame added in v0.10.279

func (multiRespin *MultiRespin) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*MultiRespin) OnPlayGame added in v0.10.279

func (multiRespin *MultiRespin) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*MultiRespin) OnStats added in v0.10.279

func (multiRespin *MultiRespin) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type MultiRespinConfig added in v0.10.279

type MultiRespinConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	RespinData           []*RespinDataConfig `yaml:"respinData" json:"respinData"`                   // wait player select
	TargetSymbolNum      string              `yaml:"targetSymbolNum" json:"targetSymbolNum"`         // 这里可以用到一个前面记下的tagSymbolNum值
	IsUseTriggerRespin2  bool                `yaml:"isUseTriggerRespin2" json:"isUseTriggerRespin2"` // 给true就用triggerRespin2
}

BasicWinsConfig - configuration for BasicWins

type MultiWeightAwards added in v0.12.170

type MultiWeightAwards struct {
	*BasicComponent `json:"-"`
	Config          *MultiWeightAwardsConfig `json:"config"`
}

func (*MultiWeightAwards) Init added in v0.12.170

func (multiWeightAwards *MultiWeightAwards) Init(fn string, pool *GamePropertyPool) error

Init -

func (*MultiWeightAwards) InitEx added in v0.12.170

func (multiWeightAwards *MultiWeightAwards) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*MultiWeightAwards) NewComponentData added in v0.12.170

func (multiWeightAwards *MultiWeightAwards) NewComponentData() IComponentData

NewComponentData -

func (*MultiWeightAwards) OnAsciiGame added in v0.12.170

func (multiWeightAwards *MultiWeightAwards) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*MultiWeightAwards) OnPlayGame added in v0.12.170

func (multiWeightAwards *MultiWeightAwards) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*MultiWeightAwards) OnStats added in v0.12.170

func (multiWeightAwards *MultiWeightAwards) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type MultiWeightAwardsConfig added in v0.12.170

type MultiWeightAwardsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Nodes                []*MultiWeightAwardsNode `yaml:"nodes" json:"nodes"`
	InitMask             string                   `yaml:"initMask" json:"initMask"`                   // 用这个来初始化,true表示需要开奖
	ReverseInitMask      bool                     `yaml:"reverseInitMask" json:"reverseInitMask"`     // reverse the target mask
	TargetMask           string                   `yaml:"targetMask" json:"targetMask"`               // 用这个来初始化,true表示需要开奖
	ReverseTargetMask    bool                     `yaml:"reverseTargetMask" json:"reverseTargetMask"` // reverse the target mask
}

MultiWeightAwardsConfig - configuration for MultiWeightAwards feature

type MultiWeightAwardsData added in v0.12.170

type MultiWeightAwardsData struct {
	BasicComponentData
	HasGot []bool
}

func (*MultiWeightAwardsData) BuildPBComponentData added in v0.12.170

func (multiWeightAwardsData *MultiWeightAwardsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*MultiWeightAwardsData) OnNewGame added in v0.12.170

func (multiWeightAwardsData *MultiWeightAwardsData) OnNewGame()

OnNewGame -

func (*MultiWeightAwardsData) OnNewStep added in v0.12.170

func (multiWeightAwardsData *MultiWeightAwardsData) OnNewStep()

OnNewStep -

type MultiWeightAwardsNode added in v0.12.170

type MultiWeightAwardsNode struct {
	Awards []*Award              `yaml:"awards" json:"awards"` // 新的奖励系统
	Weight string                `yaml:"weight" json:"weight"` //
	VW     *sgc7game.ValWeights2 `yaml:"-" json:"-"`           //
}

type Mystery

type Mystery struct {
	*BasicComponent          `json:"-"`
	Config                   *MysteryConfig                       `json:"config"`
	MysteryWeights           *sgc7game.ValWeights2                `json:"-"`
	MysterySymbols           []int                                `json:"-"`
	MapMysteryTriggerFeature map[int]*MysteryTriggerFeatureConfig `json:"-"`
}

func (*Mystery) EachUsedResults

func (mystery *Mystery) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*Mystery) Init

func (mystery *Mystery) Init(fn string, pool *GamePropertyPool) error

Init -

func (*Mystery) InitEx added in v0.12.33

func (mystery *Mystery) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*Mystery) NewComponentData

func (mystery *Mystery) NewComponentData() IComponentData

NewComponentData -

func (*Mystery) OnAsciiGame

func (mystery *Mystery) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*Mystery) OnPlayGame

func (mystery *Mystery) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*Mystery) OnStats

func (mystery *Mystery) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*Mystery) OnStatsWithPB

func (mystery *Mystery) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type MysteryConfig

type MysteryConfig struct {
	BasicComponentConfig   `yaml:",inline" json:",inline"`
	MysteryRNG             string                         `yaml:"mysteryRNG" json:"mysteryRNG"` // 强制用已经使用的随机数结果做 Mystery
	MysteryWeight          string                         `yaml:"mysteryWeight" json:"mysteryWeight"`
	Mystery                string                         `yaml:"mystery" json:"-"`
	Mysterys               []string                       `yaml:"mysterys" json:"mysterys"`
	MysteryTriggerFeatures []*MysteryTriggerFeatureConfig `yaml:"mysteryTriggerFeatures" json:"mysteryTriggerFeatures"`
}

MysteryConfig - configuration for Mystery

type MysteryData

type MysteryData struct {
	BasicComponentData
	CurMysteryCode int
}

func (*MysteryData) BuildPBComponentData

func (mysteryData *MysteryData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*MysteryData) OnNewGame

func (mysteryData *MysteryData) OnNewGame()

OnNewGame -

func (*MysteryData) OnNewStep

func (mysteryData *MysteryData) OnNewStep()

OnNewStep -

type MysteryTriggerFeatureConfig

type MysteryTriggerFeatureConfig struct {
	Symbol               string `yaml:"symbol" json:"symbol"`                             // like LIGHTNING
	RespinFirstComponent string `yaml:"respinFirstComponent" json:"respinFirstComponent"` // like lightning
}

MysteryTriggerFeatureConfig - configuration for mystery trigger feature

type OperateType added in v0.12.236

type OperateType int
const (
	OTEqual        OperateType = 0 // ==
	OTGreaterEqual OperateType = 1 // >=
	OTLessEqual    OperateType = 2 // <=
	OTGreater      OperateType = 3 // >
	OTLess         OperateType = 4 // <
	OTNotEqual     OperateType = 5 // !=
)

func ParseOperateType added in v0.12.236

func ParseOperateType(str string) OperateType

type OtherSceneFeature added in v0.10.285

type OtherSceneFeature struct {
	Type   int
	Config *OtherSceneFeatureConfig
}

func NewOtherSceneFeature added in v0.10.285

func NewOtherSceneFeature(cfg *OtherSceneFeatureConfig) *OtherSceneFeature

type OtherSceneFeatureConfig added in v0.10.285

type OtherSceneFeatureConfig struct {
	Type string `yaml:"type" json:"type"`
}

func (*OtherSceneFeatureConfig) GetType added in v0.10.285

func (cfg *OtherSceneFeatureConfig) GetType() int

type OverlaySymbol

type OverlaySymbol struct {
	*BasicComponent `json:"-"`
	Config          *OverlaySymbolConfig  `json:"config"`
	SymbolCode      int                   `json:"-"`
	MapPosition     *sgc7game.ValMapping2 `json:"-"`
}

func (*OverlaySymbol) EachUsedResults

func (overlaySymbol *OverlaySymbol) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*OverlaySymbol) Init

func (overlaySymbol *OverlaySymbol) Init(fn string, pool *GamePropertyPool) error

Init -

func (*OverlaySymbol) InitEx added in v0.12.33

func (overlaySymbol *OverlaySymbol) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*OverlaySymbol) NewComponentData

func (overlaySymbol *OverlaySymbol) NewComponentData() IComponentData

NewComponentData -

func (*OverlaySymbol) OnAsciiGame

func (overlaySymbol *OverlaySymbol) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*OverlaySymbol) OnNewGame

func (overlaySymbol *OverlaySymbol) OnNewGame(gameProp *GameProperty) error

OnNewGame -

func (*OverlaySymbol) OnNewStep

func (overlaySymbol *OverlaySymbol) OnNewStep(gameProp *GameProperty) error

OnNewStep -

func (*OverlaySymbol) OnPlayGame

func (overlaySymbol *OverlaySymbol) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*OverlaySymbol) OnStats

func (overlaySymbol *OverlaySymbol) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*OverlaySymbol) OnStatsWithPB

func (overlaySymbol *OverlaySymbol) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type OverlaySymbolConfig

type OverlaySymbolConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Symbol               string `yaml:"symbol" json:"symbol"`
	MapPosition          string `yaml:"mapPosition" json:"mapPosition"`
	DefaultLevel         int    `yaml:"defaultLevel" json:"defaultLevel"`
	Collector            string `yaml:"collector" json:"collector"`
}

OverlaySymbolConfig - configuration for OverlaySymbol feature

type OverlaySymbolData

type OverlaySymbolData struct {
	BasicComponentData
	CurLevel int
}

func (*OverlaySymbolData) BuildPBComponentData

func (overlaySymbolData *OverlaySymbolData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*OverlaySymbolData) OnNewGame

func (overlaySymbolData *OverlaySymbolData) OnNewGame()

OnNewGame -

func (*OverlaySymbolData) OnNewStep

func (overlaySymbolData *OverlaySymbolData) OnNewStep()

OnNewStep -

type QueueBranch added in v0.13.19

type QueueBranch struct {
	*BasicComponent `json:"-"`
	Config          *QueueBranchConfig `json:"config"`
}

func (*QueueBranch) Init added in v0.13.19

func (queueBranch *QueueBranch) Init(fn string, pool *GamePropertyPool) error

Init -

func (*QueueBranch) InitEx added in v0.13.19

func (queueBranch *QueueBranch) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*QueueBranch) OnAsciiGame added in v0.13.19

func (queueBranch *QueueBranch) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*QueueBranch) OnPlayGame added in v0.13.19

func (queueBranch *QueueBranch) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*QueueBranch) OnStats added in v0.13.19

func (queueBranch *QueueBranch) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type QueueBranchConfig added in v0.13.19

type QueueBranchConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	JumpToComponent      string `yaml:"jumpToComponent" json:"jumpToComponent"`
}

QueueBranchConfig - configuration for QueueBranch

type QueueBranchData added in v0.13.19

type QueueBranchData struct {
	BasicComponentData
	Queue int
}

func (*QueueBranchData) BuildPBComponentData added in v0.13.19

func (queueBranchData *QueueBranchData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*QueueBranchData) GetVal added in v0.13.19

func (queueBranchData *QueueBranchData) GetVal(key string) int

GetVal -

func (*QueueBranchData) OnNewGame added in v0.13.19

func (queueBranchData *QueueBranchData) OnNewGame()

OnNewGame -

func (*QueueBranchData) OnNewStep added in v0.13.19

func (queueBranchData *QueueBranchData) OnNewStep()

OnNewStep -

func (*QueueBranchData) SetVal added in v0.13.19

func (queueBranchData *QueueBranchData) SetVal(key string, val int)

SetVal -

type RTPConfig

type RTPConfig struct {
	Modules         []*RTPSymbolModule   `yaml:"modules"`
	HitRateFeatures []*RTPHitRateFeature `yaml:"hitRateFeatures"`
}

type RTPHitRateFeature

type RTPHitRateFeature struct {
	Name       string   `yaml:"name"`
	Components []string `yaml:"components"`
}

type RTPSymbolFeature

type RTPSymbolFeature struct {
	Name       string   `yaml:"name"`
	Components []string `yaml:"components"`
}

type RTPSymbolModule

type RTPSymbolModule struct {
	Name       string              `yaml:"name"`
	Components []string            `yaml:"components"`
	Features   []*RTPSymbolFeature `yaml:"features"`
}

type ReRollReel added in v0.12.156

type ReRollReel struct {
	*BasicComponent `json:"-"`
	Config          *ReRollReelConfig `json:"config"`
}

func (*ReRollReel) Init added in v0.12.156

func (reRollReel *ReRollReel) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ReRollReel) InitEx added in v0.12.156

func (reRollReel *ReRollReel) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ReRollReel) OnAsciiGame added in v0.12.156

func (reRollReel *ReRollReel) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*ReRollReel) OnPlayGame added in v0.12.156

func (reRollReel *ReRollReel) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*ReRollReel) OnStats added in v0.12.156

func (reRollReel *ReRollReel) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type ReRollReelConfig added in v0.12.156

type ReRollReelConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
}

ReRollReelConfig - configuration for ReRollReel

type ReelModifier added in v0.12.250

type ReelModifier struct {
	*BasicComponent `json:"-"`
	Config          *ReelModifierConfig `json:"config"`
}

func (*ReelModifier) Init added in v0.12.250

func (reelModifier *ReelModifier) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ReelModifier) InitEx added in v0.12.250

func (reelModifier *ReelModifier) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ReelModifier) NewStats2 added in v0.13.8

func (reelModifier *ReelModifier) NewStats2() *stats2.Feature

NewStats2 -

func (*ReelModifier) OnAsciiGame added in v0.12.250

func (reelModifier *ReelModifier) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*ReelModifier) OnPlayGame added in v0.12.250

func (reelModifier *ReelModifier) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*ReelModifier) OnStats added in v0.12.250

func (reelModifier *ReelModifier) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*ReelModifier) OnStats2 added in v0.13.8

func (reelModifier *ReelModifier) OnStats2(icd IComponentData, s2 *stats2.Stats)

OnStats2

type ReelModifierConfig added in v0.12.250

type ReelModifierConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Reel                 string              `yaml:"reel" json:"reel"`               // 用这个轮子roll
	ReelData             *sgc7game.ReelsData `yaml:"-" json:"-"`                     // 用这个轮子roll
	Mask                 string              `yaml:"mask" json:"mask"`               // 如果mask不为空,则用这个mask的1来roll,可以配置 isReverse 来roll 0
	IsReverse            bool                `yaml:"isReverse" json:"isReverse"`     // 如果isReverse,表示roll 0
	HoldSymbols          []string            `yaml:"holdSymbols" json:"holdSymbols"` // 这些符号保留
	HoldSymbolCodes      []int               `yaml:"-" json:"-"`
	Triggers             []string            `yaml:"triggers" json:"triggers"` // 替换完轮子后需要保证所有trigger返回true
}

ReelModifierConfig - configuration for ReelModifier feature

type ReelSetMystery added in v0.10.267

type ReelSetMystery struct {
	*BasicComponent    `json:"-"`
	Config             *ReelSetMysteryConfig            `json:"config"`
	MapMysteryWeights  map[string]*sgc7game.ValWeights2 `json:"-"`
	MysterySymbolCodes []int                            `json:"-"`
}

func (*ReelSetMystery) EachUsedResults added in v0.10.267

func (reelSetMystery *ReelSetMystery) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*ReelSetMystery) Init added in v0.10.267

func (reelSetMystery *ReelSetMystery) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ReelSetMystery) InitEx added in v0.12.33

func (reelSetMystery *ReelSetMystery) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ReelSetMystery) NewComponentData added in v0.10.267

func (reelSetMystery *ReelSetMystery) NewComponentData() IComponentData

NewComponentData -

func (*ReelSetMystery) OnAsciiGame added in v0.10.267

func (reelSetMystery *ReelSetMystery) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*ReelSetMystery) OnPlayGame added in v0.10.267

func (reelSetMystery *ReelSetMystery) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*ReelSetMystery) OnStats added in v0.10.267

func (reelSetMystery *ReelSetMystery) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*ReelSetMystery) OnStatsWithPB added in v0.10.267

func (reelSetMystery *ReelSetMystery) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type ReelSetMysteryConfig added in v0.10.267

type ReelSetMysteryConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	MysteryRNG           string            `yaml:"mysteryRNG" json:"mysteryRNG"` // 强制用已经使用的随机数结果做 ReelSetMystery
	MysterySymbols       []string          `yaml:"mysterySymbols" json:"mysterySymbols"`
	MapMysteryWeight     map[string]string `yaml:"mapMysteryWeight" json:"mapMysteryWeight"`
}

ReelSetMysteryConfig - configuration for ReelSetMystery

type ReelSetMysteryData added in v0.10.267

type ReelSetMysteryData struct {
	BasicComponentData
	CurMysteryCode int
}

func (*ReelSetMysteryData) BuildPBComponentData added in v0.10.267

func (reelSetMysteryData *ReelSetMysteryData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*ReelSetMysteryData) OnNewGame added in v0.10.267

func (reelSetMysteryData *ReelSetMysteryData) OnNewGame()

OnNewGame -

func (*ReelSetMysteryData) OnNewStep added in v0.10.267

func (reelSetMysteryData *ReelSetMysteryData) OnNewStep()

OnNewStep -

type RefillSymbols added in v0.13.17

type RefillSymbols struct {
	*BasicComponent `json:"-"`
	Config          *RefillSymbolsConfig `json:"config"`
}

func (*RefillSymbols) EachUsedResults added in v0.13.17

func (refillSymbols *RefillSymbols) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*RefillSymbols) Init added in v0.13.17

func (refillSymbols *RefillSymbols) Init(fn string, pool *GamePropertyPool) error

Init -

func (*RefillSymbols) InitEx added in v0.13.17

func (refillSymbols *RefillSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*RefillSymbols) OnAsciiGame added in v0.13.17

func (refillSymbols *RefillSymbols) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*RefillSymbols) OnPlayGame added in v0.13.17

func (refillSymbols *RefillSymbols) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*RefillSymbols) OnStats added in v0.13.17

func (refillSymbols *RefillSymbols) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*RefillSymbols) OnStatsWithPB added in v0.13.17

func (refillSymbols *RefillSymbols) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type RefillSymbolsConfig added in v0.13.17

type RefillSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
}

RefillSymbolsConfig - configuration for RefillSymbols

type RemoveSymbols added in v0.13.17

type RemoveSymbols struct {
	*BasicComponent `json:"-"`
	Config          *RemoveSymbolsConfig `json:"config"`
}

func (*RemoveSymbols) EachUsedResults added in v0.13.17

func (removeSymbols *RemoveSymbols) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*RemoveSymbols) Init added in v0.13.17

func (removeSymbols *RemoveSymbols) Init(fn string, pool *GamePropertyPool) error

Init -

func (*RemoveSymbols) InitEx added in v0.13.17

func (removeSymbols *RemoveSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*RemoveSymbols) NewComponentData added in v0.13.17

func (removeSymbols *RemoveSymbols) NewComponentData() IComponentData

NewComponentData -

func (*RemoveSymbols) OnAsciiGame added in v0.13.17

func (removeSymbols *RemoveSymbols) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*RemoveSymbols) OnPlayGame added in v0.13.17

func (removeSymbols *RemoveSymbols) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*RemoveSymbols) OnStats added in v0.13.17

func (removeSymbols *RemoveSymbols) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*RemoveSymbols) OnStatsWithPB added in v0.13.17

func (removeSymbols *RemoveSymbols) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type RemoveSymbolsConfig added in v0.13.17

type RemoveSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	TargetComponents     []string `yaml:"targetComponents" json:"targetComponents"` // 这些组件的中奖会需要参与remove
	IgnoreSymbols        []string `yaml:"ignoreSymbols" json:"ignoreSymbols"`       // 忽略的symbol
	IgnoreSymbolCodes    []int    `yaml:"-" json:"-"`                               // 忽略的symbol
}

RemoveSymbolsConfig - configuration for RemoveSymbols

type RemoveSymbolsData added in v0.13.17

type RemoveSymbolsData struct {
	BasicComponentData
	RemovedNum int
}

func (*RemoveSymbolsData) BuildPBComponentData added in v0.13.17

func (removeSymbolsData *RemoveSymbolsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*RemoveSymbolsData) OnNewGame added in v0.13.17

func (removeSymbolsData *RemoveSymbolsData) OnNewGame()

OnNewGame -

func (*RemoveSymbolsData) OnNewStep added in v0.13.17

func (removeSymbolsData *RemoveSymbolsData) OnNewStep()

OnNewStep -

type ReplaceReel added in v0.12.147

type ReplaceReel struct {
	*BasicComponent `json:"-"`
	Config          *ReplaceReelConfig `json:"config"`
}

func (*ReplaceReel) Init added in v0.12.147

func (replaceReel *ReplaceReel) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ReplaceReel) InitEx added in v0.12.147

func (replaceReel *ReplaceReel) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ReplaceReel) OnAsciiGame added in v0.12.147

func (replaceReel *ReplaceReel) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*ReplaceReel) OnPlayGame added in v0.12.147

func (replaceReel *ReplaceReel) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*ReplaceReel) OnStats added in v0.12.147

func (replaceReel *ReplaceReel) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type ReplaceReelConfig added in v0.12.147

type ReplaceReelConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	MapReels             map[int]string `yaml:"mapReels" json:"mapReels"`
	MapReelsCode         map[int]int    `yaml:"-" json:"-"`
}

ReplaceReelConfig - configuration for ReplaceReel

type ReplaceSymbol added in v0.10.285

type ReplaceSymbol struct {
	*BasicComponent `json:"-"`
	Config          *ReplaceSymbolConfig `json:"config"`
}

func (*ReplaceSymbol) Init added in v0.10.285

func (replaceSymbol *ReplaceSymbol) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ReplaceSymbol) InitEx added in v0.12.33

func (replaceSymbol *ReplaceSymbol) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ReplaceSymbol) OnAsciiGame added in v0.10.285

func (replaceSymbol *ReplaceSymbol) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*ReplaceSymbol) OnPlayGame added in v0.10.285

func (replaceSymbol *ReplaceSymbol) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*ReplaceSymbol) OnStats added in v0.10.285

func (replaceSymbol *ReplaceSymbol) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type ReplaceSymbolConfig added in v0.10.285

type ReplaceSymbolConfig struct {
	BasicComponentConfig     `yaml:",inline" json:",inline"`
	Symbols                  []string       `yaml:"symbols" json:"symbols"`
	Chg2SymbolInReels        []string       `yaml:"chg2SymbolInReels" json:"chg2SymbolInReels"`
	MapChg2SymbolInReels     map[int]string `yaml:"mapChg2SymbolInReels" json:"mapChg2SymbolInReels"`
	Mask                     string         `yaml:"mask" json:"mask"`
	SymbolCodes              []int          `yaml:"-" json:"-"`
	MapChg2SymbolCodeInReels map[int]int    `yaml:"-" json:"-"`
}

ReplaceSymbolConfig - configuration for ReplaceSymbol

type ReplaceSymbolGroup added in v0.13.17

type ReplaceSymbolGroup struct {
	*BasicComponent `json:"-"`
	Config          *ReplaceSymbolGroupConfig `json:"config"`
}

func (*ReplaceSymbolGroup) Init added in v0.13.17

func (replaceSymbolGroup *ReplaceSymbolGroup) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ReplaceSymbolGroup) InitEx added in v0.13.17

func (replaceSymbolGroup *ReplaceSymbolGroup) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ReplaceSymbolGroup) OnAsciiGame added in v0.13.17

func (replaceSymbolGroup *ReplaceSymbolGroup) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*ReplaceSymbolGroup) OnPlayGame added in v0.13.17

func (replaceSymbolGroup *ReplaceSymbolGroup) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*ReplaceSymbolGroup) OnStats added in v0.13.17

func (replaceSymbolGroup *ReplaceSymbolGroup) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type ReplaceSymbolGroupConfig added in v0.13.17

type ReplaceSymbolGroupConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	SrcSymbols           []string `yaml:"srcSymbols" json:"srcSymbols"`
	SrcSymbolCodes       []int    `yaml:"-" json:"-"`
	TargetSymbols        []string `yaml:"targetSymbols" json:"targetSymbols"`
	TargetSymbolCodes    []int    `yaml:"-" json:"-"`
	Mask                 string   `yaml:"mask" json:"mask"`
}

ReplaceSymbolGroupConfig - configuration for ReplaceSymbolGroup

type Respin added in v0.10.273

type Respin struct {
	*BasicComponent `json:"-"`
	Config          *RespinConfig `json:"config"`
}

func (*Respin) AddRespinTimes added in v0.10.273

func (respin *Respin) AddRespinTimes(gameProp *GameProperty, num int)

OnPlayGame - on playgame

func (*Respin) AddRetriggerRespinNum added in v0.12.167

func (respin *Respin) AddRetriggerRespinNum(gameProp *GameProperty, num int)

AddRetriggerRespinNum -

func (*Respin) AddTriggerAward added in v0.12.193

func (respin *Respin) AddTriggerAward(gameProp *GameProperty, award *Award)

AddTriggerAward -

func (*Respin) EachUsedResults added in v0.10.273

func (respin *Respin) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*Respin) GetLastRespinNum added in v0.12.200

func (respin *Respin) GetLastRespinNum(gameProp *GameProperty) int

GetLastRespinNum -

func (*Respin) Init added in v0.10.273

func (respin *Respin) Init(fn string, pool *GamePropertyPool) error

Init -

func (*Respin) InitEx added in v0.12.33

func (respin *Respin) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*Respin) IsEnding added in v0.12.234

func (respin *Respin) IsEnding(gameProp *GameProperty) bool

IsEnding -

func (*Respin) IsRespin added in v0.12.157

func (respin *Respin) IsRespin() bool

IsRespin -

func (*Respin) IsStarted added in v0.12.234

func (respin *Respin) IsStarted(gameProp *GameProperty) bool

IsStarted -

func (*Respin) NewComponentData added in v0.10.273

func (respin *Respin) NewComponentData() IComponentData

NewComponentData -

func (*Respin) OnAsciiGame added in v0.10.273

func (respin *Respin) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*Respin) OnPlayGame added in v0.10.273

func (respin *Respin) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*Respin) OnPlayGameEnd added in v0.10.273

func (respin *Respin) OnPlayGameEnd(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

OnPlayGame - on playgame

func (*Respin) OnStats added in v0.10.273

func (respin *Respin) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*Respin) PushTrigger added in v0.12.193

func (respin *Respin) PushTrigger(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, num int)

PushTrigger -

func (*Respin) SaveRetriggerRespinNum added in v0.12.167

func (respin *Respin) SaveRetriggerRespinNum(gameProp *GameProperty)

SaveRetriggerRespinNum -

func (*Respin) Trigger added in v0.12.193

func (respin *Respin) Trigger(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams)

Trigger -

type Respin2 added in v0.12.225

type Respin2 struct {
	*BasicComponent `json:"-"`
	Config          *Respin2Config `json:"config"`
}

func (*Respin2) AddRespinTimes added in v0.12.225

func (respin2 *Respin2) AddRespinTimes(gameProp *GameProperty, num int)

OnPlayGame - on playgame

func (*Respin2) AddRetriggerRespinNum added in v0.12.225

func (respin2 *Respin2) AddRetriggerRespinNum(gameProp *GameProperty, num int)

AddRetriggerRespinNum -

func (*Respin2) AddTriggerAward added in v0.12.225

func (respin2 *Respin2) AddTriggerAward(gameProp *GameProperty, award *Award)

AddTriggerAward -

func (*Respin2) EachUsedResults added in v0.12.225

func (respin2 *Respin2) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*Respin2) GetLastRespinNum added in v0.12.225

func (respin2 *Respin2) GetLastRespinNum(gameProp *GameProperty) int

GetLastRespinNum -

func (*Respin2) Init added in v0.12.225

func (respin2 *Respin2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*Respin2) InitEx added in v0.12.225

func (respin2 *Respin2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*Respin2) IsRespin added in v0.12.225

func (respin2 *Respin2) IsRespin() bool

IsRespin -

func (*Respin2) NewComponentData added in v0.12.225

func (respin2 *Respin2) NewComponentData() IComponentData

NewComponentData -

func (*Respin2) OnAsciiGame added in v0.12.225

func (respin2 *Respin2) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*Respin2) OnPlayGame added in v0.12.225

func (respin2 *Respin2) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*Respin2) OnPlayGameEnd added in v0.12.225

func (respin2 *Respin2) OnPlayGameEnd(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

OnPlayGame - on playgame

func (*Respin2) OnStats added in v0.12.225

func (respin2 *Respin2) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*Respin2) PushTrigger added in v0.12.225

func (respin2 *Respin2) PushTrigger(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, num int)

PushTrigger -

func (*Respin2) SaveRetriggerRespinNum added in v0.12.225

func (respin2 *Respin2) SaveRetriggerRespinNum(gameProp *GameProperty)

SaveRetriggerRespinNum -

func (*Respin2) Trigger added in v0.12.225

func (respin2 *Respin2) Trigger(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams)

Trigger -

type Respin2Config added in v0.12.225

type Respin2Config struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	MainComponent        string                `yaml:"mainComponent" json:"mainComponent"`
	IsWinBreak           bool                  `yaml:"isWinBreak" json:"isWinBreak"`
	Levels               []*Respin2LevelConfig `yaml:"levels" json:"levels"`
}

Respin2Config - configuration for Respin2

type Respin2Data added in v0.12.225

type Respin2Data struct {
	BasicComponentData
	LastRespinNum         int
	CurRespinNum          int
	CurAddRespinNum       int
	RetriggerAddRespinNum int      // 再次触发时增加的次数
	TotalCoinWin          int64    //
	TotalCashWin          int64    //
	LastTriggerNum        int      // 剩余的触发次数,respin有2种模式,一种是直接增加免费次数,一种是累积整体触发次数
	CurTriggerNum         int      // 当前已经触发次数
	Awards                []*Award // 当前已经触发次数
	TriggerRespinNum      []int    // 配合LastTriggerNum用的respin次数,-1表示用当前的RetriggerAddRespinNum,否则就是具体值
}

func (*Respin2Data) BuildPBComponentData added in v0.12.225

func (respin2Data *Respin2Data) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*Respin2Data) OnNewGame added in v0.12.225

func (respin2Data *Respin2Data) OnNewGame()

OnNewGame -

func (*Respin2Data) OnNewStep added in v0.12.225

func (respin2Data *Respin2Data) OnNewStep()

OnNewStep -

type Respin2LevelConfig added in v0.12.225

type Respin2LevelConfig struct {
	LastRespinNum int    `yaml:"lastRespinNum" json:"lastRespinNum"` // 倒数第几局开始
	MaxCoinWins   int    `yaml:"maxCoinWins" json:"maxCoinWins"`     // 如果最大获奖低于这个
	JumpComponent string `yaml:"jumpComponent" json:"jumpComponent"` // 跳转到这个component
}

Respin2LevelConfig - configuration for Respin Level

type Respin2TriggerConfig added in v0.12.225

type Respin2TriggerConfig struct {
	RespinNum                       int                           `yaml:"respinNum" json:"respinNum"`                                         // 固定次数
	RespinNumWeight                 string                        `yaml:"respinNumWeight" json:"respinNumWeight"`                             // respin number weight
	RespinNumWithScatterNum         map[int]int                   `yaml:"respinNumWithScatterNum" json:"respinNumWithScatterNum"`             // respin number with scatter number
	RespinNumWeightWithScatterNum   map[int]string                `yaml:"respinNumWeightWithScatterNum" json:"respinNumWeightWithScatterNum"` // respin number weight with scatter number
	RespinNumWeightWithScatterNumVW map[int]*sgc7game.ValWeights2 `yaml:"-" json:"-"`                                                         // respin number weight with scatter number
}

Respin2TriggerConfig - configuration for TriggerRespin

type RespinConfig added in v0.10.273

type RespinConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	InitRespinNum        int                  `yaml:"initRespinNum" json:"initRespinNum"`
	MainComponent        string               `yaml:"mainComponent" json:"mainComponent"`
	IsWinBreak           bool                 `yaml:"isWinBreak" json:"isWinBreak"`
	Levels               []*RespinLevelConfig `yaml:"levels" json:"levels"`
}

RespinConfig - configuration for Respin

func (*RespinConfig) SetLinkComponent added in v0.12.278

func (cfg *RespinConfig) SetLinkComponent(link string, componentName string)

SetLinkComponent

type RespinData added in v0.10.273

type RespinData struct {
	BasicComponentData
	LastRespinNum         int
	CurRespinNum          int
	CurAddRespinNum       int
	RetriggerAddRespinNum int // 再次触发时增加的次数
	TotalCoinWin          int64
	TotalCashWin          int64
	LastTriggerNum        int      // 剩余的触发次数,respin有2种模式,一种是直接增加免费次数,一种是累积整体触发次数
	CurTriggerNum         int      // 当前已经触发次数
	Awards                []*Award // 当前已经触发次数
	TriggerRespinNum      []int    // 配合LastTriggerNum用的respin次数,-1表示用当前的RetriggerAddRespinNum,否则就是具体值
}

func (*RespinData) BuildPBComponentData added in v0.10.273

func (respinData *RespinData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*RespinData) OnNewGame added in v0.10.273

func (respinData *RespinData) OnNewGame()

OnNewGame -

func (*RespinData) OnNewStep added in v0.10.273

func (respinData *RespinData) OnNewStep()

OnNewStep -

type RespinDataCmdParam added in v0.10.279

type RespinDataCmdParam struct {
	RespinNum       int    `json:"RespinNum"`       // respin number
	RespinComponent string `json:"respinComponent"` // like fg-spin
}

type RespinDataConfig added in v0.10.279

type RespinDataConfig struct {
	RespinNum                     int            `yaml:"respinNum" json:"respinNum"`                                         // respin number
	RespinNumWeight               string         `yaml:"respinNumWeight" json:"respinNumWeight"`                             // respin number weight
	RespinNumWithScatterNum       map[int]int    `yaml:"respinNumWithScatterNum" json:"respinNumWithScatterNum"`             // respin number with scatter number
	RespinNumWeightWithScatterNum map[int]string `yaml:"respinNumWeightWithScatterNum" json:"respinNumWeightWithScatterNum"` // respin number weight with scatter number
	RespinComponent               string         `yaml:"respinComponent" json:"respinComponent"`                             // like fg-spin
	Cmd                           string         `yaml:"cmd" json:"cmd"`                                                     // cmd
}

RespinDataConfig - configuration for MultiRespin

type RespinLevelConfig added in v0.10.323

type RespinLevelConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	LastRespinNum        int    `yaml:"lastRespinNum" json:"lastRespinNum"` // 倒数第几局开始
	MaxCoinWins          int    `yaml:"maxCoinWins" json:"maxCoinWins"`     // 如果最大获奖低于这个
	JumpComponent        string `yaml:"jumpComponent" json:"jumpComponent"` // 跳转到这个component
}

RespinLevelConfig - configuration for Respin Level

type RollSymbol added in v0.13.17

type RollSymbol struct {
	*BasicComponent `json:"-"`
	Config          *RollSymbolConfig `json:"config"`
}

func (*RollSymbol) Init added in v0.13.17

func (rollSymbol *RollSymbol) Init(fn string, pool *GamePropertyPool) error

Init -

func (*RollSymbol) InitEx added in v0.13.17

func (rollSymbol *RollSymbol) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*RollSymbol) OnAsciiGame added in v0.13.17

func (rollSymbol *RollSymbol) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*RollSymbol) OnPlayGame added in v0.13.17

func (rollSymbol *RollSymbol) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*RollSymbol) OnStats added in v0.13.17

func (rollSymbol *RollSymbol) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type RollSymbolConfig added in v0.13.17

type RollSymbolConfig struct {
	BasicComponentConfig   `yaml:",inline" json:",inline"`
	Weight                 string                `yaml:"weight" json:"weight"`
	WeightVW               *sgc7game.ValWeights2 `json:"-"`
	SrcSymbolCollection    string                `yaml:"srcSymbolCollection" json:"srcSymbolCollection"`
	IgnoreSymbolCollection string                `yaml:"ignoreSymbolCollection" json:"ignoreSymbolCollection"`
	TargetSymbolCollection string                `yaml:"targetSymbolCollection" json:"targetSymbolCollection"`
}

RollSymbolConfig - configuration for RollSymbol

type RollSymbolData added in v0.13.17

type RollSymbolData struct {
	BasicComponentData
	SymbolCode int
}

func (*RollSymbolData) BuildPBComponentData added in v0.13.17

func (rollSymbolData *RollSymbolData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*RollSymbolData) GetVal added in v0.13.17

func (rollSymbolData *RollSymbolData) GetVal(key string) int

GetVal -

func (*RollSymbolData) OnNewGame added in v0.13.17

func (rollSymbolData *RollSymbolData) OnNewGame()

OnNewGame -

func (*RollSymbolData) OnNewStep added in v0.13.17

func (rollSymbolData *RollSymbolData) OnNewStep()

OnNewStep -

func (*RollSymbolData) SetVal added in v0.13.17

func (rollSymbolData *RollSymbolData) SetVal(key string, val int)

SetVal -

type ScatterTrigger added in v0.12.264

type ScatterTrigger struct {
	*BasicComponent `json:"-"`
	Config          *ScatterTriggerConfig `json:"config"`
}

func (*ScatterTrigger) CanTrigger added in v0.12.264

func (scatterTrigger *ScatterTrigger) CanTrigger(gameProp *GameProperty, gs *sgc7game.GameScene, curpr *sgc7game.PlayResult, stake *sgc7game.Stake, isSaveResult bool) (bool, []*sgc7game.Result)

CanTrigger -

func (*ScatterTrigger) GetWinMulti added in v0.12.278

func (scatterTrigger *ScatterTrigger) GetWinMulti(basicCD *BasicComponentData) int

func (*ScatterTrigger) Init added in v0.12.264

func (scatterTrigger *ScatterTrigger) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ScatterTrigger) InitEx added in v0.12.264

func (scatterTrigger *ScatterTrigger) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ScatterTrigger) NewComponentData added in v0.12.264

func (scatterTrigger *ScatterTrigger) NewComponentData() IComponentData

NewComponentData -

func (*ScatterTrigger) OnAsciiGame added in v0.12.264

func (scatterTrigger *ScatterTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*ScatterTrigger) OnPlayGame added in v0.12.264

func (scatterTrigger *ScatterTrigger) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*ScatterTrigger) OnStats added in v0.12.264

func (scatterTrigger *ScatterTrigger) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*ScatterTrigger) OnStatsWithPB added in v0.12.264

func (scatterTrigger *ScatterTrigger) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type ScatterTriggerConfig added in v0.12.264

type ScatterTriggerConfig struct {
	BasicComponentConfig            `yaml:",inline" json:",inline"`
	Symbols                         []string                      `yaml:"symbols" json:"symbols"`                                             // like scatter
	SymbolCodes                     []int                         `yaml:"-" json:"-"`                                                         // like scatter
	Type                            string                        `yaml:"type" json:"type"`                                                   // like scatters
	TriggerType                     SymbolTriggerType             `yaml:"-" json:"-"`                                                         // SymbolTriggerType
	BetTypeString                   string                        `yaml:"betType" json:"betType"`                                             // bet or totalBet or noPay
	BetType                         BetType                       `yaml:"-" json:"-"`                                                         // bet or totalBet or noPay
	MinNum                          int                           `yaml:"minNum" json:"minNum"`                                               // like 3,countscatter 或 countscatterInArea 或 checkLines 或 checkWays 时生效
	WildSymbols                     []string                      `yaml:"wildSymbols" json:"wildSymbols"`                                     // wild etc
	WildSymbolCodes                 []int                         `yaml:"-" json:"-"`                                                         // wild symbolCode
	PosArea                         []int                         `yaml:"posArea" json:"posArea"`                                             // 只在countscatterInArea时生效,[minx,maxx,miny,maxy],当x,y分别符合双闭区间才合法
	CountScatterPayAs               string                        `yaml:"countScatterPayAs" json:"countScatterPayAs"`                         // countscatter时,按什么符号赔付
	SymbolCodeCountScatterPayAs     int                           `yaml:"-" json:"-"`                                                         // countscatter时,按什么符号赔付
	WinMulti                        int                           `yaml:"winMulti" json:"winMulti"`                                           // winMulti,最后的中奖倍数,默认为1
	JumpToComponent                 string                        `yaml:"jumpToComponent" json:"jumpToComponent"`                             // jump to
	ForceToNext                     bool                          `yaml:"forceToNext" json:"forceToNext"`                                     // 如果触发,默认跳转jump to,这里可以强制走next分支
	Awards                          []*Award                      `yaml:"awards" json:"awards"`                                               // 新的奖励系统
	SymbolAwardsWeights             *AwardsWeights                `yaml:"symbolAwardsWeights" json:"symbolAwardsWeights"`                     // 每个中奖符号随机一组奖励
	TargetMask                      string                        `yaml:"targetMask" json:"targetMask"`                                       // 如果是scatter这一组判断,可以把结果传递给一个mask
	IsReverse                       bool                          `yaml:"isReverse" json:"isReverse"`                                         // 如果isReverse,表示判定为否才触发
	NeedDiscardResults              bool                          `yaml:"needDiscardResults" json:"needDiscardResults"`                       // 如果needDiscardResults,表示抛弃results
	IsAddRespinMode                 bool                          `yaml:"isAddRespinMode" json:"isAddRespinMode"`                             // 是否是增加respinNum模式,默认是增加triggerNum模式
	RespinNum                       int                           `yaml:"respinNum" json:"respinNum"`                                         // respin number
	RespinNumWeight                 string                        `yaml:"respinNumWeight" json:"respinNumWeight"`                             // respin number weight
	RespinNumWeightVW               *sgc7game.ValWeights2         `yaml:"-" json:"-"`                                                         // respin number weight
	RespinNumWithScatterNum         map[int]int                   `yaml:"respinNumWithScatterNum" json:"respinNumWithScatterNum"`             // respin number with scatter number
	RespinNumWeightWithScatterNum   map[int]string                `yaml:"respinNumWeightWithScatterNum" json:"respinNumWeightWithScatterNum"` // respin number weight with scatter number
	RespinNumWeightWithScatterNumVW map[int]*sgc7game.ValWeights2 `yaml:"-" json:"-"`                                                         // respin number weight with scatter number
}

ScatterTriggerConfig - configuration for ScatterTrigger 需要特别注意,当判断scatter时,symbols里的符号会当作同一个符号来处理

func (*ScatterTriggerConfig) SetLinkComponent added in v0.12.278

func (cfg *ScatterTriggerConfig) SetLinkComponent(link string, componentName string)

SetLinkComponent

type ScatterTriggerData added in v0.12.264

type ScatterTriggerData struct {
	BasicComponentData
	NextComponent string
	SymbolNum     int
	WildNum       int
	RespinNum     int
	Wins          int
	WinMulti      int
}

func (*ScatterTriggerData) BuildPBComponentData added in v0.12.264

func (scatterTriggerData *ScatterTriggerData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*ScatterTriggerData) GetVal added in v0.12.264

func (scatterTriggerData *ScatterTriggerData) GetVal(key string) int

GetVal -

func (*ScatterTriggerData) OnNewGame added in v0.12.264

func (scatterTriggerData *ScatterTriggerData) OnNewGame()

OnNewGame -

func (*ScatterTriggerData) OnNewStep added in v0.12.264

func (scatterTriggerData *ScatterTriggerData) OnNewStep()

OnNewStep -

func (*ScatterTriggerData) SetVal added in v0.12.264

func (scatterTriggerData *ScatterTriggerData) SetVal(key string, val int)

SetVal -

type SceneStack added in v0.12.272

type SceneStack struct {
	Scenes      []*SceneStackData
	CacheScenes []*SceneStackData
}

func NewSceneStack added in v0.12.272

func NewSceneStack() *SceneStack

func (*SceneStack) GetTargetScene3 added in v0.12.272

func (stack *SceneStack) GetTargetScene3(gameProp *GameProperty, basicCfg *BasicComponentConfig, si int) *sgc7game.GameScene

func (*SceneStack) GetTopScene added in v0.12.272

func (stack *SceneStack) GetTopScene() *SceneStackData

func (*SceneStack) Has added in v0.12.272

func (stack *SceneStack) Has(scene string) bool

func (*SceneStack) Pop added in v0.12.272

func (stack *SceneStack) Pop() *SceneStackData

func (*SceneStack) PopTo added in v0.12.272

func (stack *SceneStack) PopTo(scene string)

func (*SceneStack) Push added in v0.12.272

func (stack *SceneStack) Push(scene string, index int, gs *sgc7game.GameScene, isNeedCache bool)

type SceneStackData added in v0.12.272

type SceneStackData struct {
	Component   string
	SceneIndex  int
	Scene       *sgc7game.GameScene
	IsNeedCache bool
}

type ScriptCore

type ScriptCore struct {
	Cel *cel.Env
}

func NewScriptCore

func NewScriptCore(gameProp *GameProperty) (*ScriptCore, error)

type SelectPosData added in v0.12.148

type SelectPosData struct {
	Type       string `yaml:"type" json:"type"`
	X          int    `yaml:"x" json:"x"`
	Y          int    `yaml:"y" json:"y"`
	Symbol     string `yaml:"symbol" json:"symbol"`
	SymbolCode int    `yaml:"-" json:"-"`
}

func (*SelectPosData) Select added in v0.12.148

func (spd *SelectPosData) Select(gs *sgc7game.GameScene) (bool, int, int)

type Stats

type Stats struct {
	Root *sgc7stats.Feature

	TotalNum int64
	Pool     *GamePropertyPool
	NoStats  bool
	Bet      int
	// contains filtered or unexported fields
}

func NewStats

func NewStats(root *sgc7stats.Feature, pool *GamePropertyPool) *Stats

func (*Stats) Push

func (stats *Stats) Push(stake *sgc7game.Stake, results []*sgc7game.PlayResult)

func (*Stats) StartWorker

func (stats *Stats) StartWorker()

func (*Stats) Wait

func (stats *Stats) Wait()

type StatsConfig

type StatsConfig struct {
	Name                 string            `yaml:"name"`
	Component            string            `yaml:"component"`
	RespinEndingStatus   map[string]string `yaml:"respinEndingStatus"`   // component -> status
	RespinStartStatus    map[string]string `yaml:"respinStartStatus"`    // component -> status
	RespinStartStatusEx  map[string]string `yaml:"respinStartStatusEx"`  // component -> status
	RespinNumStatus      []string          `yaml:"respinNumStatus"`      // component -> status
	RespinStartNumStatus []string          `yaml:"respinStartNumStatus"` // component -> status
	RespinWinStatus      []string          `yaml:"respinWinStatus"`      // component -> status
	Children             []*StatsConfig    `yaml:"children"`
	IsNeedForceStats     bool              `yaml:"isNeedForceStats"`
}

type StatsParam

type StatsParam struct {
	Stake   *sgc7game.Stake
	Results []*sgc7game.PlayResult
}

type SymbolCollection added in v0.12.2

type SymbolCollection struct {
	*BasicComponent `json:"-"`
	Config          *SymbolCollectionConfig `json:"config"`
	WeightVal       *sgc7game.ValWeights2   `json:"-"`
}

SymbolCollection - 也是一个非常特殊的组件,用来处理symbol随机集合的,譬如一共8个符号,按恒定权重先后选出3个符号

func (*SymbolCollection) EachUsedResults added in v0.12.2

func (symbolCollection *SymbolCollection) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*SymbolCollection) GetSymbols added in v0.13.17

func (symbolCollection *SymbolCollection) GetSymbols(gameProp *GameProperty) []int

GetSymbols -

func (*SymbolCollection) Init added in v0.12.2

func (symbolCollection *SymbolCollection) Init(fn string, pool *GamePropertyPool) error

Init -

func (*SymbolCollection) InitEx added in v0.12.33

func (symbolCollection *SymbolCollection) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*SymbolCollection) NewComponentData added in v0.12.2

func (symbolCollection *SymbolCollection) NewComponentData() IComponentData

NewComponentData -

func (*SymbolCollection) OnAsciiGame added in v0.12.2

func (symbolCollection *SymbolCollection) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*SymbolCollection) OnPlayGame added in v0.12.2

func (symbolCollection *SymbolCollection) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*SymbolCollection) OnStats added in v0.12.2

func (symbolCollection *SymbolCollection) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*SymbolCollection) OnStatsWithPB added in v0.12.2

func (symbolCollection *SymbolCollection) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

func (*SymbolCollection) Push added in v0.12.2

func (symbolCollection *SymbolCollection) Push(plugin sgc7plugin.IPlugin, gameProp *GameProperty, gp *GameParams) error

Push -

type SymbolCollectionConfig added in v0.12.2

type SymbolCollectionConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	WeightVal            string `yaml:"weightVal" json:"weightVal"`
}

SymbolCollectionConfig - configuration for SymbolCollection feature

type SymbolCollectionData added in v0.12.2

type SymbolCollectionData struct {
	BasicComponentData
	SymbolCodes []int
}

func (*SymbolCollectionData) BuildPBComponentData added in v0.12.2

func (symbolCollectionData *SymbolCollectionData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*SymbolCollectionData) OnNewGame added in v0.12.2

func (symbolCollectionData *SymbolCollectionData) OnNewGame()

OnNewGame -

func (*SymbolCollectionData) OnNewStep added in v0.12.2

func (symbolCollectionData *SymbolCollectionData) OnNewStep()

OnNewStep -

type SymbolModifier added in v0.12.230

type SymbolModifier struct {
	*BasicComponent `json:"-"`
	Config          *SymbolModifierConfig `json:"config"`
}

func (*SymbolModifier) Init added in v0.12.230

func (symbolModifier *SymbolModifier) Init(fn string, pool *GamePropertyPool) error

Init -

func (*SymbolModifier) InitEx added in v0.12.230

func (symbolModifier *SymbolModifier) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*SymbolModifier) NewStats2 added in v0.13.8

func (symbolModifier *SymbolModifier) NewStats2() *stats2.Feature

NewStats2 -

func (*SymbolModifier) OnAsciiGame added in v0.12.230

func (symbolModifier *SymbolModifier) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*SymbolModifier) OnPlayGame added in v0.12.230

func (symbolModifier *SymbolModifier) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*SymbolModifier) OnStats added in v0.12.230

func (symbolModifier *SymbolModifier) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*SymbolModifier) OnStats2 added in v0.13.8

func (symbolModifier *SymbolModifier) OnStats2(icd IComponentData, s2 *stats2.Stats)

OnStats2

type SymbolModifierConfig added in v0.12.230

type SymbolModifierConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Symbols              []string `yaml:"symbols" json:"symbols"`
	SymbolCodes          []int    `yaml:"-" json:"-"`
	TargetSymbols        []string `yaml:"targetSymbols" json:"targetSymbols"`
	TargetSymbolCodes    []int    `yaml:"-" json:"-"`
	Triggers             []string `yaml:"triggers" json:"triggers"` // 替换完图标后需要保证所有trigger返回true
	MinNum               int      `yaml:"minNum" json:"minNum"`     // 至少换几个,如果小于等于0,就表示要全部换
	PosArea              []int    `yaml:"posArea" json:"posArea"`   // 只在countscatterInArea时生效,[minx,maxx,miny,maxy],当x,y分别符合双闭区间才合法
}

SymbolModifierConfig - configuration for SymbolModifier feature

type SymbolMulti

type SymbolMulti struct {
	*BasicComponent   `json:"-"`
	Config            *SymbolMultiConfig               `json:"config"`
	SymbolCodes       []int                            `json:"-"`
	WeightMulti       *sgc7game.ValWeights2            `json:"-"`
	MapWeightMulti    map[string]*sgc7game.ValWeights2 `json:"-"`
	OtherSceneFeature *OtherSceneFeature               `json:"-"`
}

func (*SymbolMulti) Init

func (symbolMulti *SymbolMulti) Init(fn string, pool *GamePropertyPool) error

Init -

func (*SymbolMulti) InitEx added in v0.12.33

func (symbolMulti *SymbolMulti) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*SymbolMulti) OnAsciiGame

func (symbolMulti *SymbolMulti) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*SymbolMulti) OnPlayGame

func (symbolMulti *SymbolMulti) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*SymbolMulti) OnStats

func (symbolMulti *SymbolMulti) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type SymbolMultiConfig

type SymbolMultiConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Symbol               string                   `yaml:"symbol" json:"-"`                      // 弃用,用symbols
	Symbols              []string                 `yaml:"symbols" json:"symbols"`               // 这些符号可以有倍数
	WeightMulti          string                   `yaml:"weightMulti" json:"weightMulti"`       // 倍数权重
	StaticMulti          int                      `yaml:"staticMulti" json:"staticMulti"`       // 恒定倍数
	MapWeightMulti       map[string]string        `yaml:"mapWeightMulti" json:"mapWeightMulti"` // 可以配置多套权重
	ValUsed              string                   `yaml:"valUsed" json:"valUsed"`               // 用这个值来确定使用的权重
	OtherSceneFeature    *OtherSceneFeatureConfig `yaml:"otherSceneFeature" json:"otherSceneFeature"`
}

SymbolMultiConfig - configuration for SymbolMulti feature

type SymbolTrigger added in v0.12.147

type SymbolTrigger struct {
	*BasicComponent `json:"-"`
	Config          *SymbolTriggerConfig `json:"config"`
}

func (*SymbolTrigger) CanTrigger added in v0.12.213

func (symbolTrigger *SymbolTrigger) CanTrigger(gameProp *GameProperty, gs *sgc7game.GameScene, curpr *sgc7game.PlayResult, stake *sgc7game.Stake, isSaveResult bool) (bool, []*sgc7game.Result)

CanTrigger -

func (*SymbolTrigger) Init added in v0.12.147

func (symbolTrigger *SymbolTrigger) Init(fn string, pool *GamePropertyPool) error

Init -

func (*SymbolTrigger) InitEx added in v0.12.147

func (symbolTrigger *SymbolTrigger) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*SymbolTrigger) NewComponentData added in v0.12.147

func (symbolTrigger *SymbolTrigger) NewComponentData() IComponentData

NewComponentData -

func (*SymbolTrigger) OnAsciiGame added in v0.12.147

func (symbolTrigger *SymbolTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*SymbolTrigger) OnPlayGame added in v0.12.147

func (symbolTrigger *SymbolTrigger) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*SymbolTrigger) OnStats added in v0.12.147

func (symbolTrigger *SymbolTrigger) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*SymbolTrigger) OnStatsWithPB added in v0.12.238

func (symbolTrigger *SymbolTrigger) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type SymbolTriggerConfig added in v0.12.147

type SymbolTriggerConfig struct {
	BasicComponentConfig            `yaml:",inline" json:",inline"`
	Symbols                         []string                      `yaml:"symbols" json:"symbols"`                                             // like scatter
	SymbolCodes                     []int                         `yaml:"-" json:"-"`                                                         // like scatter
	ExcludeSymbolCodes              []int                         `yaml:"-" json:"-"`                                                         // 在 lines 和 ways 里有用
	Type                            string                        `yaml:"type" json:"type"`                                                   // like scatters
	TriggerType                     SymbolTriggerType             `yaml:"-" json:"-"`                                                         // SymbolTriggerType
	BetTypeString                   string                        `yaml:"betType" json:"betType"`                                             // bet or totalBet or noPay
	BetType                         BetType                       `yaml:"-" json:"-"`                                                         // bet or totalBet or noPay
	MinNum                          int                           `yaml:"minNum" json:"minNum"`                                               // like 3,countscatter 或 countscatterInArea 或 checkLines 或 checkWays 时生效
	WildSymbols                     []string                      `yaml:"wildSymbols" json:"wildSymbols"`                                     // wild etc
	WildSymbolCodes                 []int                         `yaml:"-" json:"-"`                                                         // wild symbolCode
	StrCheckWinType                 string                        `yaml:"checkWinType" json:"checkWinType"`                                   // left2right or right2left or all
	CheckWinType                    CheckWinType                  `yaml:"-" json:"-"`                                                         //
	PosArea                         []int                         `yaml:"posArea" json:"posArea"`                                             // 只在countscatterInArea时生效,[minx,maxx,miny,maxy],当x,y分别符合双闭区间才合法
	CountScatterPayAs               string                        `yaml:"countScatterPayAs" json:"countScatterPayAs"`                         // countscatter时,按什么符号赔付
	SymbolCodeCountScatterPayAs     int                           `yaml:"-" json:"-"`                                                         // countscatter时,按什么符号赔付
	JumpToComponent                 string                        `yaml:"jumpToComponent" json:"jumpToComponent"`                             // jump to
	ForceToNext                     bool                          `yaml:"forceToNext" json:"forceToNext"`                                     // 如果触发,默认跳转jump to,这里可以强制走next分支
	TagSymbolNum                    string                        `yaml:"tagSymbolNum" json:"tagSymbolNum"`                                   // 这里可以将symbol数量记下来,别的地方能获取到
	Awards                          []*Award                      `yaml:"awards" json:"awards"`                                               // 新的奖励系统
	SymbolAwardsWeights             *AwardsWeights                `yaml:"symbolAwardsWeights" json:"symbolAwardsWeights"`                     // 每个中奖符号随机一组奖励
	TargetMask                      string                        `yaml:"targetMask" json:"targetMask"`                                       // 如果是scatter这一组判断,可以把结果传递给一个mask
	IsReverse                       bool                          `yaml:"isReverse" json:"isReverse"`                                         // 如果isReverse,表示判定为否才触发
	NeedDiscardResults              bool                          `yaml:"needDiscardResults" json:"needDiscardResults"`                       // 如果needDiscardResults,表示抛弃results
	IsAddRespinMode                 bool                          `yaml:"isAddRespinMode" json:"isAddRespinMode"`                             // 是否是增加respinNum模式,默认是增加triggerNum模式
	RespinNum                       int                           `yaml:"respinNum" json:"respinNum"`                                         // respin number
	RespinNumWeight                 string                        `yaml:"respinNumWeight" json:"respinNumWeight"`                             // respin number weight
	RespinNumWeightVW               *sgc7game.ValWeights2         `yaml:"-" json:"-"`                                                         // respin number weight
	RespinNumWithScatterNum         map[int]int                   `yaml:"respinNumWithScatterNum" json:"respinNumWithScatterNum"`             // respin number with scatter number
	RespinNumWeightWithScatterNum   map[int]string                `yaml:"respinNumWeightWithScatterNum" json:"respinNumWeightWithScatterNum"` // respin number weight with scatter number
	RespinNumWeightWithScatterNumVW map[int]*sgc7game.ValWeights2 `yaml:"-" json:"-"`                                                         // respin number weight with scatter number
}

SymbolTriggerConfig - configuration for SymbolTrigger 需要特别注意,当判断scatter时,symbols里的符号会当作同一个符号来处理

type SymbolTriggerData added in v0.12.147

type SymbolTriggerData struct {
	BasicComponentData
	NextComponent string
	SymbolNum     int
	WildNum       int
	RespinNum     int
	Wins          int
}

func (*SymbolTriggerData) BuildPBComponentData added in v0.12.147

func (symbolTriggerData *SymbolTriggerData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*SymbolTriggerData) GetVal added in v0.12.225

func (symbolTriggerData *SymbolTriggerData) GetVal(key string) int

GetVal -

func (*SymbolTriggerData) OnNewGame added in v0.12.147

func (symbolTriggerData *SymbolTriggerData) OnNewGame()

OnNewGame -

func (*SymbolTriggerData) OnNewStep added in v0.12.147

func (symbolTriggerData *SymbolTriggerData) OnNewStep()

OnNewStep -

func (*SymbolTriggerData) SetVal added in v0.12.225

func (symbolTriggerData *SymbolTriggerData) SetVal(key string, val int)

SetVal -

type SymbolTriggerType added in v0.12.147

type SymbolTriggerType int
const (
	STTypeUnknow             SymbolTriggerType = 0 // 非法
	STTypeLines              SymbolTriggerType = 1 // 线中奖判断,一定是判断全部线,且读paytable来判断是否可以中奖
	STTypeWays               SymbolTriggerType = 2 // ways中奖判断,且读paytable来判断是否可以中奖
	STTypeScatters           SymbolTriggerType = 3 // scatter中奖判断,且读paytable来判断是否可以中奖
	STTypeCountScatter       SymbolTriggerType = 4 // scatter判断,需要传入minnum,不读paytable
	STTypeCountScatterInArea SymbolTriggerType = 5 // 区域内的scatter判断,需要传入minnum,不读paytable
	STTypeCheckLines         SymbolTriggerType = 6 // 线判断,一定是判断全部线,需要传入minnum,不读paytable
	STTypeCheckWays          SymbolTriggerType = 7 // ways判断,需要传入minnum,不读paytable
	STTypeCluster            SymbolTriggerType = 8 // cluster,且读paytable来判断是否可以中奖
)

func ParseSymbolTriggerType added in v0.12.147

func ParseSymbolTriggerType(str string) SymbolTriggerType

type SymbolVal

type SymbolVal struct {
	*BasicComponent   `json:"-"`
	Config            *SymbolValConfig      `json:"config"`
	SymbolCode        int                   `json:"-"`
	WeightVal         *sgc7game.ValWeights2 `json:"-"`
	OtherSceneFeature *OtherSceneFeature    `json:"-"`
}

func (*SymbolVal) GetWeightVal added in v0.12.244

func (symbolVal *SymbolVal) GetWeightVal(gameProp *GameProperty, basicCD *BasicComponentData) *sgc7game.ValWeights2

func (*SymbolVal) Init

func (symbolVal *SymbolVal) Init(fn string, pool *GamePropertyPool) error

Init -

func (*SymbolVal) InitEx added in v0.12.33

func (symbolVal *SymbolVal) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*SymbolVal) OnAsciiGame

func (symbolVal *SymbolVal) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*SymbolVal) OnPlayGame

func (symbolVal *SymbolVal) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*SymbolVal) OnStats

func (symbolVal *SymbolVal) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type SymbolVal2

type SymbolVal2 struct {
	*BasicComponent   `json:"-"`
	Config            *SymbolVal2Config       `json:"config"`
	SymbolCode        int                     `json:"-"`
	WeightsVal        []*sgc7game.ValWeights2 `json:"-"`
	WeightSet         *sgc7game.ValWeights2   `json:"-"`
	OtherSceneFeature *OtherSceneFeature      `json:"-"`
}

func (*SymbolVal2) Init

func (symbolVal2 *SymbolVal2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*SymbolVal2) InitEx added in v0.12.33

func (symbolVal2 *SymbolVal2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*SymbolVal2) OnAsciiGame

func (symbolVal2 *SymbolVal2) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*SymbolVal2) OnPlayGame

func (symbolVal2 *SymbolVal2) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*SymbolVal2) OnStats

func (symbolVal2 *SymbolVal2) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type SymbolVal2Config

type SymbolVal2Config struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Symbol               string                   `yaml:"symbol" json:"symbol"`
	WeightSet            string                   `yaml:"weightSet" json:"weightSet"`
	WeightsVal           []string                 `yaml:"weightsVal" json:"weightsVal"`
	DefaultVal           int                      `yaml:"defaultVal" json:"defaultVal"`
	RNGSet               string                   `yaml:"RNGSet" json:"RNGSet"`
	OtherSceneFeature    *OtherSceneFeatureConfig `yaml:"otherSceneFeature" json:"otherSceneFeature"`
}

SymbolVal2Config - configuration for SymbolVal2 feature

type SymbolValConfig

type SymbolValConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Symbol               string                   `yaml:"symbol" json:"symbol"`
	WeightVal            string                   `yaml:"weightVal" json:"weightVal"`
	DefaultVal           int                      `yaml:"defaultVal" json:"defaultVal"`
	OtherSceneFeature    *OtherSceneFeatureConfig `yaml:"otherSceneFeature" json:"otherSceneFeature"`
	EmptyOtherSceneVal   int                      `yaml:"emptyOtherSceneVal" json:"emptyOtherSceneVal"` // 如果配置了otherscene,那么当otherscene里的某个位置为这个值时,才新赋值
}

SymbolValConfig - configuration for SymbolMulti feature

type SymbolValWins

type SymbolValWins struct {
	*BasicComponent   `json:"-"`
	Config            *SymbolValWinsConfig `json:"config"`
	TriggerSymbolCode int                  `json:"-"`
}

func (*SymbolValWins) Init

func (symbolValWins *SymbolValWins) Init(fn string, pool *GamePropertyPool) error

Init -

func (*SymbolValWins) InitEx added in v0.12.33

func (symbolValWins *SymbolValWins) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*SymbolValWins) NewComponentData added in v0.12.250

func (symbolValWins *SymbolValWins) NewComponentData() IComponentData

NewComponentData -

func (*SymbolValWins) OnAsciiGame

func (symbolValWins *SymbolValWins) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*SymbolValWins) OnPlayGame

func (symbolValWins *SymbolValWins) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*SymbolValWins) OnStats

func (symbolValWins *SymbolValWins) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*SymbolValWins) OnStatsWithPB added in v0.12.250

func (symbolValWins *SymbolValWins) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type SymbolValWinsConfig

type SymbolValWinsConfig struct {
	BasicComponentConfig    `yaml:",inline" json:",inline"`
	BetType                 string `yaml:"betType" json:"betType"`                                 // bet or totalBet
	TriggerSymbol           string `yaml:"triggerSymbol" json:"triggerSymbol"`                     // like collect
	Type                    string `yaml:"type" json:"type"`                                       // like scatters
	MinNum                  int    `yaml:"minNum" json:"minNum"`                                   // like 3
	IsTriggerSymbolNumMulti bool   `yaml:"isTriggerSymbolNumMulti" json:"isTriggerSymbolNumMulti"` // totalwins = totalvals * triggetSymbol's num
}

SymbolValWinsConfig - configuration for SymbolValWins

type SymbolValWinsData added in v0.12.250

type SymbolValWinsData struct {
	BasicComponentData
	SymbolNum    int
	Wins         int
	CollectorNum int
}

func (*SymbolValWinsData) BuildPBComponentData added in v0.12.250

func (symbolValWinsData *SymbolValWinsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*SymbolValWinsData) GetVal added in v0.12.250

func (symbolValWinsData *SymbolValWinsData) GetVal(key string) int

GetVal -

func (*SymbolValWinsData) OnNewGame added in v0.12.250

func (symbolValWinsData *SymbolValWinsData) OnNewGame()

OnNewGame -

func (*SymbolValWinsData) OnNewStep added in v0.12.250

func (symbolValWinsData *SymbolValWinsData) OnNewStep()

OnNewStep -

func (*SymbolValWinsData) SetVal added in v0.12.250

func (symbolValWinsData *SymbolValWinsData) SetVal(key string, val int)

SetVal -

type SymbolViewerData

type SymbolViewerData struct {
	Code   int
	Symbol string
	Output string
	Color  string
}

type SymbolsViewer

type SymbolsViewer struct {
	MapSymbols map[int]*SymbolViewerData
}

func LoadSymbolsViewer

func LoadSymbolsViewer(fn string) (*SymbolsViewer, error)

func NewSymbolViewerFromPaytables added in v0.12.36

func NewSymbolViewerFromPaytables(paytables *sgc7game.PayTables) *SymbolsViewer

type TriggerFeatureConfig

type TriggerFeatureConfig struct {
	TargetScene                   string         `yaml:"targetScene" json:"targetScene"`                                     // like basicReels.mstery
	Symbol                        string         `yaml:"symbol" json:"symbol"`                                               // like scatter
	Type                          string         `yaml:"type" json:"type"`                                                   // like scatters
	MinNum                        int            `yaml:"minNum" json:"minNum"`                                               // like 3
	WildSymbols                   []string       `yaml:"wildSymbols" json:"wildSymbols"`                                     // wild etc
	WildSymbolCodes               []int          `yaml:"-" json:"-"`                                                         // wild symbolCode
	SIWMSymbols                   []string       `yaml:"SIWMSymbols" json:"SIWMSymbols"`                                     // SIWM就是如果有符号参与中奖考虑倍数,这里是SIWM的图标
	SIWMSymbolCodes               []int          `yaml:"-" json:"-"`                                                         //
	SIWMMul                       int            `yaml:"SIWMMul" json:"SIWMMul"`                                             // 这里是SIWM的倍数
	Scripts                       string         `yaml:"scripts" json:"scripts"`                                             // scripts
	RespinNum                     int            `yaml:"respinNum" json:"respinNum"`                                         // respin number
	RespinNumWeight               string         `yaml:"respinNumWeight" json:"respinNumWeight"`                             // respin number weight
	RespinNumWithScatterNum       map[int]int    `yaml:"respinNumWithScatterNum" json:"respinNumWithScatterNum"`             // respin number with scatter number
	RespinNumWeightWithScatterNum map[int]string `yaml:"respinNumWeightWithScatterNum" json:"respinNumWeightWithScatterNum"` // respin number weight with scatter number
	BetType                       string         `yaml:"betType" json:"betType"`                                             // bet or totalBet
	CountScatterPayAs             string         `yaml:"countScatterPayAs" json:"countScatterPayAs"`                         // countscatter时,按什么符号赔付
	SymbolCodeCountScatterPayAs   int            `yaml:"-" json:"-"`                                                         // countscatter时,按什么符号赔付
	RespinComponent               string         `yaml:"respinComponent" json:"respinComponent"`                             // like fg-spin
	NextComponent                 string         `yaml:"nextComponent" json:"nextComponent"`                                 // next component
	TagSymbolNum                  string         `yaml:"tagSymbolNum" json:"tagSymbolNum"`                                   // 这里可以将symbol数量记下来,别的地方能获取到
	Awards                        []*Award       `yaml:"awards" json:"awards"`                                               // 新的奖励系统
	SymbolAwardsWeights           *AwardsWeights `yaml:"symbolAwardsWeights" json:"symbolAwardsWeights"`                     // 每个中奖符号随机一组奖励
	IsNeedBreak                   bool           `yaml:"isNeedBreak" json:"isNeedBreak"`                                     // 如果触发,需要能break,不继续处理后续的trigger,仅限于当前队列
	PosArea                       []int          `yaml:"posArea" json:"posArea"`                                             // 只在countscatterInArea时生效,[minx,maxx,miny,maxy],当x,y分别符合双闭区间才合法
	IsSaveRetriggerRespinNum      bool           `yaml:"isSaveRetriggerRespinNum" json:"isSaveRetriggerRespinNum"`           // 如果配置了这个,触发respin以后,会将这次的respinnum缓存下来,后面可以直接用
	ForceToNext                   bool           `yaml:"forceToNext" json:"forceToNext"`                                     // 就算触发了respin,也要先执行next分支
	IsUseTriggerRespin2           bool           `yaml:"isUseTriggerRespin2" json:"isUseTriggerRespin2"`                     // 给true就用triggerRespin2
}

TriggerFeatureConfig - configuration for trigger feature

type WaysTrigger added in v0.12.264

type WaysTrigger struct {
	*BasicComponent `json:"-"`
	Config          *WaysTriggerConfig `json:"config"`
}

func (*WaysTrigger) CanTrigger added in v0.12.264

func (waysTrigger *WaysTrigger) CanTrigger(gameProp *GameProperty, gs *sgc7game.GameScene, curpr *sgc7game.PlayResult, stake *sgc7game.Stake, isSaveResult bool) (bool, []*sgc7game.Result)

CanTrigger -

func (*WaysTrigger) GetWinMulti added in v0.12.278

func (waysTrigger *WaysTrigger) GetWinMulti(basicCD *BasicComponentData) int

func (*WaysTrigger) Init added in v0.12.264

func (waysTrigger *WaysTrigger) Init(fn string, pool *GamePropertyPool) error

Init -

func (*WaysTrigger) InitEx added in v0.12.264

func (waysTrigger *WaysTrigger) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*WaysTrigger) NewComponentData added in v0.12.264

func (waysTrigger *WaysTrigger) NewComponentData() IComponentData

NewComponentData -

func (*WaysTrigger) OnAsciiGame added in v0.12.264

func (waysTrigger *WaysTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*WaysTrigger) OnPlayGame added in v0.12.264

func (waysTrigger *WaysTrigger) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*WaysTrigger) OnStats added in v0.12.264

func (waysTrigger *WaysTrigger) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*WaysTrigger) OnStatsWithPB added in v0.12.264

func (waysTrigger *WaysTrigger) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type WaysTriggerConfig added in v0.12.264

type WaysTriggerConfig struct {
	BasicComponentConfig            `yaml:",inline" json:",inline"`
	Symbols                         []string                      `yaml:"symbols" json:"symbols"`                                             // like scatter
	SymbolCodes                     []int                         `yaml:"-" json:"-"`                                                         // like scatter
	ExcludeSymbolCodes              []int                         `yaml:"-" json:"-"`                                                         // 在 lines 和 ways 里有用
	Type                            string                        `yaml:"type" json:"type"`                                                   // like scatters
	TriggerType                     SymbolTriggerType             `yaml:"-" json:"-"`                                                         // SymbolTriggerType
	BetTypeString                   string                        `yaml:"betType" json:"betType"`                                             // bet or totalBet or noPay
	BetType                         BetType                       `yaml:"-" json:"-"`                                                         // bet or totalBet or noPay
	MinNum                          int                           `yaml:"minNum" json:"minNum"`                                               // like 3,countscatter 或 countscatterInArea 或 checkLines 或 checkWays 时生效
	WildSymbols                     []string                      `yaml:"wildSymbols" json:"wildSymbols"`                                     // wild etc
	WildSymbolCodes                 []int                         `yaml:"-" json:"-"`                                                         // wild symbolCode
	StrCheckWinType                 string                        `yaml:"checkWinType" json:"checkWinType"`                                   // left2right or right2left or all
	CheckWinType                    CheckWinType                  `yaml:"-" json:"-"`                                                         //
	WinMulti                        int                           `yaml:"winMulti" json:"winMulti"`                                           // winMulti,最后的中奖倍数,默认为1
	JumpToComponent                 string                        `yaml:"jumpToComponent" json:"jumpToComponent"`                             // jump to
	ForceToNext                     bool                          `yaml:"forceToNext" json:"forceToNext"`                                     // 如果触发,默认跳转jump to,这里可以强制走next分支
	Awards                          []*Award                      `yaml:"awards" json:"awards"`                                               // 新的奖励系统
	SymbolAwardsWeights             *AwardsWeights                `yaml:"symbolAwardsWeights" json:"symbolAwardsWeights"`                     // 每个中奖符号随机一组奖励
	TargetMask                      string                        `yaml:"targetMask" json:"targetMask"`                                       // 如果是scatter这一组判断,可以把结果传递给一个mask
	IsReverse                       bool                          `yaml:"isReverse" json:"isReverse"`                                         // 如果isReverse,表示判定为否才触发
	NeedDiscardResults              bool                          `yaml:"needDiscardResults" json:"needDiscardResults"`                       // 如果needDiscardResults,表示抛弃results
	IsAddRespinMode                 bool                          `yaml:"isAddRespinMode" json:"isAddRespinMode"`                             // 是否是增加respinNum模式,默认是增加triggerNum模式
	RespinNum                       int                           `yaml:"respinNum" json:"respinNum"`                                         // respin number
	RespinNumWeight                 string                        `yaml:"respinNumWeight" json:"respinNumWeight"`                             // respin number weight
	RespinNumWeightVW               *sgc7game.ValWeights2         `yaml:"-" json:"-"`                                                         // respin number weight
	RespinNumWithScatterNum         map[int]int                   `yaml:"respinNumWithScatterNum" json:"respinNumWithScatterNum"`             // respin number with scatter number
	RespinNumWeightWithScatterNum   map[int]string                `yaml:"respinNumWeightWithScatterNum" json:"respinNumWeightWithScatterNum"` // respin number weight with scatter number
	RespinNumWeightWithScatterNumVW map[int]*sgc7game.ValWeights2 `yaml:"-" json:"-"`                                                         // respin number weight with scatter number
}

WaysTriggerConfig - configuration for WaysTrigger 需要特别注意,当判断scatter时,symbols里的符号会当作同一个符号来处理

func (*WaysTriggerConfig) SetLinkComponent added in v0.12.278

func (cfg *WaysTriggerConfig) SetLinkComponent(link string, componentName string)

SetLinkComponent

type WaysTriggerData added in v0.12.264

type WaysTriggerData struct {
	BasicComponentData
	NextComponent string
	SymbolNum     int
	WildNum       int
	RespinNum     int
	Wins          int
	WinMulti      int
}

func (*WaysTriggerData) BuildPBComponentData added in v0.12.264

func (waysTriggerData *WaysTriggerData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*WaysTriggerData) GetVal added in v0.12.264

func (waysTriggerData *WaysTriggerData) GetVal(key string) int

GetVal -

func (*WaysTriggerData) OnNewGame added in v0.12.264

func (waysTriggerData *WaysTriggerData) OnNewGame()

OnNewGame -

func (*WaysTriggerData) OnNewStep added in v0.12.264

func (waysTriggerData *WaysTriggerData) OnNewStep()

OnNewStep -

func (*WaysTriggerData) SetVal added in v0.12.264

func (waysTriggerData *WaysTriggerData) SetVal(key string, val int)

SetVal -

type WeightAwards added in v0.12.264

type WeightAwards struct {
	*BasicComponent `json:"-"`
	Config          *WeightAwardsConfig `json:"config"`
}

func (*WeightAwards) Init added in v0.12.264

func (weightAwards *WeightAwards) Init(fn string, pool *GamePropertyPool) error

Init -

func (*WeightAwards) InitEx added in v0.12.264

func (weightAwards *WeightAwards) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*WeightAwards) NewComponentData added in v0.12.264

func (weightAwards *WeightAwards) NewComponentData() IComponentData

NewComponentData -

func (*WeightAwards) OnAsciiGame added in v0.12.264

func (weightAwards *WeightAwards) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*WeightAwards) OnPlayGame added in v0.12.264

func (weightAwards *WeightAwards) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*WeightAwards) OnStats added in v0.12.264

func (weightAwards *WeightAwards) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type WeightAwardsConfig added in v0.12.264

type WeightAwardsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	AwardWeight          string                `yaml:"awardWeight" json:"awardWeight"`
	AwardWeightVW        *sgc7game.ValWeights2 `json:"-"`
	Awards               [][]*Award            `yaml:"awards" json:"awards"`                       // 新的奖励系统
	Nums                 int                   `yaml:"nums" json:"nums"`                           // how many arards are given
	TargetMask           string                `yaml:"targetMask" json:"targetMask"`               // output for the mask
	ReverseTargetMask    bool                  `yaml:"reverseTargetMask" json:"reverseTargetMask"` // reverse the target mask
}

WeightAwardsConfig - configuration for WeightAwards feature

type WeightAwardsData added in v0.12.264

type WeightAwardsData struct {
	BasicComponentData
	GotIndex []int
}

func (*WeightAwardsData) BuildPBComponentData added in v0.12.264

func (weightAwardsData *WeightAwardsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*WeightAwardsData) OnNewGame added in v0.12.264

func (weightAwardsData *WeightAwardsData) OnNewGame()

OnNewGame -

func (*WeightAwardsData) OnNewStep added in v0.12.264

func (weightAwardsData *WeightAwardsData) OnNewStep()

OnNewStep -

type WeightBranch added in v0.13.17

type WeightBranch struct {
	*BasicComponent `json:"-"`
	Config          *WeightBranchConfig `json:"config"`
}

func (*WeightBranch) Init added in v0.13.17

func (weightBranch *WeightBranch) Init(fn string, pool *GamePropertyPool) error

Init -

func (*WeightBranch) InitEx added in v0.13.17

func (weightBranch *WeightBranch) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*WeightBranch) OnAsciiGame added in v0.13.17

func (weightBranch *WeightBranch) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*WeightBranch) OnPlayGame added in v0.13.17

func (weightBranch *WeightBranch) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*WeightBranch) OnStats added in v0.13.17

func (weightBranch *WeightBranch) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type WeightBranchConfig added in v0.13.17

type WeightBranchConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Weight               string                 `yaml:"weight" json:"weight"`
	WeightVW             *sgc7game.ValWeights2  `json:"-"`
	MapBranchs           map[string]*BranchNode `yaml:"mapBranchs" json:"mapBranchs"` // 可以不用配置全,如果没有配置的,就跳转默认的next
}

WeightBranchConfig - configuration for WeightBranch

type WeightBranchData added in v0.13.17

type WeightBranchData struct {
	BasicComponentData
	Value string
}

func (*WeightBranchData) BuildPBComponentData added in v0.13.17

func (weightBranchData *WeightBranchData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*WeightBranchData) GetVal added in v0.13.17

func (weightBranchData *WeightBranchData) GetVal(key string) int

GetVal -

func (*WeightBranchData) OnNewGame added in v0.13.17

func (weightBranchData *WeightBranchData) OnNewGame()

OnNewGame -

func (*WeightBranchData) OnNewStep added in v0.13.17

func (weightBranchData *WeightBranchData) OnNewStep()

OnNewStep -

func (*WeightBranchData) SetVal added in v0.13.17

func (weightBranchData *WeightBranchData) SetVal(key string, val int)

SetVal -

type WeightChgSymbol added in v0.12.132

type WeightChgSymbol struct {
	*BasicComponent `json:"-"`
	Config          *WeightChgSymbolConfig `json:"config"`
}

func (*WeightChgSymbol) Init added in v0.12.132

func (weightChgSymbol *WeightChgSymbol) Init(fn string, pool *GamePropertyPool) error

Init -

func (*WeightChgSymbol) InitEx added in v0.12.132

func (weightChgSymbol *WeightChgSymbol) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*WeightChgSymbol) OnAsciiGame added in v0.12.132

func (weightChgSymbol *WeightChgSymbol) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*WeightChgSymbol) OnPlayGame added in v0.12.132

func (weightChgSymbol *WeightChgSymbol) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*WeightChgSymbol) OnStats added in v0.12.132

func (weightChgSymbol *WeightChgSymbol) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type WeightChgSymbolConfig added in v0.12.132

type WeightChgSymbolConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	MapChgWeight         map[string]string             `yaml:"mapChgWeight" json:"mapChgWeight"`
	MapChgWeightVW       map[int]*sgc7game.ValWeights2 `yaml:"-" json:"-"`
}

WeightChgSymbolConfig - configuration for WeightChgSymbol feature

type WeightReels added in v0.12.264

type WeightReels struct {
	*BasicComponent `json:"-"`
	Config          *WeightReelsConfig `json:"config"`
}

func (*WeightReels) Init added in v0.12.264

func (weightReels *WeightReels) Init(fn string, pool *GamePropertyPool) error

Init -

func (*WeightReels) InitEx added in v0.12.264

func (weightReels *WeightReels) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*WeightReels) NewComponentData added in v0.12.264

func (weightReels *WeightReels) NewComponentData() IComponentData

NewComponentData -

func (*WeightReels) OnAsciiGame added in v0.12.264

func (weightReels *WeightReels) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*WeightReels) OnPlayGame added in v0.12.264

func (weightReels *WeightReels) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*WeightReels) OnStats added in v0.12.264

func (weightReels *WeightReels) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type WeightReelsConfig added in v0.12.264

type WeightReelsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	ReelSetsWeight       string                `yaml:"reelSetWeight" json:"reelSetWeight"`
	ReelSetsWeightVW     *sgc7game.ValWeights2 `json:"-"`
	IsExpandReel         bool                  `yaml:"isExpandReel" json:"isExpandReel"`
}

BasicReelsConfig - configuration for WeightReels

func (*WeightReelsConfig) SetLinkComponent added in v0.12.278

func (cfg *WeightReelsConfig) SetLinkComponent(link string, componentName string)

SetLinkComponent

type WeightReelsData added in v0.12.264

type WeightReelsData struct {
	BasicComponentData
	ReelSetIndex int // The index of the currently selected reelset
}

func (*WeightReelsData) BuildPBComponentData added in v0.12.264

func (weightReelsData *WeightReelsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*WeightReelsData) OnNewGame added in v0.12.264

func (weightReelsData *WeightReelsData) OnNewGame()

OnNewGame -

func (*WeightReelsData) OnNewStep added in v0.12.264

func (weightReelsData *WeightReelsData) OnNewStep()

OnNewStep -

type WeightTrigger added in v0.10.270

type WeightTrigger struct {
	*BasicComponent `json:"-"`
	Config          *WeightTriggerConfig  `json:"config"`
	WeightSet       *sgc7game.ValWeights2 `json:"-"`
}

func (*WeightTrigger) Init added in v0.10.270

func (weightTrigger *WeightTrigger) Init(fn string, pool *GamePropertyPool) error

Init -

func (*WeightTrigger) InitEx added in v0.12.33

func (weightTrigger *WeightTrigger) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*WeightTrigger) OnAsciiGame added in v0.10.270

func (weightTrigger *WeightTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*WeightTrigger) OnPlayGame added in v0.10.270

func (weightTrigger *WeightTrigger) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*WeightTrigger) OnStats added in v0.10.270

func (weightTrigger *WeightTrigger) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type WeightTrigger2 added in v0.12.230

type WeightTrigger2 struct {
	*BasicComponent `json:"-"`
	Config          *WeightTrigger2Config `json:"config"`
}

func (*WeightTrigger2) Init added in v0.12.230

func (weightTrigger2 *WeightTrigger2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*WeightTrigger2) InitEx added in v0.12.230

func (weightTrigger2 *WeightTrigger2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*WeightTrigger2) OnAsciiGame added in v0.12.230

func (weightTrigger2 *WeightTrigger2) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*WeightTrigger2) OnPlayGame added in v0.12.230

func (weightTrigger2 *WeightTrigger2) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*WeightTrigger2) OnStats added in v0.12.230

func (weightTrigger2 *WeightTrigger2) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

type WeightTrigger2Config added in v0.12.230

type WeightTrigger2Config struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	TriggerWeight        string                `yaml:"triggerWeight" json:"triggerWeight"`
	TriggerWeightVW      *sgc7game.ValWeights2 `json:"-"`
	JumpToComponent      string                `yaml:"jumpToComponent" json:"jumpToComponent"` // jump to
}

WeightTrigger2Config - configuration for WeightTrigger2

type WeightTriggerConfig added in v0.10.270

type WeightTriggerConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	NextComponents       []string `yaml:"nextComponents" json:"nextComponents"`
	RespinNums           []int    `yaml:"respinNums" json:"respinNums"`
	WeightSet            string   `yaml:"weightSet" json:"weightSet"`
	IsUseTriggerRespin2  bool     `yaml:"isUseTriggerRespin2" json:"isUseTriggerRespin2"` // 给true就用triggerRespin2
}

WeightTriggerConfig - configuration for WeightTrigger

type WinResultMulti added in v0.13.8

type WinResultMulti struct {
	*BasicComponent `json:"-"`
	Config          *WinResultMultiConfig `json:"config"`
}

func (*WinResultMulti) GetWinMulti added in v0.13.8

func (winResultMulti *WinResultMulti) GetWinMulti(basicCD *BasicComponentData) int

func (*WinResultMulti) Init added in v0.13.8

func (winResultMulti *WinResultMulti) Init(fn string, pool *GamePropertyPool) error

Init -

func (*WinResultMulti) InitEx added in v0.13.8

func (winResultMulti *WinResultMulti) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*WinResultMulti) NewComponentData added in v0.13.8

func (winResultMulti *WinResultMulti) NewComponentData() IComponentData

NewComponentData -

func (*WinResultMulti) OnAsciiGame added in v0.13.8

func (winResultMulti *WinResultMulti) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap) error

OnAsciiGame - outpur to asciigame

func (*WinResultMulti) OnPlayGame added in v0.13.8

func (winResultMulti *WinResultMulti) OnPlayGame(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
	cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult) error

playgame

func (*WinResultMulti) OnStats added in v0.13.8

func (winResultMulti *WinResultMulti) OnStats(feature *sgc7stats.Feature, stake *sgc7game.Stake, lst []*sgc7game.PlayResult) (bool, int64, int64)

OnStats

func (*WinResultMulti) OnStatsWithPB added in v0.13.8

func (winResultMulti *WinResultMulti) OnStatsWithPB(feature *sgc7stats.Feature, pbComponentData proto.Message, pr *sgc7game.PlayResult) (int64, error)

OnStatsWithPB -

type WinResultMultiConfig added in v0.13.8

type WinResultMultiConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	TargetComponents     []string `yaml:"targetComponents" json:"targetComponents"` // target components
	WinMulti             int      `yaml:"winMulti" json:"winMulti"`                 // winMulti,最后的中奖倍数,默认为1
}

WinResultMultiConfig - configuration for WinResultMulti 需要特别注意,当判断scatter时,symbols里的符号会当作同一个符号来处理

func (*WinResultMultiConfig) SetLinkComponent added in v0.13.8

func (cfg *WinResultMultiConfig) SetLinkComponent(link string, componentName string)

SetLinkComponent

type WinResultMultiData added in v0.13.8

type WinResultMultiData struct {
	BasicComponentData
	Wins     int
	WinMulti int
}

func (*WinResultMultiData) BuildPBComponentData added in v0.13.8

func (winResultMultiData *WinResultMultiData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*WinResultMultiData) GetVal added in v0.13.8

func (winResultMultiData *WinResultMultiData) GetVal(key string) int

GetVal -

func (*WinResultMultiData) OnNewGame added in v0.13.8

func (winResultMultiData *WinResultMultiData) OnNewGame()

OnNewGame -

func (*WinResultMultiData) OnNewStep added in v0.13.8

func (winResultMultiData *WinResultMultiData) OnNewStep()

OnNewStep -

func (*WinResultMultiData) SetVal added in v0.13.8

func (winResultMultiData *WinResultMultiData) SetVal(key string, val int)

SetVal -

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL