lowcode

package
v0.13.177 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 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 (
	CCVReelSet               string = "reelSet"               // 可以修改配置项里的 reelSet
	CCVWeightVal             string = "weightVal"             // 可以修改配置项里的 weightVal
	CCVMapChgWeight          string = "mapChgWeight"          // 可以修改配置项里的 mapChgWeight,这里因为是个map,所以要当成 mapChgWeight:S 这样传递
	CCVTriggerWeight         string = "triggerWeight"         // 可以修改配置项里的 triggerWeight
	CCVRetriggerRespinNum    string = "retriggerRespinNum"    // 可以修改配置项里的 retriggerRespinNum
	CCVWinMulti              string = "winMulti"              // 可以修改配置项里的 winMulti
	CCVSavedMoney            string = "savedMoney"            // 可以修改配置项里的 savedMoney
	CCVSymbolNum             string = "symbolNum"             // 可以修改配置项里的 symbolNum
	CCVInputVal              string = "inputVal"              // 可以修改配置项里的 inputVal
	CCVValueNum              string = "valueNum"              // 可以修改配置项里的 valueNum
	CCVQueue                 string = "queue"                 // 可以修改配置项里的 queue
	CCVLastRespinNum         string = "lastRespinNum"         // 可以修改配置项里的 lastRespinNum
	CCVRetriggerAddRespinNum string = "retriggerAddRespinNum" // 可以修改配置项里的 retriggerAddRespinNum
	CCVLastTriggerNum        string = "lastTriggerNum"        // 可以修改配置项里的 lastTriggerNum
)
View Source
const (
	CVSymbolNum             string = "symbolNum"             // 触发后,中奖的符号数量
	CVWildNum               string = "wildNum"               // 触发后,中奖符号里的wild数量
	CVRespinNum             string = "respinNum"             // 触发后,如果有产生respin的逻辑,这就是最终respin的次数
	CVWins                  string = "wins"                  // 中奖的数值,线注的倍数
	CVCurRespinNum          string = "curRespinNum"          // curRespinNum
	CVCurTriggerNum         string = "curTriggerNum"         // curTriggerNum
	CVLastRespinNum         string = "lastRespinNum"         // lastRespinNum
	CVLastTriggerNum        string = "lastTriggerNum"        // lastTriggerNum
	CVRetriggerAddRespinNum string = "retriggerAddRespinNum" // retriggerAddRespinNum
	CVAvgSymbolValMulti     string = "avgSymbolValMulti"     // avgSymbolValMulti
	CVAvgHeight             string = "avgHeight"             // avgHeight
	CVWinMulti              string = "winMulti"              // winMulti
)
View Source
const (
	FixSymbolsTypeUnknow    int = 0 // unknow
	FixSymbolsTypeMergeDown int = 1 // merge & down
)
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
)
View Source
const (
	SVWDVWins      string = "wins"      // 中奖的数值,线注的倍数
	SVWDVSymbolNum string = "symbolNum" // 符号数量

)
View Source
const AddSymbolsTypeName = "addSymbols"
View Source
const BasicGameModName = "basic"
View Source
const BasicReelsTypeName = "basicReels"
View Source
const CheckSymbolValsTypeName = "checkSymbolVals"
View Source
const ChgSymbolTypeName = "chgSymbol"
View Source
const ChgSymbolValsTypeName = "chgSymbolVals"
View Source
const ChgSymbolsTypeName = "chgSymbols"
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 GenGigaSymbolTypeName = "genGigaSymbol"
View Source
const GenSymbolValsWithPosTypeName = "genSymbolValsWithPos"
View Source
const GenSymbolValsWithSymbolTypeName = "genSymbolValsWithSymbol"
View Source
const IntValMappingTypeName = "intValMapping"
View Source
const (
	LTCVWinMulti string = "winMulti" // 可以修改配置项里的winMulti
)
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 MultiRespinTypeName = "multiRespin"
View Source
const MultiWeightAwardsTypeName = "multiWeightAwards"
View Source
const OverlaySymbolTypeName = "overlaySymbol"
View Source
const PiggyBankTypeName = "piggyBank"
View Source
const PositionCollectionTypeName = "positionCollection"
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 RefillSymbolsTypeName = "refillSymbols"
View Source
const RemoveSymbolsTypeName = "removeSymbols"
View Source
const ReplaceReelTypeName = "replaceReel"
View Source
const ReplaceReelWithMaskTypeName = "replaceReelWithMask"
View Source
const ReplaceSymbolGroupTypeName = "replaceSymbolGroup"
View Source
const ReplaceSymbolTypeName = "replaceSymbol"
View Source
const RespinTypeName = "respin"
View Source
const RollSymbolTypeName = "rollSymbol"
View Source
const (
	STCVWinMulti string = "winMulti" // 可以修改配置项里的winMulti
)
View Source
const ScatterTriggerTypeName = "scatterTrigger"
View Source
const SymbolCollection2TypeName = "symbolCollection2"
View Source
const SymbolModifierTypeName = "symbolModifier"
View Source
const SymbolMultiTypeName = "symbolMulti"
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 (
	WRMCVWinMulti 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 WinResultCacheTypeName = "winResultCache"

发现这个组件没用了,先标记一下

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")

	// ErrInvalidComponentName - invalid component name
	ErrInvalidComponentName = 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")
	// ErrUnsupportedOtherList - unsupported otherList
	ErrUnsupportedOtherList = errors.New("unsupported otherList")

	// 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")

	// ErrInvalidIntValMappingFile - invalid IntValMappingFile
	ErrInvalidIntValMappingFile = errors.New("invalid IntValMappingFile")
	// ErrInvalidIntValMappingValue - invalid IntValMapping value
	ErrInvalidIntValMappingValue = errors.New("invalid IntValMapping value")

	// 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")

	// ErrInvalidCallStackNode - invalid callstack node
	ErrInvalidCallStackNode = errors.New("invalid callstack node")

	// ErrInvalidComponentChildren - invalid component children
	ErrInvalidComponentChildren = errors.New("invalid component children")

	// ErrInvalidForceOutcome2Code - invalid ForceOutcome2 code
	ErrInvalidForceOutcome2Code = errors.New("invalid ForceOutcome2 code")
	// ErrInvalidForceOutcome2ReturnVal - invalid ForceOutcome2 return value
	ErrInvalidForceOutcome2ReturnVal = errors.New("invalid ForceOutcome2 return value")

	// ErrInvalidOtherScene - invalid OtherScene
	ErrInvalidOtherScene = errors.New("invalid OtherScene")

	// ErrInvalidScene - invalid Scene
	ErrInvalidScene = errors.New("invalid Scene")

	// ErrInvalidSetComponent - invalid a set component
	ErrInvalidSetComponent = errors.New("invalid a set component")

	// ErrInvalidScriptParamsNumber - invalid script params number
	ErrInvalidScriptParamsNumber = errors.New("invalid script params number")
	// ErrInvalidScriptParamType - invalid script param type
	ErrInvalidScriptParamType = errors.New("invalid param type")

	// ErrInvalidPosition - invalid position
	ErrInvalidPosition = errors.New("invalid position")

	// ErrInvalidAnyProtoBuf - invalid AnyProtoBuf
	ErrInvalidAnyProtoBuf = errors.New("invalid AnyProtoBuf")
	// ErrInvalidPBComponentData - invalid invalid PB ComponentData
	ErrInvalidPBComponentData = errors.New("invalid PB ComponentData")
	// ErrInvalidFuncNewComponentData - invalid FuncNewComponentData
	ErrInvalidFuncNewComponentData = errors.New("invalid FuncNewComponentData")
	// ErrInvalidAnypbTypeURL - invalid anypb TypeURL
	ErrInvalidAnypbTypeURL = errors.New("invalid anypb TypeURL")
)
View Source
var MapProperty map[string]int

Functions

func CmpVal added in v0.13.175

func CmpVal(src int, op string, target int) bool

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 GetSymbolValMultiFunc added in v0.13.137

func GetSymbolValMultiFunc(t OtherSceneMultiType) sgc7game.FuncCalcMulti

func HasSamePos added in v0.13.175

func HasSamePos(src []int, target []int) bool

func InsSliceNonRep added in v0.13.39

func InsSliceNonRep(arr []string, src []string) []string

func InsStringSliceNonRep added in v0.13.39

func InsStringSliceNonRep(arr []string, str string) []string

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 PowInt added in v0.13.137

func PowInt(v int, n int) int

func SetAllowForceOutcome added in v0.13.11

func SetAllowForceOutcome(maxTry int)

func SetAllowStatsV2 added in v0.13.8

func SetAllowStatsV2()

func SetRTPMode added in v0.13.135

func SetRTPMode()

SetRTPMode - rtp mode

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, funcNewRNG FuncNewRNG, wincap int64) error

func StartRTPWithData added in v0.13.106

func StartRTPWithData(gamecfg []byte, icore int, ispinnums int64, bet int64, ontimer sgc7rtp.FuncOnRTPTimer, funcNewRNG FuncNewRNG) (*stats2.Stats, error)

func String2Property

func String2Property(str string) (int, error)

Types

type AddSymbols added in v0.13.47

type AddSymbols struct {
	*BasicComponent `json:"-"`
	Config          *AddSymbolsConfig `json:"config"`
}

func (*AddSymbols) Init added in v0.13.47

func (addSymbols *AddSymbols) Init(fn string, pool *GamePropertyPool) error

Init -

func (*AddSymbols) InitEx added in v0.13.47

func (addSymbols *AddSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*AddSymbols) OnAsciiGame added in v0.13.47

func (addSymbols *AddSymbols) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*AddSymbols) OnPlayGame added in v0.13.47

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

playgame

type AddSymbolsConfig added in v0.13.47

type AddSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Symbol               string                `yaml:"symbol" json:"symbol"`
	SymbolCode           int                   `yaml:"-" json:"-"`
	SymbolNum            int                   `yaml:"symbolNum" json:"symbolNum"`
	SymbolNumWeight      string                `yaml:"symbolNumWeight" json:"symbolNumWeight"`
	SymbolNumWeightVW    *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	IgnoreSymbols        []string              `yaml:"ignoreSymbols" json:"ignoreSymbols"`
	IgnoreSymbolCodes    []int                 `yaml:"-" json:"-"`
}

AddSymbolsConfig - configuration for AddSymbols

func (*AddSymbolsConfig) SetLinkComponent added in v0.13.47

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

SetLinkComponent

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) AddPos added in v0.13.89

func (basicComponent *BasicComponent) AddPos(cd IComponentData, x int, y int)

AddPos -

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) CanTriggerWithScene added in v0.13.39

func (basicComponent *BasicComponent) CanTriggerWithScene(gameProp *GameProperty, gs *sgc7game.GameScene, curpr *sgc7game.PlayResult, stake *sgc7game.Stake) (bool, []*sgc7game.Result)

CanTriggerWithScene -

func (*BasicComponent) ClearOtherScene added in v0.12.220

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

ClearOtherScene -

func (*BasicComponent) EachSymbols added in v0.13.39

func (basicComponent *BasicComponent) EachSymbols(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin, ps sgc7game.IPlayerState, stake *sgc7game.Stake,
	prs []*sgc7game.PlayResult, cd IComponentData) error

EachSymbols - foreach symbols

func (*BasicComponent) EachUsedResults

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

EachUsedResults -

func (*BasicComponent) GetAllLinkComponents added in v0.13.39

func (basicComponent *BasicComponent) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*BasicComponent) GetChildLinkComponents added in v0.13.99

func (basicComponent *BasicComponent) GetChildLinkComponents() []string

GetChildLinkComponents - get child link components

func (*BasicComponent) GetName added in v0.10.285

func (basicComponent *BasicComponent) GetName() string

GetName -

func (*BasicComponent) GetNextLinkComponents added in v0.13.99

func (basicComponent *BasicComponent) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

func (*BasicComponent) GetTargetOtherScene3 added in v0.13.78

func (basicComponent *BasicComponent) GetTargetOtherScene3(gameProp *GameProperty, curpr *sgc7game.PlayResult, prs []*sgc7game.PlayResult, si int) *sgc7game.GameScene

func (*BasicComponent) GetTargetScene3 added in v0.12.272

func (basicComponent *BasicComponent) GetTargetScene3(gameProp *GameProperty, curpr *sgc7game.PlayResult, prs []*sgc7game.PlayResult, si int) *sgc7game.GameScene

func (*BasicComponent) Init added in v0.13.39

func (basicComponent *BasicComponent) Init(fn string, pool *GamePropertyPool) error

Init -

func (*BasicComponent) InitEx added in v0.13.39

func (basicComponent *BasicComponent) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*BasicComponent) IsForeach added in v0.13.99

func (basicComponent *BasicComponent) IsForeach() bool

IsForeach -

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(parent string) *stats2.Feature

NewStats2 -

func (*BasicComponent) OnAsciiGame added in v0.13.39

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

OnAsciiGame - outpur to asciigame

func (*BasicComponent) OnGameInited added in v0.13.39

func (basicComponent *BasicComponent) OnGameInited(components *ComponentList) error

OnGameInited - on game inited

func (*BasicComponent) OnPlayGame added in v0.13.39

func (basicComponent *BasicComponent) 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

OnPlayGame - on playgame

func (*BasicComponent) OnPlayGameWithSet added in v0.13.143

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

OnPlayGameWithSet - on playgame with a set

func (*BasicComponent) OnStats2 added in v0.13.8

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

OnStats2

func (*BasicComponent) ProcRespinOnStepEnd added in v0.13.99

func (basicComponent *BasicComponent) ProcRespinOnStepEnd(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, cd IComponentData, canRemove bool) (string, error)

ProcRespinOnStepEnd - 现在只有respin需要特殊处理结束,如果多层respin嵌套时,只要新的有next,就不会继续结束respin

func (*BasicComponent) SetMask added in v0.12.155

func (basicComponent *BasicComponent) SetMask(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, cd IComponentData, mask []bool) error

SetMask -

func (*BasicComponent) SetMaskOnlyTrue added in v0.13.39

func (basicComponent *BasicComponent) SetMaskOnlyTrue(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, cd IComponentData, mask []bool) error

SetMaskOnlyTrue -

func (*BasicComponent) SetMaskVal added in v0.13.39

func (basicComponent *BasicComponent) SetMaskVal(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, cd IComponentData, index int, mask bool) error

SetMaskVal -

type BasicComponentConfig

type BasicComponentConfig struct {
	DefaultNextComponent string            `yaml:"defaultNextComponent" json:"defaultNextComponent"` // next component, if it is empty jump to ending
	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"`                           // 组件类型
	TargetScenes3        [][]string        `yaml:"targetScenes3" json:"targetScenes3"`               // target scenes V3
	TargetOtherScenes3   [][]string        `yaml:"targetOtherScenes3" json:"targetOtherScenes3"`     // target scenes V3
}

新思路:尽量弱化变量的概念,所有变量都放到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
	Output                int
	StrOutput             string
}

func (*BasicComponentData) AddPos added in v0.13.89

func (basicComponentData *BasicComponentData) AddPos(x int, y int)

AddPos -

func (*BasicComponentData) AddRespinTimes added in v0.13.39

func (basicComponentData *BasicComponentData) AddRespinTimes(num int)

AddRespinTimes -

func (*BasicComponentData) AddSymbol added in v0.13.39

func (basicComponentData *BasicComponentData) AddSymbol(symbolCode int)

AddSymbol -

func (*BasicComponentData) AddTriggerRespinAward added in v0.13.39

func (basicComponentData *BasicComponentData) AddTriggerRespinAward(award *Award)

AddTriggerRespinAward -

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) ChgMask added in v0.13.39

func (basicComponentData *BasicComponentData) ChgMask(curMask int, val bool) bool

ChgMask -

func (*BasicComponentData) ClearConfigIntVal added in v0.13.67

func (basicComponentData *BasicComponentData) ClearConfigIntVal(key string)

ClearConfigIntVal -

func (*BasicComponentData) Clone added in v0.13.170

func (basicComponentData *BasicComponentData) Clone() IComponentData

Clone

func (*BasicComponentData) CloneBasicComponentData added in v0.13.170

func (basicComponentData *BasicComponentData) CloneBasicComponentData() BasicComponentData

Clone

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) GetLastRespinNum added in v0.13.39

func (basicComponentData *BasicComponentData) GetLastRespinNum() int

GetLastRespinNum -

func (*BasicComponentData) GetMask added in v0.13.39

func (basicComponentData *BasicComponentData) GetMask() []bool

GetMask -

func (*BasicComponentData) GetOutput added in v0.13.57

func (basicComponentData *BasicComponentData) GetOutput() int

GetOutput -

func (*BasicComponentData) GetPos added in v0.13.89

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

GetPos -

func (*BasicComponentData) GetResults added in v0.13.8

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

GetResults -

func (*BasicComponentData) GetStringOutput added in v0.13.57

func (basicComponentData *BasicComponentData) GetStringOutput() string

GetStringOutput -

func (*BasicComponentData) GetSymbols added in v0.13.39

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

GetSymbols -

func (*BasicComponentData) GetVal added in v0.12.225

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

GetVal -

func (*BasicComponentData) HasPos added in v0.13.89

func (basicComponentData *BasicComponentData) HasPos(x int, y int) bool

HasPos -

func (*BasicComponentData) IsRespinEnding added in v0.13.39

func (basicComponentData *BasicComponentData) IsRespinEnding() bool

IsRespinEnding -

func (*BasicComponentData) IsRespinStarted added in v0.13.39

func (basicComponentData *BasicComponentData) IsRespinStarted() bool

IsRespinStarted -

func (*BasicComponentData) LoadPB added in v0.13.170

func (basicComponentData *BasicComponentData) LoadPB(pb *anypb.Any) error

LoadPB

func (*BasicComponentData) LoadPBComponentData added in v0.13.170

func (basicComponentData *BasicComponentData) LoadPBComponentData(pb *sgc7pb.ComponentData) error

LoadPB

func (*BasicComponentData) OnNewGame

func (basicComponentData *BasicComponentData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*BasicComponentData) PushTriggerRespin added in v0.13.39

func (basicComponentData *BasicComponentData) PushTriggerRespin(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, num int)

PushTrigger -

func (*BasicComponentData) PutInMoney added in v0.13.49

func (basicComponentData *BasicComponentData) PutInMoney(coins int)

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 -

func (*BasicComponentData) TriggerRespin added in v0.13.39

func (basicComponentData *BasicComponentData) TriggerRespin(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams)

TriggerRespin

type BasicGameMod

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

BasicGameMod - basic gamemod

func NewBasicGameMod2 added in v0.12.36

func NewBasicGameMod2(pool *GamePropertyPool, 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, curPlugin sgc7plugin.IPlugin) 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 BasicRNG added in v0.13.135

type BasicRNG struct {
	// contains filtered or unexported fields
}

func (*BasicRNG) GetCurRNG added in v0.13.135

func (rng *BasicRNG) GetCurRNG(componentName string) (bool, int, sgc7plugin.IPlugin)

GetCurRNG -

func (*BasicRNG) OnNewGame added in v0.13.135

func (rng *BasicRNG) OnNewGame(plugin sgc7plugin.IPlugin) error

OnNewGame -

type BasicReels

type BasicReels struct {
	*BasicComponent `json:"-"`
	Config          *BasicReelsConfig `json:"config"`
}

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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

type BasicReelsConfig

type BasicReelsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	ReelSet              string   `yaml:"reelSet" json:"reelSet"`
	IsExpandReel         bool     `yaml:"isExpandReel" json:"isExpandReel"`
	Awards               []*Award `yaml:"awards" json:"awards"` // 新的奖励系统
}

BasicReelsConfig - configuration for BasicReels

func (*BasicReelsConfig) SetLinkComponent added in v0.12.278

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

SetLinkComponent

type BetConfig added in v0.13.117

type BetConfig struct {
	Bet            int                `yaml:"bet"`
	TotalBetInWins int                `yaml:"totalBetInWins"`
	Start          string             `yaml:"start"`
	Components     []*ComponentConfig `yaml:"components"`

	ForceEnding string `yaml:"-"`
	// contains filtered or unexported fields
}

func (*BetConfig) Reset added in v0.13.164

func (betCfg *BetConfig) Reset(start string, end string)

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 BranchNode added in v0.13.17

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

BranchNode -

type CallStack added in v0.13.39

type CallStack struct {
	// contains filtered or unexported fields
}

func NewCallStack added in v0.13.39

func NewCallStack() *CallStack

func (*CallStack) ComponentDone added in v0.13.39

func (cs *CallStack) ComponentDone(gameProp *GameProperty, component IComponent, cd IComponentData)

func (*CallStack) Each added in v0.13.39

func (cs *CallStack) Each(gameProp *GameProperty, onEach FuncOnEachHistoryComponent) error

func (*CallStack) GetComponentData added in v0.13.39

func (cs *CallStack) GetComponentData(gameProp *GameProperty, ic IComponent) IComponentData

func (*CallStack) GetComponentNum added in v0.13.39

func (cs *CallStack) GetComponentNum() int

func (*CallStack) GetCurCallStackSymbol added in v0.13.39

func (cs *CallStack) GetCurCallStackSymbol() int

func (*CallStack) GetCurComponentData added in v0.13.39

func (cs *CallStack) GetCurComponentData(gameProp *GameProperty, ic IComponent) IComponentData

func (*CallStack) GetGlobalComponentData added in v0.13.39

func (cs *CallStack) GetGlobalComponentData(gameProp *GameProperty, ic IComponent) IComponentData

GetGlobalComponentData -

func (*CallStack) IsInCurCallStack added in v0.13.39

func (cs *CallStack) IsInCurCallStack(componentName string) bool

func (*CallStack) OnCallEnd added in v0.13.39

func (cs *CallStack) OnCallEnd(ic IComponent, cd IComponentData) string

func (*CallStack) OnNewGame added in v0.13.39

func (cs *CallStack) OnNewGame()

func (*CallStack) OnNewStep added in v0.13.39

func (cs *CallStack) OnNewStep()

func (*CallStack) StartEachSymbols added in v0.13.39

func (cs *CallStack) StartEachSymbols(gameProp *GameProperty, component IComponent, children []string, symbolCode int, i int) error

type CheckSymbolVals added in v0.13.89

type CheckSymbolVals struct {
	*BasicComponent `json:"-"`
	Config          *CheckSymbolValsConfig `json:"config"`
}

func (*CheckSymbolVals) Init added in v0.13.89

func (checkSymbolVals *CheckSymbolVals) Init(fn string, pool *GamePropertyPool) error

Init -

func (*CheckSymbolVals) InitEx added in v0.13.89

func (checkSymbolVals *CheckSymbolVals) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*CheckSymbolVals) OnAsciiGame added in v0.13.89

func (checkSymbolVals *CheckSymbolVals) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*CheckSymbolVals) OnPlayGame added in v0.13.89

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

playgame

type CheckSymbolValsConfig added in v0.13.89

type CheckSymbolValsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string              `yaml:"type" json:"type"`
	Type                 CheckSymbolValsType `yaml:"-" json:"-"`
	Value                int                 `yaml:"value" json:"value"`
	Min                  int                 `yaml:"min" json:"min"`
	Max                  int                 `yaml:"max" json:"max"`
	OutputToComponent    string              `yaml:"outputToComponent" json:"outputToComponent"`
}

CheckSymbolValsConfig - configuration for CheckSymbolVals

func (*CheckSymbolValsConfig) SetLinkComponent added in v0.13.89

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

SetLinkComponent

type CheckSymbolValsType added in v0.13.89

type CheckSymbolValsType int
const (
	CSVTypeEqu        CheckSymbolValsType = 0 // ==
	CSVTypeGreaterEqu CheckSymbolValsType = 1 // >=
	CSVTypeLessEqu    CheckSymbolValsType = 2 // <=
	CSVTypeGreater    CheckSymbolValsType = 3 // >
	CSVTypeLess       CheckSymbolValsType = 4 // <
	CSVTypeInAreaLR   CheckSymbolValsType = 5 // In [min, max]
	CSVTypeInAreaR    CheckSymbolValsType = 6 // In (min, max]
	CSVTypeInAreaL    CheckSymbolValsType = 7 // In [min, max)
	CSVTypeInArea     CheckSymbolValsType = 8 // In (min, max)
)

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
	// CheckWinTypeCount - count
	CheckWinTypeCount CheckWinType = 3
)

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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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 ChgSymbolVals added in v0.13.89

type ChgSymbolVals struct {
	*BasicComponent `json:"-"`
	Config          *ChgSymbolValsConfig `json:"config"`
}

func (*ChgSymbolVals) Init added in v0.13.89

func (chgSymbolVals *ChgSymbolVals) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ChgSymbolVals) InitEx added in v0.13.89

func (chgSymbolVals *ChgSymbolVals) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ChgSymbolVals) NewComponentData added in v0.13.175

func (chgSymbolVals *ChgSymbolVals) NewComponentData() IComponentData

NewComponentData -

func (*ChgSymbolVals) OnAsciiGame added in v0.13.89

func (chgSymbolVals *ChgSymbolVals) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*ChgSymbolVals) OnPlayGame added in v0.13.89

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

playgame

type ChgSymbolValsConfig added in v0.13.89

type ChgSymbolValsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string                  `yaml:"type" json:"type"`
	Type                 ChgSymbolValsType       `yaml:"-" json:"-"`
	StrSourceType        string                  `yaml:"sourceType" json:"sourceType"`
	SourceType           ChgSymbolValsSourceType `yaml:"-" json:"-"`
	PositionCollection   string                  `yaml:"positionCollection" json:"positionCollection"`
	WinResultComponents  []string                `yaml:"winResultComponents" json:"winResultComponents"`
	MaxNumber            int                     `yaml:"maxNumber" json:"maxNumber"`
	MaxVal               int                     `yaml:"maxVal" json:"maxVal"`
	MinVal               int                     `yaml:"minVal" json:"minVal"`
}

ChgSymbolValsConfig - configuration for ChgSymbolVals

func (*ChgSymbolValsConfig) SetLinkComponent added in v0.13.89

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

SetLinkComponent

type ChgSymbolValsData added in v0.13.175

type ChgSymbolValsData struct {
	BasicComponentData
	PosComponentData
}

func (*ChgSymbolValsData) AddPos added in v0.13.177

func (chgSymbolValsData *ChgSymbolValsData) AddPos(x, y int)

AddPos -

func (*ChgSymbolValsData) BuildPBComponentData added in v0.13.175

func (chgSymbolValsData *ChgSymbolValsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*ChgSymbolValsData) Clone added in v0.13.175

func (chgSymbolValsData *ChgSymbolValsData) Clone() IComponentData

Clone

func (*ChgSymbolValsData) GetPos added in v0.13.175

func (chgSymbolValsData *ChgSymbolValsData) GetPos() []int

GetPos -

func (*ChgSymbolValsData) OnNewGame added in v0.13.175

func (chgSymbolValsData *ChgSymbolValsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type ChgSymbolValsSourceType added in v0.13.89

type ChgSymbolValsSourceType int
const (
	CSVSTypePositionCollection ChgSymbolValsSourceType = 0 // positionCollection
	CSVSTypeWinResult          ChgSymbolValsSourceType = 1 // winResult
)

type ChgSymbolValsType added in v0.13.89

type ChgSymbolValsType int
const (
	CSVTypeInc ChgSymbolValsType = 0 // ++
	CSVTypeDec ChgSymbolValsType = 1 // --
)

type ChgSymbols added in v0.13.89

type ChgSymbols struct {
	*BasicComponent `json:"-"`
	Config          *ChgSymbolsConfig `json:"config"`
}

func (*ChgSymbols) GetAllLinkComponents added in v0.13.99

func (chgSymbols *ChgSymbols) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*ChgSymbols) GetNextLinkComponents added in v0.13.99

func (chgSymbols *ChgSymbols) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

func (*ChgSymbols) Init added in v0.13.89

func (chgSymbols *ChgSymbols) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ChgSymbols) InitEx added in v0.13.89

func (chgSymbols *ChgSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ChgSymbols) OnAsciiGame added in v0.13.89

func (chgSymbols *ChgSymbols) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*ChgSymbols) OnPlayGame added in v0.13.89

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

playgame

type ChgSymbolsConfig added in v0.13.89

type ChgSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Symbols              []string              `yaml:"symbols" json:"symbols"`
	SymbolCodes          []int                 `yaml:"-" json:"-"`
	BlankSymbol          string                `yaml:"blankSymbol" json:"blankSymbol"`
	BlankSymbolCode      int                   `yaml:"-" json:"-"`
	Weight               string                `yaml:"weight" json:"weight"`
	WeightVW2            *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	Controllers          []*Award              `yaml:"controllers" json:"controllers"`
	JumpToComponent      string                `yaml:"jumpToComponent" json:"jumpToComponent"`
}

ChgSymbolsConfig - configuration for ChgSymbols

func (*ChgSymbolsConfig) SetLinkComponent added in v0.13.89

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

SetLinkComponent

type ClusterTrigger added in v0.13.8

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

func (*ClusterTrigger) CanTriggerWithScene added in v0.13.39

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

CanTriggerWithScene -

func (*ClusterTrigger) GetAllLinkComponents added in v0.13.39

func (clusterTrigger *ClusterTrigger) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*ClusterTrigger) GetNextLinkComponents added in v0.13.99

func (clusterTrigger *ClusterTrigger) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

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) NewStats2 added in v0.13.103

func (clusterTrigger *ClusterTrigger) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*ClusterTrigger) OnAsciiGame added in v0.13.8

func (clusterTrigger *ClusterTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

func (*ClusterTrigger) OnStats2 added in v0.13.103

func (clusterTrigger *ClusterTrigger) OnStats2(icd IComponentData, s2 *stats2.Cache)

OnStats2

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
	Type                            string                        `yaml:"type" json:"type"`                                                   // like scatters
	TriggerType                     SymbolTriggerType             `yaml:"-" json:"-"`                                                         // SymbolTriggerType
	OSMulTypeString                 string                        `yaml:"symbolValsMulti" json:"symbolValsMulti"`                             // OtherSceneMultiType
	OSMulType                       OtherSceneMultiType           `yaml:"-" json:"-"`                                                         // OtherSceneMultiType
	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
	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"`                                               // 新的奖励系统
	IsReverse                       bool                          `yaml:"isReverse" json:"isReverse"`                                         // 如果isReverse,表示判定为否才触发
	PiggyBankComponent              string                        `yaml:"piggyBankComponent" json:"piggyBankComponent"`                       // piggyBank component
	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
	PosComponentData
	NextComponent     string
	SymbolNum         int
	WildNum           int
	RespinNum         int
	Wins              int
	WinMulti          int
	AvgSymbolValMulti int // 平均的symbolVal倍数,用整数来表达浮点数,100是1倍
}

func (*ClusterTriggerData) AddPos added in v0.13.177

func (clusterTriggerData *ClusterTriggerData) AddPos(x, y int)

AddPos -

func (*ClusterTriggerData) BuildPBComponentData added in v0.13.8

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

BuildPBComponentData

func (*ClusterTriggerData) Clone added in v0.13.170

func (clusterTriggerData *ClusterTriggerData) Clone() IComponentData

Clone

func (*ClusterTriggerData) GetPos added in v0.13.175

func (clusterTriggerData *ClusterTriggerData) GetPos() []int

GetPos -

func (*ClusterTriggerData) GetVal added in v0.13.8

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

GetVal -

func (*ClusterTriggerData) LoadPB added in v0.13.170

func (clusterTriggerData *ClusterTriggerData) LoadPB(pb *anypb.Any) error

LoadPB

func (*ClusterTriggerData) OnNewGame added in v0.13.8

func (clusterTriggerData *ClusterTriggerData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

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) 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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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"`
	IsCycle              bool             `yaml:"isCycle" json:"isCycle"`
}

CollectorConfig - configuration for Collector

func (*CollectorConfig) SetLinkComponent added in v0.13.25

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

SetLinkComponent

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) Clone added in v0.13.170

func (collectorData *CollectorData) Clone() IComponentData

Clone

func (*CollectorData) OnNewGame

func (collectorData *CollectorData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*CollectorData) SetConfigIntVal added in v0.13.160

func (collectorData *CollectorData) SetConfigIntVal(key string, val int)

SetConfigIntVal -

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
	// contains filtered or unexported fields
}

func NewComponentList

func NewComponentList() *ComponentList

func (*ComponentList) AddComponent

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

func (*ComponentList) GetAllLinkComponents added in v0.13.39

func (lst *ComponentList) GetAllLinkComponents(componentName string) []string

GetAllLinkComponents - get all link components

type ComponentMgr

type ComponentMgr struct {
	MapComponent     map[string]FuncNewComponent
	MapComponentData map[string]FuncNewComponentData // 未写完,写了一半,觉得clone效率更高,后续如果确定需要要再写
}

func NewComponentMgr

func NewComponentMgr() *ComponentMgr

func (*ComponentMgr) LoadPB added in v0.13.170

func (mgr *ComponentMgr) LoadPB(pb *anypb.Any) (IComponentData, error)

LoadPB

func (*ComponentMgr) NewComponent

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

func (*ComponentMgr) Reg

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

func (*ComponentMgr) RegComponentData added in v0.13.170

func (mgr *ComponentMgr) RegComponentData(pbtype string, funcNewComponentData FuncNewComponentData)

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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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:"-"`
	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"`
	StatsSymbols      []string                       `yaml:"statsSymbols"`
	StatsSymbolCodes  []mathtoolset.SymbolType       `yaml:"-"`
	MainPath          string                         `yaml:"mainPath"`
	MapCmdComponent   map[string]string              `yaml:"mapCmdComponent"`
	ComponentsMapping map[int]map[string]string      `yaml:"componentsMapping"`
	MapBetConfigs     map[int]*BetConfig             `yaml:"mapBetConfigs"`
	// contains filtered or unexported fields
}

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

func (*Config) Reset added in v0.13.164

func (cfg *Config) Reset(bet int, start string, end 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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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

DropDownSymbolsConfig - configuration for DropDownSymbols

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

SetLinkComponent

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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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 (*ForceOutcome) IsValid added in v0.13.11

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

type ForceOutcome2 added in v0.13.126

type ForceOutcome2 struct {
	// contains filtered or unexported fields
}

ForceOutcome2 - 通过 results 来分析数据,所以只能做为临时变量用

func NewForceOutcome2 added in v0.13.126

func NewForceOutcome2(code string) (*ForceOutcome2, error)

func ProcCheat added in v0.13.11

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

ProcCheat -

func (*ForceOutcome2) CalcVal added in v0.13.127

func (fo2 *ForceOutcome2) CalcVal(results []*sgc7game.PlayResult) int

func (*ForceOutcome2) IsValid added in v0.13.126

func (fo2 *ForceOutcome2) IsValid(results []*sgc7game.PlayResult) bool

func (*ForceOutcome2) SetScript added in v0.13.126

func (fo2 *ForceOutcome2) SetScript(code string) error

type ForeachSymbolData added in v0.13.39

type ForeachSymbolData struct {
	SymbolCode int
	Index      int
}

type FuncLoadComponentInJson added in v0.13.164

type FuncLoadComponentInJson func(gamecfg *BetConfig, cell *ast.Node) (string, error)

type FuncNewComponent

type FuncNewComponent func(name string) IComponent

type FuncNewComponentData added in v0.13.170

type FuncNewComponentData func() IComponentData

type FuncNewRNG added in v0.13.135

type FuncNewRNG func() IRNG

type FuncOnEachHistoryComponent added in v0.13.39

type FuncOnEachHistoryComponent func(tag string, gameProp *GameProperty, ic IComponent, cd IComponentData) error

FuncOnEachHistoryComponent -

type FuncOnEachUsedResult

type FuncOnEachUsedResult func(*sgc7game.Result)

type Game

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

Game - game

func NewGame2 added in v0.12.31

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

func NewGame2WithData added in v0.12.57

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

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) Init2 added in v0.12.36

func (game *Game) Init2(cfg *Config, funcNewRNG FuncNewRNG) error

Init - initial game

func (*Game) Initialize added in v0.13.120

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

Initialize - initialize PlayerState

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 GameParams

type GameParams struct {
	sgc7pb.GameParam `json:",inline"`
	LastScene        *sgc7game.GameScene       `json:"-"`
	LastOtherScene   *sgc7game.GameScene       `json:"-"`
	MapComponentData map[string]IComponentData `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

	RespinComponents []string
	PoolScene        *sgc7game.GameScenePoolEx
	Components       *ComponentList
	SceneStack       *SceneStack
	OtherSceneStack  *SceneStack
	// contains filtered or unexported fields
}

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) 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) GetComponentData added in v0.13.39

func (gameProp *GameProperty) GetComponentData(icomponent IComponent) IComponentData

func (*GameProperty) GetComponentDataWithName added in v0.13.39

func (gameProp *GameProperty) GetComponentDataWithName(componentName string) IComponentData

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) GetComponentVal2 added in v0.13.126

func (gameProp *GameProperty) GetComponentVal2(component string, val string) (int, error)

func (*GameProperty) GetCurCallStackSymbol added in v0.13.39

func (gameProp *GameProperty) GetCurCallStackSymbol() int

func (*GameProperty) GetCurComponentData added in v0.13.39

func (gameProp *GameProperty) GetCurComponentData(ic IComponent) IComponentData

func (*GameProperty) GetCurComponentDataWithName added in v0.13.39

func (gameProp *GameProperty) GetCurComponentDataWithName(componentName string) IComponentData

func (*GameProperty) GetGlobalComponentData added in v0.13.39

func (gameProp *GameProperty) GetGlobalComponentData(icomponent IComponent) IComponentData

func (*GameProperty) GetGlobalComponentDataWithName added in v0.13.39

func (gameProp *GameProperty) GetGlobalComponentDataWithName(componentName string) IComponentData

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) GetMask added in v0.13.39

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

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) IsEndingRespin added in v0.12.234

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

func (*GameProperty) IsInCurCallStack added in v0.13.39

func (gameProp *GameProperty) IsInCurCallStack(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) OnCallEnd added in v0.13.39

func (gameProp *GameProperty) OnCallEnd(component IComponent, cd IComponentData, gp *GameParams)

func (*GameProperty) OnNewGame added in v0.10.285

func (gameProp *GameProperty) OnNewGame(stake *sgc7game.Stake, curPlugin sgc7plugin.IPlugin) error

func (*GameProperty) OnNewStep

func (gameProp *GameProperty) OnNewStep() error

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) 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)

func (*GameProperty) UseComponent added in v0.13.125

func (gameProp *GameProperty) UseComponent(componentName string)

type GamePropertyPool

type GamePropertyPool struct {
	MapGamePropPool  map[int]*sync.Pool
	Config           *Config
	DefaultPaytables *sgc7game.PayTables
	DefaultLineData  *sgc7game.LineData
	SymbolsViewer    *SymbolsViewer
	MapSymbolColor   *asciigame.SymbolColorMap
	// 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) LoadIntMapping added in v0.13.57

func (pool *GamePropertyPool) LoadIntMapping(fn string) *sgc7game.ValMapping2

LoadSymbolWeights - load xlsx file

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) 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 GenGigaSymbol added in v0.13.78

type GenGigaSymbol struct {
	*BasicComponent `json:"-"`
	Config          *GenGigaSymbolConfig `json:"config"`
}

func (*GenGigaSymbol) Init added in v0.13.78

func (genGigaSymbol *GenGigaSymbol) Init(fn string, pool *GamePropertyPool) error

Init -

func (*GenGigaSymbol) InitEx added in v0.13.78

func (genGigaSymbol *GenGigaSymbol) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*GenGigaSymbol) OnAsciiGame added in v0.13.78

func (genGigaSymbol *GenGigaSymbol) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*GenGigaSymbol) OnPlayGame added in v0.13.78

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

playgame

type GenGigaSymbolConfig added in v0.13.78

type GenGigaSymbolConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string            `yaml:"symbol" json:"type"`
	Type                 GenGigaSymbolType `yaml:"-" json:"-"`
	GigaWidth            int               `yaml:"gigaWidth" json:"gigaWidth"`
	GigaHeight           int               `yaml:"gigaHeight" json:"gigaHeight"`
	Number               int               `yaml:"number" json:"number"`
	Symbol               string            `yaml:"symbol" json:"symbol"`
	SymbolCode           int               `yaml:"-" json:"-"`
	ExcludeSymbols       []string          `yaml:"excludeSymbols" json:"excludeSymbols"`
	ExcludeSymbolCodes   []int             `yaml:"-" json:"-"`
}

GenGigaSymbolConfig - configuration for GenGigaSymbol

func (*GenGigaSymbolConfig) SetLinkComponent added in v0.13.78

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

SetLinkComponent

type GenGigaSymbolType added in v0.13.78

type GenGigaSymbolType int
const (
	GGSTypeOverwrite GenGigaSymbolType = 0
	GGSTypeExpand    GenGigaSymbolType = 1
)

type GenSymbolValsWithPos added in v0.13.78

type GenSymbolValsWithPos struct {
	*BasicComponent `json:"-"`
	Config          *GenSymbolValsWithPosConfig `json:"config"`
}

func (*GenSymbolValsWithPos) Init added in v0.13.78

func (genSymbolValsWithPos *GenSymbolValsWithPos) Init(fn string, pool *GamePropertyPool) error

Init -

func (*GenSymbolValsWithPos) InitEx added in v0.13.78

func (genSymbolValsWithPos *GenSymbolValsWithPos) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*GenSymbolValsWithPos) OnAsciiGame added in v0.13.78

func (genSymbolValsWithPos *GenSymbolValsWithPos) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*GenSymbolValsWithPos) OnPlayGame added in v0.13.78

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

playgame

type GenSymbolValsWithPosConfig added in v0.13.78

type GenSymbolValsWithPosConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	TargetComponents     []string                 `yaml:"targetComponents" json:"targetComponents"`
	StrType              string                   `yaml:"genType" json:"genType"`
	Type                 GenSymbolValsWithPosType `yaml:"-" json:"-"`
	ValMapping           string                   `yaml:"valMapping" json:"valMapping"`
	ValMappingVM         *sgc7game.ValMapping2    `yaml:"-" json:"-"`
	IsUseSource          bool                     `yaml:"isUseSource" json:"isUseSource"`
	IsAlwaysGen          bool                     `yaml:"isAlwaysGen" json:"isAlwaysGen"`
	DefaultVal           int                      `yaml:"defaultVal" json:"defaultVal"`
	MaxVal               int                      `yaml:"maxVal" json:"maxVal"`
	MinVal               int                      `yaml:"minVal" json:"minVal"`
}

GenSymbolValsWithPosConfig - configuration for GenSymbolValsWithPos

func (*GenSymbolValsWithPosConfig) SetLinkComponent added in v0.13.78

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

SetLinkComponent

type GenSymbolValsWithPosType added in v0.13.78

type GenSymbolValsWithPosType int
const (
	GSVWPTypeAdd               GenSymbolValsWithPosType = 0
	GSVWPTypeMask              GenSymbolValsWithPosType = 1
	GSVWPTypeAddWithIntMapping GenSymbolValsWithPosType = 2
)

type GenSymbolValsWithSymbol added in v0.13.89

type GenSymbolValsWithSymbol struct {
	*BasicComponent `json:"-"`
	Config          *GenSymbolValsWithSymbolConfig `json:"config"`
}

func (*GenSymbolValsWithSymbol) Init added in v0.13.89

func (genSymbolValsWithSymbol *GenSymbolValsWithSymbol) Init(fn string, pool *GamePropertyPool) error

Init -

func (*GenSymbolValsWithSymbol) InitEx added in v0.13.89

func (genSymbolValsWithSymbol *GenSymbolValsWithSymbol) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*GenSymbolValsWithSymbol) OnAsciiGame added in v0.13.89

func (genSymbolValsWithPos *GenSymbolValsWithSymbol) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*GenSymbolValsWithSymbol) OnPlayGame added in v0.13.89

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

playgame

type GenSymbolValsWithSymbolConfig added in v0.13.89

type GenSymbolValsWithSymbolConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string                      `yaml:"type" json:"type"`
	Type                 GenSymbolValsWithSymbolType `yaml:"-" json:"-"`
	Symbols              []string                    `yaml:"symbols" json:"symbols"`
	SymbolCodes          []int                       `yaml:"-" json:"-"`
	Weight               string                      `yaml:"weight" json:"weight"`
	WeightVW2            *sgc7game.ValWeights2       `yaml:"-" json:"-"`
	DefaultVal           int                         `yaml:"defaultVal" json:"defaultVal"`
	IsUseSource          bool                        `yaml:"isUseSource" json:"isUseSource"`
	IsAlwaysGen          bool                        `yaml:"isAlwaysGen" json:"isAlwaysGen"`
}

GenSymbolValsWithSymbolConfig - configuration for GenSymbolValsWithSymbol

func (*GenSymbolValsWithSymbolConfig) SetLinkComponent added in v0.13.89

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

SetLinkComponent

type GenSymbolValsWithSymbolType added in v0.13.89

type GenSymbolValsWithSymbolType int
const (
	GSVWSTypeNormal   GenSymbolValsWithSymbolType = 0
	GSVWSTypeNonClear GenSymbolValsWithSymbolType = 1
)

type HistoryComponentData added in v0.13.39

type HistoryComponentData struct {
	Component    IComponent
	ForeachIndex int
}

type IComponent

type IComponent interface {
	// Init -
	Init(fn string, pool *GamePropertyPool) error
	// InitEx -
	InitEx(cfg any, pool *GamePropertyPool) error
	// OnGameInited - on game inited
	OnGameInited(components *ComponentList) 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, cd IComponentData) (string, error)
	// OnAsciiGame - outpur to asciigame
	OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) 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)
	// ProcRespinOnStepEnd - 现在只有respin需要特殊处理结束,如果多层respin嵌套时,只要新的有next,就不会继续结束respin
	ProcRespinOnStepEnd(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, cd IComponentData, canRemove bool) (string, error)
	// GetName -
	GetName() string

	// IsRespin -
	IsRespin() bool
	// IsForeach -
	IsForeach() bool

	// NewStats2 -
	NewStats2(parent string) *stats2.Feature
	// OnStats2
	OnStats2(icd IComponentData, s2 *stats2.Cache)

	// GetAllLinkComponents - get all link components
	GetAllLinkComponents() []string

	// GetNextLinkComponents - get next link components
	GetNextLinkComponents() []string
	// GetChildLinkComponents - get child link components
	GetChildLinkComponents() []string

	// CanTriggerWithScene -
	CanTriggerWithScene(gameProp *GameProperty, gs *sgc7game.GameScene, curpr *sgc7game.PlayResult, stake *sgc7game.Stake) (bool, []*sgc7game.Result)

	// IsMask -
	IsMask() bool
	// SetMask -
	SetMask(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, cd IComponentData, mask []bool) error
	// SetMaskVal -
	SetMaskVal(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, cd IComponentData, index int, mask bool) error
	// SetMaskOnlyTrue -
	SetMaskOnlyTrue(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, cd IComponentData, mask []bool) error

	// EachSymbols - each symbols
	EachSymbols(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin, ps sgc7game.IPlayerState, stake *sgc7game.Stake,
		prs []*sgc7game.PlayResult, cd IComponentData) error

	// AddPos -
	AddPos(cd IComponentData, x int, y int)

	// OnPlayGameWithSet - on playgame with a set
	OnPlayGameWithSet(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin,
		cmd string, param string, ps sgc7game.IPlayerState, stake *sgc7game.Stake, prs []*sgc7game.PlayResult, cd IComponentData, set int) (string, error)
}

func NewAddSymbols added in v0.13.47

func NewAddSymbols(name string) IComponent

func NewBasicReels

func NewBasicReels(name string) IComponent

func NewCheckSymbolVals added in v0.13.89

func NewCheckSymbolVals(name string) IComponent

func NewChgSymbol added in v0.10.273

func NewChgSymbol(name string) IComponent

func NewChgSymbolVals added in v0.13.89

func NewChgSymbolVals(name string) IComponent

func NewChgSymbols added in v0.13.89

func NewChgSymbols(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 NewGenGigaSymbol added in v0.13.78

func NewGenGigaSymbol(name string) IComponent

func NewGenSymbolValsWithPos added in v0.13.78

func NewGenSymbolValsWithPos(name string) IComponent

func NewGenSymbolValsWithSymbol added in v0.13.89

func NewGenSymbolValsWithSymbol(name string) IComponent

func NewIntValMapping added in v0.13.57

func NewIntValMapping(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 NewMultiRespin added in v0.10.279

func NewMultiRespin(name string) IComponent

func NewMultiWeightAwards added in v0.12.170

func NewMultiWeightAwards(name string) IComponent

func NewOverlaySymbol

func NewOverlaySymbol(name string) IComponent

func NewPiggyBank added in v0.13.47

func NewPiggyBank(name string) IComponent

func NewPositionCollection added in v0.13.89

func NewPositionCollection(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 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 NewReplaceReelWithMask added in v0.13.39

func NewReplaceReelWithMask(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 NewRollSymbol added in v0.13.17

func NewRollSymbol(name string) IComponent

func NewScatterTrigger added in v0.12.264

func NewScatterTrigger(name string) IComponent

func NewSymbolCollection2 added in v0.13.21

func NewSymbolCollection2(name string) IComponent

func NewSymbolModifier added in v0.12.230

func NewSymbolModifier(name string) IComponent

func NewSymbolMulti

func NewSymbolMulti(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 NewWinResultCache added in v0.13.78

func NewWinResultCache(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(gameProp *GameProperty, component IComponent)
	// BuildPBComponentData
	BuildPBComponentData() proto.Message
	// LoadPB
	LoadPB(pb *anypb.Any) error
	// Clone
	Clone() IComponentData

	// GetVal -
	GetVal(key string) (int, bool)
	// 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)
	// ClearConfigIntVal -
	ClearConfigIntVal(key string)

	// GetResults -
	GetResults() []int
	// GetOutput -
	GetOutput() int
	// GetStringOutput -
	GetStringOutput() string

	// GetSymbols -
	GetSymbols() []int
	// AddSymbol -
	AddSymbol(symbolCode int)

	// GetPos -
	GetPos() []int
	// HasPos -
	HasPos(x int, y int) bool
	// AddPos -
	AddPos(x int, y int)

	// GetLastRespinNum -
	GetLastRespinNum() int
	// IsRespinEnding -
	IsRespinEnding() bool
	// IsRespinStarted -
	IsRespinStarted() bool
	// AddTriggerRespinAward -
	AddTriggerRespinAward(award *Award)
	// AddRespinTimes -
	AddRespinTimes(num int)
	// TriggerRespin
	TriggerRespin(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams)
	// PushTriggerRespin -
	PushTriggerRespin(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, num int)

	// GetMask -
	GetMask() []bool
	// ChgMask -
	ChgMask(curMask int, val bool) bool

	PutInMoney(coins int)
}

type IRNG added in v0.13.135

type IRNG interface {
	// OnNewGame -
	OnNewGame(plugin sgc7plugin.IPlugin) error
	// GetCurRNG -
	GetCurRNG(componentName string) (bool, int, sgc7plugin.IPlugin)
}

func NewBasicRNG added in v0.13.135

func NewBasicRNG() IRNG

type IntValMapping added in v0.13.57

type IntValMapping struct {
	*BasicComponent `json:"-"`
	Config          *IntValMappingConfig `json:"config"`
}

func (*IntValMapping) Init added in v0.13.57

func (intValMapping *IntValMapping) Init(fn string, pool *GamePropertyPool) error

Init -

func (*IntValMapping) InitEx added in v0.13.57

func (intValMapping *IntValMapping) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*IntValMapping) OnAsciiGame added in v0.13.57

func (intValMapping *IntValMapping) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*IntValMapping) OnPlayGame added in v0.13.57

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

playgame

type IntValMappingConfig added in v0.13.57

type IntValMappingConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	ValMapping           string                `yaml:"valMapping" json:"valMapping"`
	ValMappingVM         *sgc7game.ValMapping2 `yaml:"-" json:"-"`
	InputVal             int                   `yaml:"inputVal" json:"inputVal"`
	ComponentOutput      string                `yaml:"componentOutput" json:"componentOutput"`
}

IntValMappingConfig - configuration for IntValMapping

func (*IntValMappingConfig) SetLinkComponent added in v0.13.57

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

SetLinkComponent

type JsonMgr added in v0.13.164

type JsonMgr struct {
	// contains filtered or unexported fields
}

func (*JsonMgr) LoadComponent added in v0.13.164

func (mgr *JsonMgr) LoadComponent(componentType string, gamecfg *BetConfig, cell *ast.Node) (string, error)

func (*JsonMgr) RegLoadComponent added in v0.13.164

func (mgr *JsonMgr) RegLoadComponent(typename string, loader FuncLoadComponentInJson)

type LinesTrigger added in v0.12.264

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

func (*LinesTrigger) CanTriggerWithScene added in v0.13.39

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

CanTriggerWithScene -

func (*LinesTrigger) GetAllLinkComponents added in v0.13.39

func (linesTrigger *LinesTrigger) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*LinesTrigger) GetNextLinkComponents added in v0.13.99

func (linesTrigger *LinesTrigger) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

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) NewStats2 added in v0.13.103

func (linesTrigger *LinesTrigger) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*LinesTrigger) OnAsciiGame added in v0.12.264

func (linesTrigger *LinesTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

func (*LinesTrigger) OnStats2 added in v0.13.103

func (linesTrigger *LinesTrigger) OnStats2(icd IComponentData, s2 *stats2.Cache)

OnStats2

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
	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
	OSMulTypeString                 string                        `yaml:"symbolValsMulti" json:"symbolValsMulti"`                             // OtherSceneMultiType
	OSMulType                       OtherSceneMultiType           `yaml:"-" json:"-"`                                                         // OtherSceneMultiType
	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,表示判定为否才触发
	PiggyBankComponent              string                        `yaml:"piggyBankComponent" json:"piggyBankComponent"`                       // piggyBank component
	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) Clone added in v0.13.170

func (linesTriggerData *LinesTriggerData) Clone() IComponentData

Clone

func (*LinesTriggerData) GetVal added in v0.12.264

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

GetVal -

func (*LinesTriggerData) OnNewGame added in v0.12.264

func (linesTriggerData *LinesTriggerData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

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"`
}

func (*Mask) EachUsedResults added in v0.10.285

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

EachUsedResults -

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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

func (*Mask) ProcMask added in v0.10.297

func (mask *Mask) ProcMask(plugin sgc7plugin.IPlugin, gameProp *GameProperty, curpr *sgc7game.PlayResult, prs []*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, cd IComponentData, 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, cd IComponentData, 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, cd IComponentData, 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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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表示全满的奖励

}

MaskConfig - configuration for Mask

func (*MaskConfig) SetLinkComponent added in v0.13.39

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

SetLinkComponent

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) ChgMask added in v0.13.39

func (maskData *MaskData) ChgMask(curMask int, val bool) bool

ChgMask -

func (*MaskData) Clone added in v0.13.170

func (maskData *MaskData) Clone() IComponentData

Clone

func (*MaskData) GetMask added in v0.13.39

func (maskData *MaskData) GetMask() []bool

GetMask -

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(gameProp *GameProperty, component IComponent)

OnNewGame -

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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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) OnAsciiGame added in v0.12.148

func (moveSymbol *MoveSymbol) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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 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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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) Clone added in v0.13.170

func (multiWeightAwardsData *MultiWeightAwardsData) Clone() IComponentData

Clone

func (*MultiWeightAwardsData) OnNewGame added in v0.12.170

func (multiWeightAwardsData *MultiWeightAwardsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

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 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 OtherSceneMultiType added in v0.13.137

type OtherSceneMultiType int
const (
	OSMTNone      OtherSceneMultiType = 0
	OSMTAdd       OtherSceneMultiType = 1 // 每个位置用加来计算总倍数
	OSMTMul       OtherSceneMultiType = 2 // 每个位置用乘来计算总倍数
	OSMTPowOf2Add OtherSceneMultiType = 3 // 每个位置用2的次方之和来计算总倍数
	OSMTPowOf2Mul OtherSceneMultiType = 4 // 每个位置用2的次方之积来计算总倍数
)

func ParseOtherSceneMultiType added in v0.13.137

func ParseOtherSceneMultiType(str string) OtherSceneMultiType

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, cd IComponentData) error

OnAsciiGame - outpur to asciigame

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, cd IComponentData) (string, error)

playgame

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) Clone added in v0.13.170

func (overlaySymbolData *OverlaySymbolData) Clone() IComponentData

Clone

func (*OverlaySymbolData) OnNewGame

func (overlaySymbolData *OverlaySymbolData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type PiggyBank added in v0.13.47

type PiggyBank struct {
	*BasicComponent `json:"-"`
	Config          *PiggyBankConfig `json:"config"`
}

func (*PiggyBank) GetWinMulti added in v0.13.47

func (piggyBank *PiggyBank) GetWinMulti(basicCD *BasicComponentData) int

func (*PiggyBank) Init added in v0.13.47

func (piggyBank *PiggyBank) Init(fn string, pool *GamePropertyPool) error

Init -

func (*PiggyBank) InitEx added in v0.13.47

func (piggyBank *PiggyBank) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*PiggyBank) NewComponentData added in v0.13.47

func (piggyBank *PiggyBank) NewComponentData() IComponentData

NewComponentData -

func (*PiggyBank) OnAsciiGame added in v0.13.47

func (piggyBank *PiggyBank) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*PiggyBank) OnPlayGame added in v0.13.47

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

playgame

type PiggyBankConfig added in v0.13.47

type PiggyBankConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	WinMulti             int `yaml:"winMulti" json:"winMulti"` // winMulti,最后的中奖倍数,默认为1
}

PiggyBankConfig - configuration for PiggyBank

func (*PiggyBankConfig) SetLinkComponent added in v0.13.47

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

SetLinkComponent

type PiggyBankData added in v0.13.47

type PiggyBankData struct {
	BasicComponentData
	SavedMoney int
	Wins       int
	WinMulti   int
}

func (*PiggyBankData) BuildPBComponentData added in v0.13.47

func (piggyBankData *PiggyBankData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*PiggyBankData) Clone added in v0.13.170

func (piggyBankData *PiggyBankData) Clone() IComponentData

Clone

func (*PiggyBankData) GetVal added in v0.13.47

func (piggyBankData *PiggyBankData) GetVal(key string) (int, bool)

GetVal -

func (*PiggyBankData) OnNewGame added in v0.13.47

func (piggyBankData *PiggyBankData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*PiggyBankData) SetVal added in v0.13.47

func (piggyBankData *PiggyBankData) SetVal(key string, val int)

SetVal -

type PosComponentData added in v0.13.175

type PosComponentData struct {
	Pos []int
}

func (*PosComponentData) Add added in v0.13.176

func (posdata *PosComponentData) Add(x, y int)

func (*PosComponentData) Clear added in v0.13.175

func (posdata *PosComponentData) Clear()

func (*PosComponentData) Clone added in v0.13.175

func (posdata *PosComponentData) Clone() PosComponentData

func (*PosComponentData) Has added in v0.13.175

func (posdata *PosComponentData) Has(target *PosComponentData) bool

func (*PosComponentData) MergePosList added in v0.13.176

func (posdata *PosComponentData) MergePosList(pos []int)

type PositionCollection added in v0.13.89

type PositionCollection struct {
	*BasicComponent `json:"-"`
	Config          *PositionCollectionConfig `json:"config"`
}

PositionCollection - 也是一个非常特殊的组件,symbol集合

func (*PositionCollection) AddPos added in v0.13.89

func (positionCollection *PositionCollection) AddPos(icd IComponentData, x int, y int)

AddPos -

func (*PositionCollection) GetAllLinkComponents added in v0.13.89

func (positionCollection *PositionCollection) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*PositionCollection) GetChildLinkComponents added in v0.13.99

func (positionCollection *PositionCollection) GetChildLinkComponents() []string

GetChildLinkComponents - get next link components

func (*PositionCollection) Init added in v0.13.89

func (positionCollection *PositionCollection) Init(fn string, pool *GamePropertyPool) error

Init -

func (*PositionCollection) InitEx added in v0.13.89

func (positionCollection *PositionCollection) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*PositionCollection) IsForeach added in v0.13.99

func (positionCollection *PositionCollection) IsForeach() bool

IsForeach -

func (*PositionCollection) NewComponentData added in v0.13.89

func (positionCollection *PositionCollection) NewComponentData() IComponentData

NewComponentData -

func (*PositionCollection) OnAsciiGame added in v0.13.89

func (positionCollection *PositionCollection) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult,
	mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*PositionCollection) OnGameInited added in v0.13.89

func (positionCollection *PositionCollection) OnGameInited(components *ComponentList) error

OnGameInited - on game inited

func (*PositionCollection) OnPlayGame added in v0.13.89

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

playgame

type PositionCollectionConfig added in v0.13.89

type PositionCollectionConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string                 `yaml:"type" json:"type"`                         // type
	Type                 PositionCollectionType `yaml:"-" json:"-"`                               // type
	InitPositions        []int                  `yaml:"initPositions" json:"initPositions"`       // 初始化
	ForeachComponent     string                 `yaml:"foreachComponent" json:"foreachComponent"` // foreach
	Children             []string               `yaml:"-" json:"-"`                               //
}

PositionCollectionConfig - configuration for PositionCollection feature

func (*PositionCollectionConfig) SetLinkComponent added in v0.13.89

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

SetLinkComponent

type PositionCollectionData added in v0.13.89

type PositionCollectionData struct {
	BasicComponentData
	Pos []int
}

func (*PositionCollectionData) AddPos added in v0.13.89

func (positionCollectionData *PositionCollectionData) AddPos(x int, y int)

AddPos -

func (*PositionCollectionData) BuildPBComponentData added in v0.13.89

func (positionCollectionData *PositionCollectionData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*PositionCollectionData) Clone added in v0.13.170

func (positionCollectionData *PositionCollectionData) Clone() IComponentData

Clone

func (*PositionCollectionData) GetPos added in v0.13.89

func (positionCollectionData *PositionCollectionData) GetPos() []int

GetPos -

func (*PositionCollectionData) HasPos added in v0.13.89

func (positionCollectionData *PositionCollectionData) HasPos(x int, y int) bool

HasPos -

func (*PositionCollectionData) OnNewGame added in v0.13.89

func (positionCollectionData *PositionCollectionData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type PositionCollectionType added in v0.13.89

type PositionCollectionType int
const (
	PCTypeNormal        PositionCollectionType = 0
	PCTypeNonRepeatable PositionCollectionType = 1
)

type QueueBranch added in v0.13.19

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

func (*QueueBranch) GetAllLinkComponents added in v0.13.39

func (queueBranch *QueueBranch) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*QueueBranch) GetNextLinkComponents added in v0.13.99

func (queueBranch *QueueBranch) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

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) NewComponentData added in v0.13.27

func (queueBranch *QueueBranch) NewComponentData() IComponentData

NewComponentData -

func (*QueueBranch) OnAsciiGame added in v0.13.19

func (queueBranch *QueueBranch) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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

func (*QueueBranchConfig) SetLinkComponent added in v0.13.25

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

SetLinkComponent

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) ChgConfigIntVal added in v0.13.67

func (queueBranchData *QueueBranchData) ChgConfigIntVal(key string, off int)

ChgConfigIntVal -

func (*QueueBranchData) Clone added in v0.13.170

func (queueBranchData *QueueBranchData) Clone() IComponentData

Clone

func (*QueueBranchData) OnNewGame added in v0.13.19

func (queueBranchData *QueueBranchData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*QueueBranchData) SetConfigIntVal added in v0.13.67

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

SetConfigIntVal -

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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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) OnAsciiGame added in v0.12.250

func (reelModifier *ReelModifier) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

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 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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

type RefillSymbolsConfig added in v0.13.17

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

RefillSymbolsConfig - configuration for RefillSymbols

func (*RefillSymbolsConfig) SetLinkComponent added in v0.13.25

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

SetLinkComponent

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) GetAllLinkComponents added in v0.13.39

func (removeSymbols *RemoveSymbols) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*RemoveSymbols) GetNextLinkComponents added in v0.13.99

func (removeSymbols *RemoveSymbols) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

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, cd IComponentData) 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, cd IComponentData) (string, error)

playgame

type RemoveSymbolsConfig added in v0.13.17

type RemoveSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	JumpToComponent      string   `yaml:"jumpToComponent" json:"jumpToComponent"`   // jump to
	TargetComponents     []string `yaml:"targetComponents" json:"targetComponents"` // 这些组件的中奖会需要参与remove
	IgnoreSymbols        []string `yaml:"ignoreSymbols" json:"ignoreSymbols"`       // 忽略的symbol
	IgnoreSymbolCodes    []int    `yaml:"-" json:"-"`                               // 忽略的symbol
	Awards               []*Award `yaml:"awards" json:"awards"`                     // 新的奖励系统
}

RemoveSymbolsConfig - configuration for RemoveSymbols

func (*RemoveSymbolsConfig) SetLinkComponent added in v0.13.25

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

SetLinkComponent

type RemoveSymbolsData added in v0.13.17

type RemoveSymbolsData struct {
	BasicComponentData
	RemovedNum int
	AvgHeight  int // 平均移除图标的高度,用int表示浮点数,因此100表示1
}

func (*RemoveSymbolsData) BuildPBComponentData added in v0.13.17

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

BuildPBComponentData

func (*RemoveSymbolsData) Clone added in v0.13.170

func (removeSymbolsData *RemoveSymbolsData) Clone() IComponentData

Clone

func (*RemoveSymbolsData) GetVal added in v0.13.137

func (removeSymbolsData *RemoveSymbolsData) GetVal(key string) (int, bool)

GetVal -

func (*RemoveSymbolsData) OnNewGame added in v0.13.17

func (removeSymbolsData *RemoveSymbolsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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 ReplaceReelWithMask added in v0.13.39

type ReplaceReelWithMask struct {
	*BasicComponent `json:"-"`
	Config          *ReplaceReelWithMaskConfig `json:"config"`
}

func (*ReplaceReelWithMask) Init added in v0.13.39

func (replaceReelWithMask *ReplaceReelWithMask) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ReplaceReelWithMask) InitEx added in v0.13.39

func (replaceReelWithMask *ReplaceReelWithMask) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ReplaceReelWithMask) OnAsciiGame added in v0.13.39

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

OnAsciiGame - outpur to asciigame

func (*ReplaceReelWithMask) OnPlayGame added in v0.13.39

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

playgame

type ReplaceReelWithMaskConfig added in v0.13.39

type ReplaceReelWithMaskConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Symbol               string `yaml:"symbol" json:"symbol"`
	SymbolCode           int    `yaml:"-" json:"-"`
	Mask                 string `yaml:"mask" json:"mask"`
}

ReplaceReelWithMaskConfig - configuration for ReplaceReelWithMask

func (*ReplaceReelWithMaskConfig) SetLinkComponent added in v0.13.39

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

SetLinkComponent

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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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

func (*ReplaceSymbolGroupConfig) SetLinkComponent added in v0.13.25

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

SetLinkComponent

type Respin added in v0.10.273

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

func (*Respin) EachUsedResults added in v0.10.273

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

EachUsedResults -

func (*Respin) GetAllLinkComponents added in v0.13.39

func (respin *Respin) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*Respin) GetChildLinkComponents added in v0.13.99

func (respin *Respin) GetChildLinkComponents() []string

GetChildLinkComponents - get child link components

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) IsRespin added in v0.12.157

func (respin *Respin) IsRespin() bool

IsRespin -

func (*Respin) NewComponentData added in v0.10.273

func (respin *Respin) NewComponentData() IComponentData

NewComponentData -

func (*Respin) NewStats2 added in v0.13.99

func (respin *Respin) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*Respin) OnAsciiGame added in v0.10.273

func (respin *Respin) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

func (*Respin) OnStats2 added in v0.13.99

func (respin *Respin) OnStats2(icd IComponentData, s2 *stats2.Cache)

OnStats2

func (*Respin) ProcRespinOnStepEnd added in v0.13.99

func (respin *Respin) ProcRespinOnStepEnd(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, cd IComponentData, canRemove bool) (string, error)

ProcRespinOnStepEnd - 现在只有respin需要特殊处理结束,如果多层respin嵌套时,只要新的有next,就不会继续结束respin

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"`
}

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) AddRespinTimes added in v0.13.39

func (respinData *RespinData) AddRespinTimes(num int)

AddRespinTimes -

func (*RespinData) AddTriggerRespinAward added in v0.13.39

func (respinData *RespinData) AddTriggerRespinAward(award *Award)

AddTriggerRespinAward -

func (*RespinData) BuildPBComponentData added in v0.10.273

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

BuildPBComponentData

func (*RespinData) ChgConfigIntVal added in v0.13.89

func (respinData *RespinData) ChgConfigIntVal(key string, off int)

ChgConfigIntVal -

func (*RespinData) Clone added in v0.13.170

func (respinData *RespinData) Clone() IComponentData

Clone

func (*RespinData) GetLastRespinNum added in v0.13.39

func (respinData *RespinData) GetLastRespinNum() int

GetLastRespinNum -

func (*RespinData) GetVal added in v0.13.135

func (respinData *RespinData) GetVal(key string) (int, bool)

GetVal -

func (*RespinData) IsRespinEnding added in v0.13.39

func (respinData *RespinData) IsRespinEnding() bool

IsEnding -

func (*RespinData) IsRespinStarted added in v0.13.39

func (respinData *RespinData) IsRespinStarted() bool

IsStarted -

func (*RespinData) OnNewGame added in v0.10.273

func (respinData *RespinData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*RespinData) PushTriggerRespin added in v0.13.39

func (respinData *RespinData) PushTriggerRespin(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, num int)

PushTrigger -

func (*RespinData) SetConfigIntVal added in v0.13.160

func (respinData *RespinData) SetConfigIntVal(key string, val int)

SetConfigIntVal -

func (*RespinData) TriggerRespin added in v0.13.39

func (respinData *RespinData) TriggerRespin(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams)

OnTriggerRespin

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) NewComponentData added in v0.13.39

func (rollSymbol *RollSymbol) NewComponentData() IComponentData

NewComponentData -

func (*RollSymbol) OnAsciiGame added in v0.13.17

func (rollSymbol *RollSymbol) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

type RollSymbolConfig added in v0.13.17

type RollSymbolConfig struct {
	BasicComponentConfig   `yaml:",inline" json:",inline"`
	SymbolNum              int                   `yaml:"symbolNum" json:"symbolNum"`
	SymbolNumComponent     string                `json:"symbolNumComponent"`
	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

func (*RollSymbolConfig) SetLinkComponent added in v0.13.39

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

SetLinkComponent

type RollSymbolData added in v0.13.17

type RollSymbolData struct {
	BasicComponentData
	SymbolCodes []int
}

func (*RollSymbolData) BuildPBComponentData added in v0.13.17

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

BuildPBComponentData

func (*RollSymbolData) Clone added in v0.13.170

func (rollSymbolData *RollSymbolData) Clone() IComponentData

Clone

func (*RollSymbolData) GetVal added in v0.13.17

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

GetVal -

func (*RollSymbolData) OnNewGame added in v0.13.17

func (rollSymbolData *RollSymbolData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*RollSymbolData) SetVal added in v0.13.17

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

SetVal -

type SPCNode added in v0.13.99

type SPCNode struct {
	Parent           *SPCNode
	NormalComponents []string
	Children         []*SPCNode
	Root             string
}

func ParseStepParentChildren added in v0.13.99

func ParseStepParentChildren(lst *ComponentList, start string) (*SPCNode, error)

func (*SPCNode) AddChild added in v0.13.99

func (node *SPCNode) AddChild(child *SPCNode)

func (*SPCNode) AddNormal added in v0.13.99

func (node *SPCNode) AddNormal(componentName string)

func (*SPCNode) CountComponentNum added in v0.13.99

func (node *SPCNode) CountComponentNum() int

func (*SPCNode) CountDeep added in v0.13.99

func (node *SPCNode) CountDeep() int

func (*SPCNode) CountParentNum added in v0.13.99

func (node *SPCNode) CountParentNum() int

func (*SPCNode) Format added in v0.13.99

func (node *SPCNode) Format()

func (*SPCNode) GetComponents added in v0.13.99

func (node *SPCNode) GetComponents() []string

func (*SPCNode) GetParent added in v0.13.99

func (node *SPCNode) GetParent(component string) string

func (*SPCNode) IsChildren added in v0.13.99

func (node *SPCNode) IsChildren(componentName string) bool

func (*SPCNode) IsIn added in v0.13.124

func (node *SPCNode) IsIn(componentName string) bool

func (*SPCNode) IsInChildren added in v0.13.99

func (node *SPCNode) IsInChildren(componentName string) bool

func (*SPCNode) IsInNormal added in v0.13.99

func (node *SPCNode) IsInNormal(componentName string) bool

type ScatterTrigger added in v0.12.264

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

func (*ScatterTrigger) CanTriggerWithScene added in v0.13.39

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

CanTriggerWithScene -

func (*ScatterTrigger) GetAllLinkComponents added in v0.13.39

func (scatterTrigger *ScatterTrigger) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*ScatterTrigger) GetNextLinkComponents added in v0.13.99

func (scatterTrigger *ScatterTrigger) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

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) NewStats2 added in v0.13.103

func (scatterTrigger *ScatterTrigger) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*ScatterTrigger) OnAsciiGame added in v0.12.264

func (scatterTrigger *ScatterTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

func (*ScatterTrigger) OnStats2 added in v0.13.103

func (scatterTrigger *ScatterTrigger) OnStats2(icd IComponentData, s2 *stats2.Cache)

OnStats2

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
	OSMulTypeString                 string                        `yaml:"symbolValsMulti" json:"symbolValsMulti"`                             // OtherSceneMultiType
	OSMulType                       OtherSceneMultiType           `yaml:"-" json:"-"`                                                         // OtherSceneMultiType
	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
	PiggyBankComponent              string                        `yaml:"piggyBankComponent" json:"piggyBankComponent"`                       // piggyBank component
	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,表示判定为否才触发
	IsAddRespinMode                 bool                          `yaml:"isAddRespinMode" json:"isAddRespinMode"`                             // 是否是增加respinNum模式,默认是增加triggerNum模式
	RespinComponent                 string                        `yaml:"respinComponent" json:"respinComponent"`                             // respin component
	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) Clone added in v0.13.170

func (scatterTriggerData *ScatterTriggerData) Clone() IComponentData

Clone

func (*ScatterTriggerData) GetVal added in v0.12.264

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

GetVal -

func (*ScatterTriggerData) OnNewGame added in v0.12.264

func (scatterTriggerData *ScatterTriggerData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

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
	IsOtherScene bool
}

func NewSceneStack added in v0.12.272

func NewSceneStack(isOtherScene bool) *SceneStack

func (*SceneStack) GetTargetScene3 added in v0.12.272

func (stack *SceneStack) GetTargetScene3(gameProp *GameProperty, basicCfg *BasicComponentConfig, si int, curpr *sgc7game.PlayResult, prs []*sgc7game.PlayResult) *sgc7game.GameScene

func (*SceneStack) GetTopScene added in v0.12.272

func (stack *SceneStack) GetTopScene(curpr *sgc7game.PlayResult, prs []*sgc7game.PlayResult) *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) PopEx added in v0.13.43

func (stack *SceneStack) PopEx(num int)

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)

type SceneStackData added in v0.12.272

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

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 SymbolCollection2 added in v0.13.21

type SymbolCollection2 struct {
	*BasicComponent `json:"-"`
	Config          *SymbolCollection2Config `json:"config"`
}

SymbolCollection2 - 也是一个非常特殊的组件,symbol集合

func (*SymbolCollection2) EachSymbols added in v0.13.39

func (symbolCollection2 *SymbolCollection2) EachSymbols(gameProp *GameProperty, curpr *sgc7game.PlayResult, gp *GameParams, plugin sgc7plugin.IPlugin, ps sgc7game.IPlayerState, stake *sgc7game.Stake,
	prs []*sgc7game.PlayResult, cd IComponentData) error

EachSymbols - foreach symbols

func (*SymbolCollection2) GetAllLinkComponents added in v0.13.39

func (symbolCollection2 *SymbolCollection2) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*SymbolCollection2) GetChildLinkComponents added in v0.13.99

func (symbolCollection2 *SymbolCollection2) GetChildLinkComponents() []string

GetChildLinkComponents - get next link components

func (*SymbolCollection2) Init added in v0.13.21

func (symbolCollection2 *SymbolCollection2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*SymbolCollection2) InitEx added in v0.13.21

func (symbolCollection2 *SymbolCollection2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*SymbolCollection2) IsForeach added in v0.13.99

func (symbolCollection2 *SymbolCollection2) IsForeach() bool

IsForeach -

func (*SymbolCollection2) NewComponentData added in v0.13.21

func (symbolCollection2 *SymbolCollection2) NewComponentData() IComponentData

NewComponentData -

func (*SymbolCollection2) NewStats2 added in v0.13.115

func (symbolCollection2 *SymbolCollection2) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*SymbolCollection2) OnAsciiGame added in v0.13.21

func (symbolCollection2 *SymbolCollection2) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult,
	mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*SymbolCollection2) OnGameInited added in v0.13.39

func (symbolCollection2 *SymbolCollection2) OnGameInited(components *ComponentList) error

OnGameInited - on game inited

func (*SymbolCollection2) OnPlayGame added in v0.13.21

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

playgame

func (*SymbolCollection2) OnStats2 added in v0.13.115

func (symbolCollection2 *SymbolCollection2) OnStats2(icd IComponentData, s2 *stats2.Cache)

OnStats2

type SymbolCollection2Config added in v0.13.21

type SymbolCollection2Config struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	ForeachComponent     string   `yaml:"foreachComponent" json:"foreachComponent"` // foreach
	MaxSymbolNum         int      `yaml:"maxSymbolNum" json:"maxSymbolNum"`         // 0表示不限制
	InitSymbols          []string `yaml:"initSymbols" json:"initSymbols"`           // 初始化symbols
	InitSymbolCodes      []int    `yaml:"-" json:"-"`                               // 初始化symbols
	Children             []string `yaml:"-" json:"-"`                               //
}

SymbolCollection2Config - configuration for SymbolCollection2 feature

func (*SymbolCollection2Config) SetLinkComponent added in v0.13.21

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

SetLinkComponent

type SymbolCollection2Data added in v0.13.21

type SymbolCollection2Data struct {
	BasicComponentData
	SymbolCodes  []int
	TotalCoinWin int64
	TotalCashWin int64
}

func (*SymbolCollection2Data) AddSymbol added in v0.13.39

func (symbolCollection2Data *SymbolCollection2Data) AddSymbol(symbolCode int)

AddSymbol -

func (*SymbolCollection2Data) BuildPBComponentData added in v0.13.21

func (symbolCollection2Data *SymbolCollection2Data) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*SymbolCollection2Data) Clone added in v0.13.170

func (symbolCollection2Data *SymbolCollection2Data) Clone() IComponentData

Clone

func (*SymbolCollection2Data) GetSymbols added in v0.13.39

func (symbolCollection2Data *SymbolCollection2Data) GetSymbols() []int

GetSymbols -

func (*SymbolCollection2Data) OnNewGame added in v0.13.21

func (symbolCollection2Data *SymbolCollection2Data) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

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) OnAsciiGame added in v0.12.230

func (symbolModifier *SymbolModifier) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

func (*SymbolModifier) OnStats2 added in v0.13.8

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

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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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 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来判断是否可以中奖
	STTypeReelScatters       SymbolTriggerType = 9 // scatter中奖判断,且一轴上只算1个scatter,且读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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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"`
}

func (*SymbolValWins) GetWinMulti added in v0.13.39

func (symbolValWins *SymbolValWins) GetWinMulti(basicCD *BasicComponentData) int

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) NewStats2 added in v0.13.103

func (symbolValWins *SymbolValWins) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*SymbolValWins) OnAsciiGame

func (symbolValWins *SymbolValWins) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

func (*SymbolValWins) OnStats2 added in v0.13.103

func (symbolValWins *SymbolValWins) OnStats2(icd IComponentData, s2 *stats2.Cache)

OnStats2

type SymbolValWinsConfig

type SymbolValWinsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	BetTypeString        string            `yaml:"betType" json:"betType"`   // bet or totalBet or noPay
	BetType              BetType           `yaml:"-" json:"-"`               // bet or totalBet or noPay
	WinMulti             int               `yaml:"winMulti" json:"winMulti"` // bet or totalBet
	Symbols              []string          `yaml:"symbols" json:"symbols"`   // like collect
	SymbolCodes          []int             `json:"-"`                        //
	StrType              string            `yaml:"type" json:"type"`
	Type                 SymbolValWinsType `yaml:"-" json:"-"`
}

SymbolValWinsConfig - configuration for SymbolValWins

func (*SymbolValWinsConfig) SetLinkComponent added in v0.13.89

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

SetLinkComponent

type SymbolValWinsData added in v0.12.250

type SymbolValWinsData struct {
	BasicComponentData
	SymbolNum int
	Wins      int
}

func (*SymbolValWinsData) BuildPBComponentData added in v0.12.250

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

BuildPBComponentData

func (*SymbolValWinsData) Clone added in v0.13.170

func (symbolValWinsData *SymbolValWinsData) Clone() IComponentData

Clone

func (*SymbolValWinsData) GetVal added in v0.12.250

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

GetVal -

func (*SymbolValWinsData) OnNewGame added in v0.12.250

func (symbolValWinsData *SymbolValWinsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*SymbolValWinsData) SetVal added in v0.12.250

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

SetVal -

type SymbolValWinsType added in v0.13.89

type SymbolValWinsType int
const (
	SVWTypeNormal    SymbolValWinsType = 0
	SVWTypeCollector SymbolValWinsType = 1
)

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 WaysTrigger added in v0.12.264

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

func (*WaysTrigger) CanTriggerWithScene added in v0.13.39

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

CanTriggerWithScene -

func (*WaysTrigger) GetAllLinkComponents added in v0.13.39

func (waysTrigger *WaysTrigger) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*WaysTrigger) GetNextLinkComponents added in v0.13.99

func (waysTrigger *WaysTrigger) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

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) NewStats2 added in v0.13.103

func (waysTrigger *WaysTrigger) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*WaysTrigger) OnAsciiGame added in v0.12.264

func (waysTrigger *WaysTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

func (*WaysTrigger) OnStats2 added in v0.13.103

func (waysTrigger *WaysTrigger) OnStats2(icd IComponentData, s2 *stats2.Cache)

OnStats2

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
	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
	OSMulTypeString                 string                        `yaml:"symbolValsMulti" json:"symbolValsMulti"`                             // OtherSceneMultiType
	OSMulType                       OtherSceneMultiType           `yaml:"-" json:"-"`                                                         // OtherSceneMultiType
	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,表示判定为否才触发
	PiggyBankComponent              string                        `yaml:"piggyBankComponent" json:"piggyBankComponent"`                       // piggyBank component
	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) Clone added in v0.13.170

func (waysTriggerData *WaysTriggerData) Clone() IComponentData

Clone

func (*WaysTriggerData) GetVal added in v0.12.264

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

GetVal -

func (*WaysTriggerData) OnNewGame added in v0.12.264

func (waysTriggerData *WaysTriggerData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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) Clone added in v0.13.170

func (weightAwardsData *WeightAwardsData) Clone() IComponentData

Clone

func (*WeightAwardsData) OnNewGame added in v0.12.264

func (weightAwardsData *WeightAwardsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type WeightBranch added in v0.13.17

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

func (*WeightBranch) GetAllLinkComponents added in v0.13.99

func (weightBranch *WeightBranch) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*WeightBranch) GetNextLinkComponents added in v0.13.99

func (weightBranch *WeightBranch) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

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) NewComponentData added in v0.13.73

func (weightBranch *WeightBranch) NewComponentData() IComponentData

NewComponentData -

func (*WeightBranch) OnAsciiGame added in v0.13.17

func (weightBranch *WeightBranch) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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

func (*WeightBranchConfig) SetLinkComponent added in v0.13.70

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

SetLinkComponent

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) Clone added in v0.13.170

func (weightBranchData *WeightBranchData) Clone() IComponentData

Clone

func (*WeightBranchData) GetVal added in v0.13.17

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

GetVal -

func (*WeightBranchData) OnNewGame added in v0.13.17

func (weightBranchData *WeightBranchData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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) Clone added in v0.13.170

func (weightReelsData *WeightReelsData) Clone() IComponentData

Clone

func (*WeightReelsData) OnNewGame added in v0.12.264

func (weightReelsData *WeightReelsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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 WinResultCache added in v0.13.78

type WinResultCache struct {
	*BasicComponent `json:"-"`
	Config          *WinResultCacheConfig `json:"config"`
}

func (*WinResultCache) Init added in v0.13.78

func (winResultCache *WinResultCache) Init(fn string, pool *GamePropertyPool) error

Init -

func (*WinResultCache) InitEx added in v0.13.78

func (winResultCache *WinResultCache) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*WinResultCache) NewComponentData added in v0.13.78

func (winResultCache *WinResultCache) NewComponentData() IComponentData

NewComponentData -

func (*WinResultCache) OnAsciiGame added in v0.13.78

func (winResultCache *WinResultCache) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*WinResultCache) OnPlayGame added in v0.13.78

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

playgame

type WinResultCacheConfig added in v0.13.78

type WinResultCacheConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	WinMulti             int `yaml:"winMulti" json:"winMulti"` // winMulti,最后的中奖倍数,默认为1
}

WinResultCacheConfig - configuration for WinResultCache

func (*WinResultCacheConfig) SetLinkComponent added in v0.13.78

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

SetLinkComponent

type WinResultCacheData added in v0.13.78

type WinResultCacheData struct {
	BasicComponentData
	WinResultNum int
	Wins         int
	WinMulti     int
}

func (*WinResultCacheData) BuildPBComponentData added in v0.13.78

func (winResultCacheData *WinResultCacheData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*WinResultCacheData) Clone added in v0.13.170

func (winResultCacheData *WinResultCacheData) Clone() IComponentData

Clone

func (*WinResultCacheData) GetVal added in v0.13.78

func (winResultCacheData *WinResultCacheData) GetVal(key string) (int, bool)

GetVal -

func (*WinResultCacheData) OnNewGame added in v0.13.78

func (winResultCacheData *WinResultCacheData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*WinResultCacheData) SetVal added in v0.13.78

func (winResultCacheData *WinResultCacheData) SetVal(key string, val int)

SetVal -

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, icd IComponentData) 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, icd IComponentData) (string, error)

playgame

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) Clone added in v0.13.170

func (winResultMultiData *WinResultMultiData) Clone() IComponentData

Clone

func (*WinResultMultiData) GetVal added in v0.13.8

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

GetVal -

func (*WinResultMultiData) OnNewGame added in v0.13.8

func (winResultMultiData *WinResultMultiData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

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