lowcode

package
v0.13.809 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package lowcode contains configurable, pluggable "components" that modify game scenes and play results at runtime. Components are defined by YAML/JSON configurations and operate on GameScene objects to implement mechanics such as removing symbols, adding symbols, collecting positions, etc.

Package lowcode provides runtime helpers for low-code game components.

SceneStack manages a stack of scenes that components can push/pop during game execution. It also supports restoring scenes from previous PlayResult entries when the current stack is empty.

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
	CCVWeight                     string = "weight"                     // 可以修改配置项里的 weight
	CCVForceBranch                string = "forcebranch"                // 可以修改配置项里的 forceBranch
	CCVWins                       string = "wins"                       // 可以修改配置项里的 wins
	CCVMulti                      string = "multi"                      // 可以修改配置项里的 multi
	CCVNumber                     string = "number"                     // 可以修改配置项里的 number
	CCVHeight                     string = "height"                     // 可以修改配置项里的 height
	CCVReelSetWeight              string = "reelsetweight"              // 可以修改配置项里的 reelSetWeight
	CCVForceVal                   string = "forceval"                   // 可以修改配置项里的 forceVal
	CCVForceValNow                string = "forcevalnow"                // 可以修改配置项里的 forceValNow
	CCVClearForceTriggerOnceCache string = "clearforcetriggeroncecache" // 可以修改配置项里的 clearForceTriggerOnceCache
	CCVClear                      string = "clear"                      // 可以修改配置项里的 clear
	CCVLineData                   string = "linedata"                   // 可以修改配置项里的 linedata
	CCVClearNow                   string = "clearnow"                   // 可以修改配置项里的 clearNow
	CCVPickNum                    string = "picknum"                    // 可以修改配置项里的 pickNum
	CCVForceFeature               string = "forcefeature"               // 可以修改配置项里的 forceFeature
	CCVDisableMulti               string = "disablemulti"               // 可以修改配置项里的 disableMulti
	CCVMapCoinWeight              string = "mapcoinweight"              // 可以修改配置项里的 mapCoinWeight
	CCVValueNumNow                string = "valuenumnow"                // 可以修改配置项里的 valueNumNow
	CCVOpenNum                    string = "opennum"                    // 可以修改配置项里的 opennum
	CCVSPWeight                   string = "spweight"                   // 可以修改配置项里的 spweight
	CCVGigaWeight                 string = "gigaweight"                 // 可以修改配置项里的 gigaweight
	CCVMaskX                      string = "maskx"                      // 可以修改配置项里的 maskx
	CCVNumberWeight               string = "numberweight"               // 可以修改配置项里的 numberweight
	CCVSymbolWeight               string = "symbolweight"               // 可以修改配置项里的 symbolweight
	CCVReelIndex                  string = "reelindex"                  // 可以修改配置项里的 reelindex
	CCVInput1                     string = "input1"                     // 可以修改配置项里的 input1
	CCVInput2                     string = "input2"                     // 可以修改配置项里的 input2
	CCVRowMask                    string = "rowmask"                    // 可以修改配置项里的 rowmask
	CCVMaxNumber                  string = "maxnumber"                  // 可以修改配置项里的 maxnumber
)
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
	CVNumber                string = "number"                // number
	CVResultNum             string = "resultnum"             // 触发后,中奖的数量
	CVOutputInt             string = "outputint"             // outputInt
	CVSelectedIndex         string = "selectedindex"         // selectedIndex,一般用于各种权重组件里,最后被选中的index
	CVValue                 string = "value"                 // value
	CVSymbolVal             string = "symbolval"             // symbolVal
	CVWinResultNum          string = "winresultnum"          // winResultNum
	CCValueNum              string = "valuenum"              // valueNum
	CVHeight                string = "height"                // height
	CVX                     string = "x"                     // x
	CVY                     string = "y"                     // y
	CVOutputString          string = "outputstring"          // outputstring
)
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 AdjacentPayTriggerTypeName = "adjacentPayTrigger"
View Source
const AlignTropiCoolSPGridTypeName = "alignTropiCoolSPGrid"
View Source
const BasicGameModName = "basic"
View Source
const BasicReels2TypeName = "basicReels2"
View Source
const BasicReelsTypeName = "basicReels"
View Source
const BombTypeName = "bomb"
View Source
const BurstSymbolsTypeName = "burstSymbols"
View Source
const CPCoreTypeName = "CPCore"
View Source
const (
	CSVValue string = "value" // 组件触发后的具体值
)
View Source
const CalculatorTypeName = "calculator"
View Source
const CascadingRegulatorTypeName = "cascadingRegulator"
View Source
const CatchSymbolsTypeName = "catchSymbols"
View Source
const CheckSymbolValsTypeName = "checkSymbolVals"
View Source
const CheckValTypeName = "checkVal"
View Source
const ChgSymbolTypeName = "chgSymbol"
View Source
const ChgSymbolValsTypeName = "chgSymbolVals"
View Source
const ChgSymbols2TypeName = "chgSymbols2"
View Source
const ChgSymbolsInReelsTypeName = "chgSymbolsInReels"
View Source
const ChgSymbolsTypeName = "chgSymbols"
View Source
const ClusterTriggerTypeName = "clusterTrigger"
View Source
const Collector2TypeName = "collector2"
View Source
const CollectorPayTriggerTypeName = "collectorPayTrigger"

CollectorPayTriggerTypeName is the component type name for the collector pay trigger.

View Source
const CollectorTypeName = "collector"
View Source
const ComponentTriggerTypeName = "componentTrigger"
View Source
const ComponentValTriggerTypeName = "componentValTrigger"
View Source
const ControllerWorkerTypeName = "controllerWorker"
View Source
const DefaultCmd = "SPIN"
View Source
const DefaultSymbolColor = "low"

DefaultSymbolColor is the default color used when a symbol color is not provided.

View Source
const DropDownSymbols2TypeName = "dropDownSymbols2"
View Source
const DropDownSymbolsTypeName = "dropDownSymbols"
View Source
const DropDownTropiCoolSPGridTypeName = "dropDownTropiCoolSPGrid"
View Source
const DropSymbolsTypeName = "dropSymbols"
View Source
const FeatureBar2TypeName = "featureBar2"
View Source
const FeatureBarTypeName = "featureBar"
View Source
const FeatureEmitterTypeName = "featureEmitter"
View Source
const FeaturePickTypeName = "featurePick"
View Source
const FixSymbolsTypeName = "fixSymbols"
View Source
const FlowDownSymbolsTypeName = "flowDownSymbols"
View Source
const GenGigaSymbolTypeName = "genGigaSymbol"
View Source
const GenGigaSymbols2TypeName = "genGigaSymbols2"
View Source
const GenMaskTypeName = "genMask"
View Source
const GenPositionCollectionTypeName = "genPositionCollection"
View Source
const GenPositionCollectionWithSymbolTypeName = "genPositionCollectionWithSymbol"
View Source
const GenSPGridTypeName = "genSPGrid"
View Source
const GenSymbolCollectionTypeName = "genSymbolCollection"
View Source
const GenSymbolVals2TypeName = "genSymbolVals2"
View Source
const GenSymbolValsInReelsTypeName = "genSymbolValsInReels"

GenSymbolValsInReelsTypeName - component name

View Source
const GenSymbolValsTypeName = "genSymbolVals"
View Source
const GenSymbolValsWithPosTypeName = "genSymbolValsWithPos"
View Source
const GenSymbolValsWithSymbolTypeName = "genSymbolValsWithSymbol"
View Source
const GenTropiCoolSPSymbolsTypeName = "genTropiCoolSPSymbols"
View Source
const HoldAndRespinReelsTypeName = "holdAndRespinReels"
View Source
const HoldAndWinTypeName = "holdAndWin"

HoldAndWinTypeName is the registered component type name used by the component manager and JSON loader for HoldAndWin components.

View Source
const InitTropiCoolSPGridTypeName = "initTropiCoolSPGrid"
View Source
const IntValMappingTypeName = "intValMapping"
View Source
const JackpotTypeName = "jackpot"
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 MergePositionCollectionTypeName = "mergePositionCollection"
View Source
const MergeSPGridTypeName = "mergeSPGrid"
View Source
const MergeSymbolTypeName = "mergeSymbol"
View Source
const MoveReelTypeName = "moveReel"
View Source
const MoveSymbolTypeName = "moveSymbol"
View Source
const MoveSymbols2TypeName = "moveSymbols2"
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 RandomMoveSymbolsTypeName = "randomMoveSymbols"
View Source
const ReRollReelTypeName = "reRollReel"
View Source
const RebuildReelIndexTypeName = "rebuildReelIndex"
View Source
const RebuildSymbolsTypeName = "rebuildSymbols"
View Source
const ReelModifierTypeName = "reelModifier"
View Source
const ReelTriggerTypeName = "reelTrigger"
View Source
const ReelsCollectorTypeName = "reelsCollector"
View Source
const RefillSymbols2TypeName = "refillSymbols2"
View Source
const RefillSymbolsTypeName = "refillSymbols"
View Source
const RefillTropiCoolSPGridTypeName = "refillTropiCoolSPGrid"
View Source
const RemoveSymbolsTypeName = "removeSymbols"

RemoveSymbolsTypeName is the component type name used in configuration files to identify the removeSymbols component.

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 RollNumberTypeName = "rollNumber"
View Source
const RollSymbolTypeName = "rollSymbol"

RollSymbolTypeName is the component type name used to identify roll symbol components in configuration and during initialization.

View Source
const ScatterTriggerTypeName = "scatterTrigger"
View Source
const StringValMappingTypeName = "stringValMapping"
View Source
const SumSymbolValsTypeName = "sumSymbolVals"

SumSymbolValsTypeName is the component type name used to register and identify SumSymbolVals components in configuration and component mgr.

View Source
const SymbolCollection2TypeName = "symbolCollection2"
View Source
const SymbolExpanderTypeName = "symbolExpander"

SymbolExpanderTypeName is the registered component type name used in configuration and component registration for the symbol expander.

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"

SymbolValWinsTypeName is the component type name used in configuration and registration for the SymbolValWins component.

View Source
const SymbolValsSPTypeName = "symbolValsSP"

SymbolValsSPTypeName is the component type name used in configuration and component registration for the SymbolValsSP component.

View Source
const (
	TagCurReels = "reels"
)
View Source
const TreasureChestTypeName = "treasureChest"
View Source
const TropiCoolExchangeTypeName = "tropiCoolExchange"
View Source
const TropiCoolSPBonusTypeName = "TropiCoolSPBonus"
View Source
const (
	WRMCVWinMulti string = "winMulti" // 可以修改配置项里的winMulti
)
View Source
const WaysTriggerTypeName = "waysTrigger"
View Source
const WeightBranchTypeName = "weightBranch"
View Source
const WeightReels2TypeName = "weightReels2"
View Source
const WeightReelsTypeName = "weightReels"
View Source
const WinResultLimiterTypeName = "winResultLimiter"
View Source
const WinResultModifierExTypeName = "winResultModifierEx"

WinResultModifierExTypeName is the component type name used in configuration and registration for the WinResultModifierEx component.

View Source
const WinResultModifierTypeName = "winResultModifier"
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")

	// ErrInvalidGameConfig - invalid game config
	ErrInvalidGameConfig = errors.New("invalid game config")

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

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

	// ErrInvalidLineData - invalid line data
	ErrInvalidLineData = errors.New("invalid line data")

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

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

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

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

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

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

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

	// ErrInvalidPlayerState - invalid playerState
	ErrInvalidPlayerState = errors.New("invalid playerState")

	// ErrInvalidSimpleRNG - invalid SimpleRNG
	ErrInvalidSimpleRNG = errors.New("invalid SimpleRNG")

	// ErrInvalidCmd - invalid cmd
	ErrInvalidCmd = errors.New("invalid cmd")
	// ErrInvalidCmdParam - invalid cmdparam
	ErrInvalidCmdParam = errors.New("invalid cmdparam")

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

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

	// ErrInvalidCustomNode - invalid custom-node
	ErrInvalidCustomNode = errors.New("invalid custom-node")
	// ErrInvalidTriggerLabel - invalid trigger label
	ErrInvalidTriggerLabel = errors.New("invalid trigger label")
	// ErrInvalidPayTables - invalid paytables
	ErrInvalidPayTables = errors.New("invalid paytables")
	// ErrInvalidSymbolInReels - invalid symbol in reels
	ErrInvalidSymbolInReels = 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")
	// ErrInvalidReels - invalid reels
	ErrInvalidReels = errors.New("invalid reels")
	// ErrUnsupportedOtherList - unsupported otherList
	ErrUnsupportedOtherList = errors.New("unsupported otherList")

	// ErrInvalidDefaultScene - invalid default scene
	ErrInvalidDefaultScene = errors.New("invalid default scene")
	// ErrInvalidWidth - invalid width
	ErrInvalidWidth = errors.New("invalid width")
	// ErrInvalidHeight - invalid height
	ErrInvalidHeight = errors.New("invalid height")

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

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

	// ErrInvalidSymbolTriggerType - invalid SymbolTriggerType
	ErrInvalidSymbolTriggerType = 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")

	// ErrInvalidStringValMappingFile - invalid StringValMappingFile
	ErrInvalidStringValMappingFile = errors.New("invalid StringValMappingFile")
	// ErrInvalidStringValMappingValue - invalid StringValMapping value
	ErrInvalidStringValMappingValue = errors.New("invalid StringValMapping 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")

	// ErrInvalidPositionCollection - invalid positionCollection
	ErrInvalidPositionCollection = errors.New("invalid positionCollection")

	// ErrInvalidCollectorVal - invalid Collector.Val
	ErrInvalidCollectorVal = errors.New("invalid Collector.Val")
	// ErrInvalidCollectorLogic - invalid Collector logic
	ErrInvalidCollectorLogic = errors.New("invalid Collector logic")

	// 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")
	// ErrNoWeight - no weight
	ErrNoWeight = errors.New("no weight")

	// ErrInvalidComponentData - invalid invalid ComponentData
	ErrInvalidComponentData = errors.New("invalid ComponentData")

	// ErrInvalidBranch - invalid branch
	ErrInvalidBranch = errors.New("invalid branch")

	// ErrInvalidCommand - invalid command
	ErrInvalidCommand = errors.New("invalid command")

	// ErrNoComponent - no component
	ErrNoComponent = errors.New("no component")

	// ErrCanNotGenDefaultScene - can not gen default scene
	ErrCanNotGenDefaultScene = errors.New("can not gen default scene")

	// ErrDeprecatedAPI - deprecated API
	ErrDeprecatedAPI = errors.New("deprecated API")
)
View Source
var MapProperty map[string]int

Functions

func AbsInt added in v0.13.210

func AbsInt(n int) int

func CalcSymbolsInResultEx added in v0.13.414

func CalcSymbolsInResultEx(gs *sgc7game.GameScene, mapSymbolCodes map[int]int, ret *sgc7game.Result, t WinResultModifierType) int

func CmpVal added in v0.13.175

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

func CountSymbolsInResult added in v0.13.293

func CountSymbolsInResult(gs *sgc7game.GameScene, symbols []int, ret *sgc7game.Result) int

func GenDefaultScene added in v0.13.305

func GenDefaultScene(game *Game, bet int) (*sgc7game.GameScene, error)

func GenInitialArr added in v0.13.178

func GenInitialArr(l int) []int

GenInitialArr - return [0,1,2...]

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 HasSymbolsInResult added in v0.13.244

func HasSymbolsInResult(gs *sgc7game.GameScene, symbols []int, ret *sgc7game.Result) 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 IsInitialArr added in v0.13.178

func IsInitialArr(arr []int) bool

IsInitialArr - is the arr [0,1,2...]

func IsSameIntArr added in v0.13.189

func IsSameIntArr(arr []int, arr1 []int) bool

func IsValidPosWithHeight added in v0.13.464

func IsValidPosWithHeight(x, y int, curHeight, height int, isReversalHeight bool) bool

func NewStats2 added in v0.13.8

func NewStats2(components *ComponentList) *stats2.Stats

func SaveIntWeights added in v0.13.369

func SaveIntWeights(f *excelize.File, sheet string, vw *sgc7game.ValWeights2) error

func SaveLineData added in v0.13.369

func SaveLineData(f *excelize.File, sheet string, ld *sgc7game.LineData) error

func SavePaytable added in v0.13.369

func SavePaytable(f *excelize.File, sheet string, pt *sgc7game.PayTables) error

func SaveReels added in v0.13.369

func SaveReels(f *excelize.File, sheet string, pt *sgc7game.PayTables, reels *sgc7game.ReelsData) error

func SaveStrWeights added in v0.13.369

func SaveStrWeights(f *excelize.File, sheet string, vw *sgc7game.ValWeights2) error

func SaveSymbolWeights added in v0.13.369

func SaveSymbolWeights(f *excelize.File, sheet string, pt *sgc7game.PayTables, vw *sgc7game.ValWeights2) error

func SetAllowForceOutcome added in v0.13.11

func SetAllowForceOutcome(maxTry int)

func SetAllowFullComponentHistory added in v0.13.327

func SetAllowFullComponentHistory()

func SetAllowStatsV2 added in v0.13.8

func SetAllowStatsV2()

func SetIgnoreGenDefaultScene added in v0.13.552

func SetIgnoreGenDefaultScene()

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 SetRngLibConfig added in v0.13.433

func SetRngLibConfig(fn string)

func Shuffle added in v0.13.178

func Shuffle(arr []int, plugin sgc7plugin.IPlugin) ([]int, error)

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, isNotAutoSelect bool) ([]*sgc7game.PlayResult, error)

func StartRTP

func StartRTP(gamecfg string, icore int, ispinnums int64, outputPath string, bet int64, coin int64, funcNewRNG FuncNewRNG, funcNewFeatureLevel FuncNewFeatureLevel, wincap int64) error

func StartRTPWithData added in v0.13.106

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

func String2Property

func String2Property(str string) (int, error)

Types

type AddSymbolNumType added in v0.13.295

type AddSymbolNumType int
const (
	AddSymbolNumTypeNumber            AddSymbolNumType = 0 // 数字
	AddSymbolNumTypeWeight            AddSymbolNumType = 1 // 权重表
	AddSymbolNumTypeIncUntilTriggered AddSymbolNumType = 2 // 不停的加数量,直到触发器触发
)

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

func (addSymbols *AddSymbols) NewComponentData() IComponentData

NewComponentData -

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"`
	StrType                string                `yaml:"type" json:"type"`
	Type                   AddSymbolsType        `yaml:"-" json:"-"`
	Symbol                 string                `yaml:"symbol" json:"symbol"`
	SymbolCode             int                   `yaml:"-" json:"-"`
	StrSymbolNumType       string                `yaml:"symbolNumType" json:"symbolNumType"`
	SymbolNumType          AddSymbolNumType      `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:"-"`
	SymbolNumTrigger       string                `yaml:"symbolNumTrigger" json:"symbolNumTrigger"`
	Height                 int                   `yaml:"height" json:"height"`
	SrcPositionCollections []string              `yaml:"srcPositionCollections" json:"srcPositionCollections"`
}

AddSymbolsConfig - configuration for AddSymbols

func (*AddSymbolsConfig) SetLinkComponent added in v0.13.47

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

SetLinkComponent

type AddSymbolsData added in v0.13.275

type AddSymbolsData struct {
	BasicComponentData
	SymbolNum int
	// contains filtered or unexported fields
}

func (*AddSymbolsData) BuildPBComponentData added in v0.13.275

func (addSymbolsData *AddSymbolsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*AddSymbolsData) ChgConfigIntVal added in v0.13.388

func (addSymbolsData *AddSymbolsData) ChgConfigIntVal(key string, off int) int

ChgConfigIntVal -

func (*AddSymbolsData) Clone added in v0.13.275

func (addSymbolsData *AddSymbolsData) Clone() IComponentData

Clone

func (*AddSymbolsData) GetValEx added in v0.13.336

func (addSymbolsData *AddSymbolsData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*AddSymbolsData) OnNewGame added in v0.13.275

func (addSymbolsData *AddSymbolsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type AddSymbolsType added in v0.13.259

type AddSymbolsType int
const (
	AddSymbolsTypeNormal              AddSymbolsType = 0 // 普通
	AddSymbolsTypeNoSameReel          AddSymbolsType = 1 // 不能加在同一轴上
	AddSymbolsTypeNoSameReelAndIgnore AddSymbolsType = 2 // 也不能加在和ignore symbol同一轴上
	AddSymbolsTypePositionCollection  AddSymbolsType = 3 // 在 positionCollection 的位置上加 symbol
)

type AdjacentPayTrigger added in v0.13.305

type AdjacentPayTrigger struct {
	*BasicComponent `json:"-"`
	Config          *AdjacentPayTriggerConfig `json:"config"`
}

func (*AdjacentPayTrigger) CanTriggerWithScene added in v0.13.305

func (adjacentPayTrigger *AdjacentPayTrigger) CanTriggerWithScene(gameProp *GameProperty, gs *sgc7game.GameScene, curpr *sgc7game.PlayResult, stake *sgc7game.Stake, icd IComponentData) (bool, []*sgc7game.Result)

CanTriggerWithScene -

func (*AdjacentPayTrigger) GetAllLinkComponents added in v0.13.305

func (adjacentPayTrigger *AdjacentPayTrigger) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*AdjacentPayTrigger) GetNextLinkComponents added in v0.13.305

func (adjacentPayTrigger *AdjacentPayTrigger) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

func (*AdjacentPayTrigger) GetWinMulti added in v0.13.305

func (adjacentPayTrigger *AdjacentPayTrigger) GetWinMulti(basicCD *BasicComponentData) int

func (*AdjacentPayTrigger) Init added in v0.13.305

func (adjacentPayTrigger *AdjacentPayTrigger) Init(fn string, pool *GamePropertyPool) error

Init -

func (*AdjacentPayTrigger) InitEx added in v0.13.305

func (adjacentPayTrigger *AdjacentPayTrigger) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*AdjacentPayTrigger) NewComponentData added in v0.13.305

func (adjacentPayTrigger *AdjacentPayTrigger) NewComponentData() IComponentData

NewComponentData -

func (*AdjacentPayTrigger) NewStats2 added in v0.13.305

func (adjacentPayTrigger *AdjacentPayTrigger) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*AdjacentPayTrigger) OnAsciiGame added in v0.13.305

func (adjacentPayTrigger *AdjacentPayTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*AdjacentPayTrigger) OnPlayGame added in v0.13.305

func (adjacentPayTrigger *AdjacentPayTrigger) 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 (*AdjacentPayTrigger) OnStats2 added in v0.13.305

func (adjacentPayTrigger *AdjacentPayTrigger) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

func (*AdjacentPayTrigger) ProcControllers added in v0.13.376

func (adjacentPayTrigger *AdjacentPayTrigger) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type AdjacentPayTriggerConfig added in v0.13.305

type AdjacentPayTriggerConfig 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
	SetWinSymbols        []string            `yaml:"setWinSymbols" json:"setWinSymbols"`
}

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

func (*AdjacentPayTriggerConfig) SetLinkComponent added in v0.13.305

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

SetLinkComponent

type AdjacentPayTriggerData added in v0.13.305

type AdjacentPayTriggerData struct {
	BasicComponentData
	NextComponent     string
	SymbolNum         int
	WildNum           int
	RespinNum         int
	Wins              int
	WinMulti          int
	AvgSymbolValMulti int // 平均的symbolVal倍数,用整数来表达浮点数,100是1倍
	SymbolCodes       []int
}

func (*AdjacentPayTriggerData) BuildPBComponentData added in v0.13.305

func (adjacentPayTriggerData *AdjacentPayTriggerData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*AdjacentPayTriggerData) Clone added in v0.13.305

func (adjacentPayTriggerData *AdjacentPayTriggerData) Clone() IComponentData

Clone

func (*AdjacentPayTriggerData) GetSymbolCodes added in v0.13.596

func (adjacentPayTriggerData *AdjacentPayTriggerData) GetSymbolCodes() []int

func (*AdjacentPayTriggerData) GetValEx added in v0.13.336

func (adjacentPayTriggerData *AdjacentPayTriggerData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*AdjacentPayTriggerData) OnNewGame added in v0.13.305

func (adjacentPayTriggerData *AdjacentPayTriggerData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*AdjacentPayTriggerData) SetSymbolCodes added in v0.13.596

func (adjacentPayTriggerData *AdjacentPayTriggerData) SetSymbolCodes(symbolCodes []int)

type AlignTropiCoolSPGrid added in v0.13.711

type AlignTropiCoolSPGrid struct {
	*BasicComponent `json:"-"`
	Config          *AlignTropiCoolSPGridConfig `json:"config"`
}

func (*AlignTropiCoolSPGrid) Init added in v0.13.711

func (gen *AlignTropiCoolSPGrid) Init(fn string, pool *GamePropertyPool) error

Init - load from file

func (*AlignTropiCoolSPGrid) InitEx added in v0.13.711

func (gen *AlignTropiCoolSPGrid) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config object

func (*AlignTropiCoolSPGrid) OnAsciiGame added in v0.13.711

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

OnAsciiGame - output to asciigame (no-op)

func (*AlignTropiCoolSPGrid) OnPlayGame added in v0.13.711

func (gen *AlignTropiCoolSPGrid) 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)

OnPlayGame - minimal implementation: does nothing but advance

type AlignTropiCoolSPGridConfig added in v0.13.711

type AlignTropiCoolSPGridConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	SPGrid               string `yaml:"spGrid" json:"spGrid"`
	BlankSymbol          string `yaml:"blankSymbol" json:"blankSymbol"`
	BlankSymbolCode      int    `yaml:"-" json:"-"`
	InitTropiCoolSPGrid  string `yaml:"initTropiCoolSPGrid" json:"initTropiCoolSPGrid"`
}

AlignTropiCoolSPGridConfig - configuration for AlignTropiCoolSPGrid

func (*AlignTropiCoolSPGridConfig) SetLinkComponent added in v0.13.711

func (cfg *AlignTropiCoolSPGridConfig) 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) GetStringVal added in v0.13.508

func (cfg *Award) GetStringVal(gameProp *GameProperty, i int) string

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) AddSPGrid added in v0.13.706

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

AddSPGrid -

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, icd IComponentData) (bool, []*sgc7game.Result)

CanTriggerWithScene -

func (*BasicComponent) ChgReelsCollector added in v0.13.531

func (basicComponent *BasicComponent) ChgReelsCollector(icd IComponentData, ps *PlayerState, betMethod int, bet int, reelsData []int)

func (*BasicComponent) ClearData added in v0.13.502

func (basicComponent *BasicComponent) ClearData(icd IComponentData, bForceNow bool)

ClearData -

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) GetSPGrid added in v0.13.706

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

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) InitPlayerState added in v0.13.519

func (basicComponent *BasicComponent) InitPlayerState(pool *GamePropertyPool, gameProp *GameProperty,
	plugin sgc7plugin.IPlugin, ps *PlayerState, betMethod int, bet int) error

InitPlayerState -

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) IsNeedOnStepEndStats2 added in v0.13.338

func (basicComponent *BasicComponent) IsNeedOnStepEndStats2() bool

IsNeedOnStepEndStats2 - 除respin外,如果也有component也需要在stepEnd调用的话,这里需要返回true

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) NewPlayerState added in v0.13.520

func (basicComponent *BasicComponent) NewPlayerState() IComponentPS

NewPlayerState - new IComponentPS

func (*BasicComponent) NewSPGrid added in v0.13.706

func (basicComponent *BasicComponent) NewSPGrid(spgrid string, gameProp *GameProperty, curpr *sgc7game.PlayResult,
	w int, h int, basicCD *BasicComponentData)

AddSPGrid -

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, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

func (*BasicComponent) OnUpdateDataWithPlayerState added in v0.13.612

func (basicComponent *BasicComponent) OnUpdateDataWithPlayerState(pool *GamePropertyPool, gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, ps *PlayerState, betMethod int, bet int, cd IComponentData)

OnUpdateDataWithPlayerState -

func (*BasicComponent) ProcControllers added in v0.13.376

func (basicComponent *BasicComponent) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

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
	MapUsedSPGric         map[string][]int
	Pos                   []int
}

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) AddSymbolCodes added in v0.13.735

func (basicComponentData *BasicComponentData) AddSymbolCodes(symbolCodes []int)

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

ChgConfigIntVal -

func (*BasicComponentData) ChgMask added in v0.13.39

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

ChgMask -

func (*BasicComponentData) ChgReelsCollector added in v0.13.531

func (basicComponentData *BasicComponentData) ChgReelsCollector(reelsData []int)

func (*BasicComponentData) ClearConfigIntVal added in v0.13.67

func (basicComponentData *BasicComponentData) ClearConfigIntVal(key string)

ClearConfigIntVal -

func (*BasicComponentData) ClearPos added in v0.13.599

func (basicComponentData *BasicComponentData) ClearPos()

ClearPos -

func (*BasicComponentData) ClearSymbolCodes added in v0.13.735

func (basicComponentData *BasicComponentData) ClearSymbolCodes()

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) GetCurRespinNum added in v0.13.578

func (basicComponentData *BasicComponentData) GetCurRespinNum() int

GetCurRespinNum -

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) GetStrVal added in v0.13.273

func (basicComponentData *BasicComponentData) GetStrVal(key string) (string, bool)

GetStrVal -

func (*BasicComponentData) GetStringOutput added in v0.13.57

func (basicComponentData *BasicComponentData) GetStringOutput() string

GetStringOutput -

func (*BasicComponentData) GetSymbolCodes added in v0.13.596

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

func (*BasicComponentData) GetSymbols added in v0.13.39

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

GetSymbols -

func (*BasicComponentData) GetValEx added in v0.13.332

func (basicComponentData *BasicComponentData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

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

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

LoadPB

func (*BasicComponentData) MergePosList added in v0.13.722

func (basicComponentData *BasicComponentData) MergePosList(pos []int)

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) SetSymbolCodes added in v0.13.596

func (basicComponentData *BasicComponentData) SetSymbolCodes(symbolCodes []int)

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

func (rng *BasicRNG) Clone() IRNG

func (*BasicRNG) GetCurRNG added in v0.13.135

func (rng *BasicRNG) GetCurRNG(betMode int, gameProp *GameProperty, curComponent IComponent, cd IComponentData, fl IFeatureLevel) (bool, int, sgc7plugin.IPlugin, string)

GetCurRNG -

func (*BasicRNG) OnChoiceBranch added in v0.13.277

func (rng *BasicRNG) OnChoiceBranch(betMode int, curComponent IComponent, branchName string) error

OnChoiceBranch -

func (*BasicRNG) OnNewGame added in v0.13.135

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

OnNewGame -

func (*BasicRNG) OnStepEnd added in v0.13.322

func (rng *BasicRNG) OnStepEnd(betMode int, gp *GameParams, pr *sgc7game.PlayResult, prs []*sgc7game.PlayResult) error

OnStepEnd -

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

func (*BasicReels) ProcControllers added in v0.13.376

func (basicReels *BasicReels) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type BasicReels2 added in v0.13.691

type BasicReels2 struct {
	*BasicComponent `json:"-"`
	Config          *BasicReels2Config `json:"config"`
}

func (*BasicReels2) Init added in v0.13.691

func (basicReels2 *BasicReels2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*BasicReels2) InitEx added in v0.13.691

func (basicReels2 *BasicReels2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*BasicReels2) OnAsciiGame added in v0.13.691

func (basicReels2 *BasicReels2) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*BasicReels2) OnPlayGame added in v0.13.691

func (basicReels2 *BasicReels2) 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 (*BasicReels2) ProcControllers added in v0.13.691

func (basicReels2 *BasicReels2) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type BasicReels2Config added in v0.13.691

type BasicReels2Config struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	ReelSet              string   `yaml:"reelSet" json:"reelSet"`
	IsExpandReel         bool     `yaml:"isExpandReel" json:"isExpandReel"`
	Height               int      `yaml:"height" json:"height"`
	MaskX                string   `yaml:"maskX" json:"maskX"`
	MaskY                string   `yaml:"maskY" json:"maskY"`
	MustTrigger          []string `yaml:"mustTrigger" json:"mustTrigger"`
	Controllers          []*Award `yaml:"controllers" json:"controllers"` // 新的奖励系统
}

BasicReels2Config - configuration for BasicReels2

func (*BasicReels2Config) SetLinkComponent added in v0.13.691

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

SetLinkComponent

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

	ForceEndings []string `yaml:"-"`
	// contains filtered or unexported fields
}

func (*BetConfig) Reset added in v0.13.164

func (betCfg *BetConfig) Reset(start string, endings []string)

type BetMethodPS added in v0.13.519

type BetMethodPS struct {
	MapBet map[int]*BetPS `json:"mapBet"`
}

func (*BetMethodPS) GetBetCPS added in v0.13.519

func (bmps *BetMethodPS) GetBetCPS(bet int, componentName string) IComponentPS

func (*BetMethodPS) GetBetPS added in v0.13.519

func (bmps *BetMethodPS) GetBetPS(bet int) *BetPS

func (*BetMethodPS) HasBetPS added in v0.13.519

func (bmps *BetMethodPS) HasBetPS(bet int) bool

func (*BetMethodPS) Rebuild added in v0.13.521

func (bmps *BetMethodPS) Rebuild()

type BetPS added in v0.13.519

type BetPS struct {
	MapString        map[string]string       `json:"mapComponentData"`
	MapComponentData map[string]IComponentPS `json:"-"`
}

func (*BetPS) Rebuild added in v0.13.521

func (bps *BetPS) Rebuild()

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 Bomb added in v0.13.447

type Bomb struct {
	*BasicComponent `json:"-"`
	Config          *BombConfig `json:"config"`
}

func (*Bomb) Init added in v0.13.447

func (bomb *Bomb) Init(fn string, pool *GamePropertyPool) error

Init -

func (*Bomb) InitEx added in v0.13.447

func (bomb *Bomb) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*Bomb) NewComponentData added in v0.13.447

func (burstSymbols *Bomb) NewComponentData() IComponentData

NewComponentData -

func (*Bomb) OnAsciiGame added in v0.13.447

func (burstSymbols *Bomb) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*Bomb) OnPlayGame added in v0.13.447

func (bomb *Bomb) 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 (*Bomb) ProcControllers added in v0.13.447

func (bomb *Bomb) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type BombConfig added in v0.13.447

type BombConfig struct {
	BasicComponentConfig      `yaml:",inline" json:",inline"`
	BombWidth                 int            `json:"bombWidth"`
	BombHeight                int            `json:"bombHeight"`
	StrBombSourceType         string         `json:"bombSourceType"`
	BombSourceType            BombSourceType `json:"-"`
	SourceSymbols             []string       `json:"sourceSymbols"`
	SourceSymbolCodes         []int          `json:"-"`
	BombData                  [][]int        `json:"bombData"`
	SourcePositionCollection  string         `json:"sourcePositionCollection"`
	SelectSourceNumber        int            `json:"selectSourceNumber"`
	IgnoreSymbols             []string       `json:"ignoreSymbols"`
	IgnoreSymbolCodes         []int          `json:"-"`
	StrBombTargetType         string         `json:"bombTargetType"`
	BombTargetType            BombTargetType `json:"-"`
	TargetSymbol              string         `json:"targetSymbol"`
	TargetSymbolCode          int            `json:"-"`
	OutputToComponent         string         `json:"outputToComponent"`
	IgnoreWinResults          []string       `json:"ignoreWinResults"`
	IgnorePositionCollections []string       `json:"ignorePositionCollections"`
	Controllers               []*Award       `yaml:"controllers" json:"controllers"` // 新的奖励系统
}

BombConfig - configuration for Bomb

func (*BombConfig) SetLinkComponent added in v0.13.447

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

SetLinkComponent

type BombData added in v0.13.447

type BombData struct {
	BasicComponentData
	Pos [][]int
}

func (*BombData) AddPos added in v0.13.447

func (bombData *BombData) AddPos(x int, y int)

AddPos -

func (*BombData) BuildPBComponentData added in v0.13.447

func (bombData *BombData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*BombData) ClearPos added in v0.13.599

func (bombData *BombData) ClearPos()

ClearPos -

func (*BombData) Clone added in v0.13.447

func (bombData *BombData) Clone() IComponentData

Clone

func (*BombData) GetPos added in v0.13.447

func (bombData *BombData) GetPos() []int

GetPos -

func (*BombData) HasPos added in v0.13.447

func (bombData *BombData) HasPos(x int, y int) bool

HasPos -

func (*BombData) OnNewGame added in v0.13.447

func (bombData *BombData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type BombSourceType added in v0.13.447

type BombSourceType int
const (
	BSTypePositionCollection BombSourceType = 0
	BSTypeSymbols            BombSourceType = 1
)

type BombTargetType added in v0.13.447

type BombTargetType int
const (
	BTTypeSymbols BombTargetType = 0
	BTTypeRemove  BombTargetType = 1
)

type BranchNode added in v0.13.17

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

BranchNode defines configuration for a single branch value. It contains optional Awards to trigger and the component name to jump to.

type BurstSymbols added in v0.13.202

type BurstSymbols struct {
	*BasicComponent `json:"-"`
	Config          *BurstSymbolsConfig `json:"config"`
}

func (*BurstSymbols) Init added in v0.13.202

func (burstSymbols *BurstSymbols) Init(fn string, pool *GamePropertyPool) error

Init -

func (*BurstSymbols) InitEx added in v0.13.202

func (burstSymbols *BurstSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*BurstSymbols) NewComponentData added in v0.13.210

func (burstSymbols *BurstSymbols) NewComponentData() IComponentData

NewComponentData -

func (*BurstSymbols) OnAsciiGame added in v0.13.202

func (burstSymbols *BurstSymbols) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*BurstSymbols) OnPlayGame added in v0.13.202

func (burstSymbols *BurstSymbols) 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 (*BurstSymbols) ProcControllers added in v0.13.376

func (burstSymbols *BurstSymbols) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type BurstSymbolsConfig added in v0.13.202

type BurstSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrBurstType         string                 `yaml:"burstType" json:"burstType"`
	BurstType            BurstSymbolsType       `yaml:"-" json:"-"`
	BurstNumber          int                    `yaml:"burstNumber" json:"burstNumber"`
	StrSourceType        string                 `yaml:"burstSymbolsSourceType" json:"burstSymbolsSourceType"`
	SourceType           BurstSymbolsSourceType `yaml:"-" json:"-"`
	SourceSymbols        []string               `yaml:"sourceSymbols" json:"sourceSymbols"`
	SourceSymbolCodes    []int                  `yaml:"-" json:"-"`
	IgnoreSymbols        []string               `yaml:"ignoreSymbols" json:"ignoreSymbols"`
	IgnoreSymbolCodes    []int                  `yaml:"-" json:"-"`
	OverrideSymbol       string                 `yaml:"overrideSymbol" json:"overrideSymbol"`
	OverrideSymbolCode   int                    `yaml:"-" json:"-"`
	PositionCollection   string                 `yaml:"positionCollection" json:"positionCollection"`
	Controllers          []*Award               `yaml:"controllers" json:"controllers"`         // 新的奖励系统
	JumpToComponent      string                 `yaml:"jumpToComponent" json:"jumpToComponent"` // jump to
}

BurstSymbolsConfig - configuration for BurstSymbols

func (*BurstSymbolsConfig) SetLinkComponent added in v0.13.202

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

SetLinkComponent

type BurstSymbolsData added in v0.13.210

type BurstSymbolsData struct {
	BasicComponentData
	Pos [][]int
}

func (*BurstSymbolsData) AddPos added in v0.13.210

func (burstSymbolsData *BurstSymbolsData) AddPos(x int, y int)

AddPos -

func (*BurstSymbolsData) BuildPBComponentData added in v0.13.210

func (burstSymbolsData *BurstSymbolsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*BurstSymbolsData) ClearPos added in v0.13.599

func (burstSymbolsData *BurstSymbolsData) ClearPos()

ClearPos -

func (*BurstSymbolsData) Clone added in v0.13.210

func (burstSymbolsData *BurstSymbolsData) Clone() IComponentData

Clone

func (*BurstSymbolsData) GetPos added in v0.13.210

func (burstSymbolsData *BurstSymbolsData) GetPos() []int

GetPos -

func (*BurstSymbolsData) HasPos added in v0.13.210

func (burstSymbolsData *BurstSymbolsData) HasPos(x int, y int) bool

HasPos -

func (*BurstSymbolsData) OnNewGame added in v0.13.210

func (burstSymbolsData *BurstSymbolsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*BurstSymbolsData) OnNewStep added in v0.13.210

func (burstSymbolsData *BurstSymbolsData) OnNewStep()

OnNewStep -

type BurstSymbolsSourceType added in v0.13.202

type BurstSymbolsSourceType int
const (
	BSSTypeSymbols            BurstSymbolsSourceType = 0
	BSSTypePositionCollection BurstSymbolsSourceType = 1
)

type BurstSymbolsType added in v0.13.202

type BurstSymbolsType int
const (
	BSTypeDiffusion BurstSymbolsType = 0
	BSTypeSurround4 BurstSymbolsType = 1
	BSTypeSurround8 BurstSymbolsType = 2
)

type CPCore added in v0.13.782

type CPCore struct {
	*BasicComponent `json:"-"`
	Config          *CPCoreConfig `json:"config"`
}

func (*CPCore) Init added in v0.13.782

func (cpc *CPCore) Init(fn string, pool *GamePropertyPool) error

Init - load from file (placeholder)

func (*CPCore) InitEx added in v0.13.782

func (cpc *CPCore) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config object (placeholder)

func (*CPCore) NewComponentData added in v0.13.782

func (cpc *CPCore) NewComponentData() IComponentData

NewComponentData -

func (*CPCore) OnAsciiGame added in v0.13.782

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

OnAsciiGame - placeholder

func (*CPCore) OnPlayGame added in v0.13.782

func (cpc *CPCore) 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)

OnPlayGame - placeholder

type CPCoreConfig added in v0.13.782

type CPCoreConfig struct {
	BasicComponentConfig    `yaml:",inline" json:",inline"`
	CategoryCount           int                 `yaml:"categoryCount" json:"categoryCount"`
	MapSymbol               map[string][]string `yaml:"mapSymbol" json:"mapSymbol"`
	MapSymbolCode           map[int][]int       `yaml:"-" json:"-"`
	BlankSymbol             string              `yaml:"blankSymbol" json:"blankSymbol"`
	BlankSymbolCode         int                 `yaml:"-" json:"-"`
	WildSymbol              string              `yaml:"wildSymbol" json:"wildSymbol"`
	WildSymbolCode          int                 `yaml:"-" json:"-"`
	WildUsedSymbolCode      int                 `yaml:"-" json:"-"`
	CoinSymbols             []string            `yaml:"coinSymbols" json:"coinSymbols"`
	CoinSymbolCodes         []int               `yaml:"-" json:"-"`
	UpLevelSymbols          []string            `yaml:"upLevelSymbols" json:"upLevelSymbols"`
	UpLevelSymbolCodes      []int               `yaml:"-" json:"-"`
	AllUpLevelSymbols       []string            `yaml:"allUpLevelSymbol" json:"allUpLevelSymbol"`
	AllUpLevelSymbolCodes   []int               `yaml:"-" json:"-"`
	SwitcherSymbol          string              `yaml:"switcherSymbol" json:"switcherSymbol"`
	SwitcherSymbolCode      int                 `yaml:"-" json:"-"`
	PopcornSymbol           string              `yaml:"popcornSymbol" json:"popcornSymbol"`
	PopcornSymbolCode       int                 `yaml:"-" json:"-"`
	EggSymbol               string              `yaml:"eggSymbol" json:"eggSymbol"`
	EggSymbolCode           int                 `yaml:"-" json:"-"`
	EggUsedSymbolCode       int                 `yaml:"-" json:"-"`
	DontPressSymbol         string              `yaml:"dontpressSymbol" json:"dontpressSymbol"`
	DontPressSymbolCode     int                 `yaml:"-" json:"-"`
	DontPressUsedSymbolCode int                 `yaml:"-" json:"-"`

	CollectorMaxLevel    int                   `yaml:"collectorMaxLevel" json:"collectorMaxLevel"`
	CollectorNumber      int                   `yaml:"collectorNumber" json:"collectorNumber"`
	CoinWeight           string                `yaml:"coinWeight" json:"coinWeight"`
	CoinWeightVW         *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	CollectorReleasedNum int                   `yaml:"collectorReleasedNum" json:"collectorReleasedNum"`
	SpSymbolWeight       string                `yaml:"spSymbolWeight" json:"spSymbolWeight"`
	SpSymbolWeightVW     *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	BonusSymbol          string                `yaml:"bonusSymbol" json:"bonusSymbol"`
	BonusSymbolCode      int                   `yaml:"-" json:"-"`
	SpSymbolNumWeight    string                `yaml:"spSymbolNumWeight" json:"spSymbolNumWeight"`
	SpSymbolNumWeightVW  *sgc7game.ValWeights2 `yaml:"-" json:"-"`

	MapControllers map[string][]*Award `yaml:"mapControllers" json:"mapControllers"` // 新的奖励系统
	// contains filtered or unexported fields
}

CPCoreConfig - placeholder configuration for CPCore

func (*CPCoreConfig) SetLinkComponent added in v0.13.782

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

SetLinkComponent

type CPCoreData added in v0.13.782

type CPCoreData struct {
	BasicComponentData
	// contains filtered or unexported fields
}

func (*CPCoreData) BuildPBComponentData added in v0.13.782

func (gcd *CPCoreData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*CPCoreData) Clone added in v0.13.782

func (gcd *CPCoreData) Clone() IComponentData

Clone

func (*CPCoreData) OnNewGame added in v0.13.782

func (gcd *CPCoreData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type Calculator added in v0.13.743

type Calculator struct {
	*BasicComponent `json:"-"`
	Config          *CalculatorConfig `json:"config"`
}

func (*Calculator) Init added in v0.13.743

func (c *Calculator) Init(fn string, pool *GamePropertyPool) error

Init - load from yaml file

func (*Calculator) InitEx added in v0.13.743

func (c *Calculator) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config object

func (*Calculator) OnAsciiGame added in v0.13.743

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

OnAsciiGame - placeholder ascii representation

func (*Calculator) OnPlayGame added in v0.13.743

func (c *Calculator) 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)

OnPlayGame - placeholder: does nothing and move on to next

func (*Calculator) ProcControllers added in v0.13.743

func (c *Calculator) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

ProcControllers -

type CalculatorConfig added in v0.13.743

type CalculatorConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Input1               int    `yaml:"input1" json:"input1"`
	Input2               int    `yaml:"input2" json:"input2"`
	Formula              string `yaml:"formula" json:"formula"`

	MapControllers map[string][]*Award `yaml:"controllers" json:"controllers"`
	// contains filtered or unexported fields
}

CalculatorConfig - configuration for Calculator

func (*CalculatorConfig) SetLinkComponent added in v0.13.743

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

SetLinkComponent - set link, only "next" supported

type CalculatorCore added in v0.13.743

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

CalculatorCore - 基础的计算器核心

func NewCalculatorCore added in v0.13.743

func NewCalculatorCore(code string) (*CalculatorCore, error)

func (*CalculatorCore) CalcVal added in v0.13.743

func (cc *CalculatorCore) CalcVal(inputs []int) (int, error)

func (*CalculatorCore) SetScript added in v0.13.743

func (cc *CalculatorCore) SetScript(code string) error

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() *CallStack

func (*CallStack) StartEachSymbols added in v0.13.39

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

type CascadingRegulator added in v0.13.578

type CascadingRegulator struct {
	*BasicComponent `json:"-"`
	Config          *CascadingRegulatorConfig `json:"config"`
}

func (*CascadingRegulator) EachUsedResults added in v0.13.578

func (cascadingRegulator *CascadingRegulator) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*CascadingRegulator) Init added in v0.13.578

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

Init -

func (*CascadingRegulator) InitEx added in v0.13.578

func (cascadingRegulator *CascadingRegulator) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*CascadingRegulator) NewComponentData added in v0.13.578

func (cascadingRegulator *CascadingRegulator) NewComponentData() IComponentData

NewComponentData -

func (*CascadingRegulator) OnAsciiGame added in v0.13.578

func (cascadingRegulator *CascadingRegulator) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*CascadingRegulator) OnPlayGame added in v0.13.578

func (cascadingRegulator *CascadingRegulator) 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 CascadingRegulatorConfig added in v0.13.578

type CascadingRegulatorConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string                    `yaml:"type" json:"type"`
	Type                 CascadingRegulatorType    `yaml:"-" json:"-"`
	MaxRespinNum         int                       `yaml:"maxRespinNum" json:"maxRespinNum"` // maxRespinNum
	Mystery              string                    `yaml:"mystery" json:"mystery"`           // mystery
	MysteryCode          int                       `yaml:"-" json:"-"`
	CoreRespin           string                    `yaml:"coreRespin" json:"coreRespin"`       // coreRespin
	StrWinType           string                    `yaml:"winType" json:"winType"`             // winType
	WinType              CascadingRegulatorWinType `yaml:"-" json:"-"`                         //
	MysteryWeight        string                    `yaml:"mysteryWeight" json:"mysteryWeight"` // mysteryWeight
	MysteryWeightVW      *sgc7game.ValWeights2     `yaml:"-" json:"-"`
	// contains filtered or unexported fields
}

CascadingRegulatorConfig - configuration for CascadingRegulator

func (*CascadingRegulatorConfig) SetLinkComponent added in v0.13.578

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

SetLinkComponent

type CascadingRegulatorData added in v0.13.578

type CascadingRegulatorData struct {
	BasicComponentData
}

func (*CascadingRegulatorData) BuildPBComponentData added in v0.13.578

func (cascadingRegulatorData *CascadingRegulatorData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*CascadingRegulatorData) Clone added in v0.13.578

func (cascadingRegulatorData *CascadingRegulatorData) Clone() IComponentData

Clone

func (*CascadingRegulatorData) OnNewGame added in v0.13.578

func (cascadingRegulatorData *CascadingRegulatorData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type CascadingRegulatorType added in v0.13.578

type CascadingRegulatorType int
const (
	CRTypeMysteryOnReels CascadingRegulatorType = 0
)

type CascadingRegulatorWinType added in v0.13.578

type CascadingRegulatorWinType int
const (
	CRWTypeLines   CascadingRegulatorWinType = 0
	CRWTypeWays    CascadingRegulatorWinType = 1
	CRWTypeScatter CascadingRegulatorWinType = 2
	CRWTypeCluster CascadingRegulatorWinType = 3
)

type CatchSymbols added in v0.13.202

type CatchSymbols struct {
	*BasicComponent `json:"-"`
	Config          *CatchSymbolsConfig `json:"config"`
}

func (*CatchSymbols) Init added in v0.13.202

func (catchSymbols *CatchSymbols) Init(fn string, pool *GamePropertyPool) error

Init -

func (*CatchSymbols) InitEx added in v0.13.202

func (catchSymbols *CatchSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*CatchSymbols) NewComponentData added in v0.13.210

func (catchSymbols *CatchSymbols) NewComponentData() IComponentData

NewComponentData -

func (*CatchSymbols) OnAsciiGame added in v0.13.202

func (catchSymbols *CatchSymbols) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*CatchSymbols) OnPlayGame added in v0.13.202

func (catchSymbols *CatchSymbols) 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 (*CatchSymbols) ProcControllers added in v0.13.376

func (catchSymbols *CatchSymbols) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type CatchSymbolsConfig added in v0.13.202

type CatchSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrCatchType         string           `yaml:"catchType" json:"catchType"`
	CatchType            CatchSymbolsType `yaml:"-" json:"-"`
	SourceSymbols        []string         `yaml:"sourceSymbols" json:"sourceSymbols"`
	SourceSymbolCodes    []int            `yaml:"-" json:"-"`
	TargetSymbols        []string         `yaml:"targetSymbols" json:"targetSymbols"`
	TargetSymbolCodes    []int            `yaml:"-" json:"-"`
	IgnoreSymbols        []string         `yaml:"ignoreSymbols" json:"ignoreSymbols"`
	IgnoreSymbolCodes    []int            `yaml:"-" json:"-"`
	OverrideSymbol       string           `yaml:"overrideSymbol" json:"overrideSymbol"`
	OverrideSymbolCode   int              `yaml:"-" json:"-"`
	UpgradeSymbol        string           `yaml:"upgradeSymbol" json:"upgradeSymbol"`
	UpgradeSymbolCode    int              `yaml:"-" json:"-"`
	PositionCollection   string           `yaml:"positionCollection" json:"positionCollection"`
	Controllers          []*Award         `yaml:"controllers" json:"controllers"`         // 新的奖励系统
	JumpToComponent      string           `yaml:"jumpToComponent" json:"jumpToComponent"` // jump to
}

CatchSymbolsConfig - configuration for CatchSymbols

func (*CatchSymbolsConfig) SetLinkComponent added in v0.13.202

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

SetLinkComponent

type CatchSymbolsData added in v0.13.210

type CatchSymbolsData struct {
	BasicComponentData
	Pos       [][]int
	SymbolNum int
}

func (*CatchSymbolsData) AddPos added in v0.13.210

func (catchSymbolsData *CatchSymbolsData) AddPos(x int, y int)

AddPos -

func (*CatchSymbolsData) BuildPBComponentData added in v0.13.210

func (catchSymbolsData *CatchSymbolsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*CatchSymbolsData) ClearPos added in v0.13.599

func (catchSymbolsData *CatchSymbolsData) ClearPos()

ClearPos -

func (*CatchSymbolsData) Clone added in v0.13.210

func (catchSymbolsData *CatchSymbolsData) Clone() IComponentData

Clone

func (*CatchSymbolsData) GetPos added in v0.13.210

func (catchSymbolsData *CatchSymbolsData) GetPos() []int

GetPos -

func (*CatchSymbolsData) GetValEx added in v0.13.336

func (catchSymbolsData *CatchSymbolsData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*CatchSymbolsData) HasPos added in v0.13.210

func (catchSymbolsData *CatchSymbolsData) HasPos(x int, y int) bool

HasPos -

func (*CatchSymbolsData) OnNewGame added in v0.13.210

func (catchSymbolsData *CatchSymbolsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*CatchSymbolsData) OnNewStep added in v0.13.210

func (catchSymbolsData *CatchSymbolsData) OnNewStep()

OnNewStep -

type CatchSymbolsType added in v0.13.202

type CatchSymbolsType int
const (
	CSTypeRule1 CatchSymbolsType = 0
)

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 CheckVal added in v0.13.273

type CheckVal struct {
	*BasicComponent `json:"-"`
	Config          *CheckValConfig `json:"config"`
}

func (*CheckVal) GetAllLinkComponents added in v0.13.273

func (checkVal *CheckVal) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*CheckVal) GetNextLinkComponents added in v0.13.273

func (checkVal *CheckVal) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

func (*CheckVal) Init added in v0.13.273

func (checkVal *CheckVal) Init(fn string, pool *GamePropertyPool) error

Init -

func (*CheckVal) InitEx added in v0.13.273

func (checkVal *CheckVal) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*CheckVal) NewComponentData added in v0.13.273

func (checkVal *CheckVal) NewComponentData() IComponentData

NewComponentData -

func (*CheckVal) OnAsciiGame added in v0.13.273

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

OnAsciiGame - outpur to asciigame

func (*CheckVal) OnPlayGame added in v0.13.273

func (checkVal *CheckVal) 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 (*CheckVal) ProcControllers added in v0.13.376

func (checkVal *CheckVal) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type CheckValConfig added in v0.13.273

type CheckValConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string       `yaml:"type" json:"type"`
	Type                 CheckValType `yaml:"-" json:"-"`
	SourceVal            []string     `yaml:"sourceVal" json:"sourceVal"`
	ConstIntTarget       int          `yaml:"constIntTarget" json:"constIntTarget"`
	ConstTarget          string       `yaml:"constTarget" json:"constTarget"`
	TargetVal            []string     `yaml:"targetVal" json:"targetVal"`
	JumpToComponent      string       `yaml:"jumpToComponent" json:"jumpToComponent"`
	Controllers          []*Award     `yaml:"controllers" json:"controllers"` // 新的奖励系统
}

CheckValConfig - configuration for CheckVal

func (*CheckValConfig) SetLinkComponent added in v0.13.273

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

SetLinkComponent

type CheckValData added in v0.13.273

type CheckValData struct {
	BasicComponentData
	IsTrigger bool
}

func (*CheckValData) BuildPBComponentData added in v0.13.273

func (checkValData *CheckValData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*CheckValData) Clone added in v0.13.273

func (checkValData *CheckValData) Clone() IComponentData

Clone

func (*CheckValData) GetValEx added in v0.13.336

func (checkValData *CheckValData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*CheckValData) OnNewGame added in v0.13.273

func (checkValData *CheckValData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type CheckValType added in v0.13.476

type CheckValType int
const (
	CheckValTypeString CheckValType = 0
	CheckValTypeInt    CheckValType = 1
)

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) GetNumber added in v0.13.305

func (chgSymbolVals *ChgSymbolVals) GetNumber(cd *ChgSymbolValsData) int

func (*ChgSymbolVals) GetTarget added in v0.13.305

func (chgSymbolVals *ChgSymbolVals) GetTarget(cd *ChgSymbolValsData, plugin sgc7plugin.IPlugin) (int, error)

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:"-"`
	StrTargetType        string                  `yaml:"targetType" json:"targetType"`
	TargetType           ChgSymbolValsTargetType `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"`
	Row                  int                     `yaml:"minVal" json:"row"`
	Column               int                     `yaml:"minVal" json:"column"`
	Multi                int                     `yaml:"multi" json:"multi"`
	Number               int                     `yaml:"number" json:"number"`
	TargetWeight         string                  `yaml:"weight" json:"-"`
	TargetWeightVW2      *sgc7game.ValWeights2   `yaml:"-" json:"-"`
}

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

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) 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
	CSVSTypeRow                ChgSymbolValsSourceType = 2 // row
	CSVSTypeColumn             ChgSymbolValsSourceType = 3 // column
	CSVSTypeAll                ChgSymbolValsSourceType = 4 // all
)

type ChgSymbolValsTargetType added in v0.13.305

type ChgSymbolValsTargetType int
const (
	CSVTTypeNumber     ChgSymbolValsTargetType = 0 // number
	CSVTTypeWeight     ChgSymbolValsTargetType = 1 // weight
	CSVTTypeEachWeight ChgSymbolValsTargetType = 2 // each weight
)

type ChgSymbolValsType added in v0.13.89

type ChgSymbolValsType int
const (
	CSVTypeInc ChgSymbolValsType = 0 // ++
	CSVTypeDec ChgSymbolValsType = 1 // --
	CSVTypeMul ChgSymbolValsType = 2 // *=
	CSVTypeAdd ChgSymbolValsType = 3 // +=
	CSVTypeSet ChgSymbolValsType = 4 // =
)

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) GetSymbolCodes added in v0.13.350

func (chgSymbols *ChgSymbols) GetSymbolCodes(plugin sgc7plugin.IPlugin) ([]int, error)

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

func (chgSymbols *ChgSymbols) NewComponentData() IComponentData

NewComponentData -

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

func (*ChgSymbols) ProcControllers added in v0.13.376

func (chgSymbols *ChgSymbols) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type ChgSymbols2 added in v0.13.515

type ChgSymbols2 struct {
	*BasicComponent `json:"-"`
	Config          *ChgSymbols2Config `json:"config"`
}

func (*ChgSymbols2) GetAllLinkComponents added in v0.13.515

func (chgSymbols2 *ChgSymbols2) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*ChgSymbols2) GetNextLinkComponents added in v0.13.515

func (chgSymbols2 *ChgSymbols2) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

func (*ChgSymbols2) Init added in v0.13.515

func (chgSymbols2 *ChgSymbols2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ChgSymbols2) InitEx added in v0.13.515

func (chgSymbols2 *ChgSymbols2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ChgSymbols2) NewComponentData added in v0.13.515

func (chgSymbols2 *ChgSymbols2) NewComponentData() IComponentData

NewComponentData -

func (*ChgSymbols2) OnAsciiGame added in v0.13.515

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

OnAsciiGame - outpur to asciigame

func (*ChgSymbols2) OnPlayGame added in v0.13.515

func (chgSymbols2 *ChgSymbols2) 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 (*ChgSymbols2) ProcControllers added in v0.13.515

func (chgSymbols2 *ChgSymbols2) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type ChgSymbols2Config added in v0.13.515

type ChgSymbols2Config struct {
	BasicComponentConfig  `yaml:",inline" json:",inline"`
	StrSrcType            string                      `yaml:"srcType" json:"srcType"`
	SrcType               ChgSymbols2SourceType       `yaml:"-" json:"-"`
	StrSrcSymbolType      string                      `yaml:"srcSymbolType" json:"srcSymbolType"`
	SrcSymbolType         ChgSymbols2SourceSymbolType `yaml:"-" json:"-"`
	StrType               string                      `yaml:"type" json:"type"`
	Type                  ChgSymbols2Type             `yaml:"-" json:"-"`
	SrcRowMask            string                      `yaml:"srcRowMask" json:"srcRowMask"`
	SrcMask               string                      `yaml:"srcMask" json:"srcMask"`
	StrExitType           string                      `yaml:"exitType" json:"exitType"`
	ExitType              ChgSymbols2ExitType         `yaml:"-" json:"-"`
	IsAlwaysGen           bool                        `yaml:"isAlwaysGen" json:"isAlwaysGen"`
	Height                int                         `yaml:"Height" json:"Height"`
	SrcSymbols            []string                    `yaml:"srcSymbols" json:"srcSymbols"`
	SrcSymbolCodes        []int                       `yaml:"-" json:"-"`
	Weight                string                      `yaml:"weight" json:"weight"`
	WeightVW2             *sgc7game.ValWeights2       `yaml:"-" json:"-"`
	BlankSymbol           string                      `yaml:"blankSymbol" json:"blankSymbol"`
	BlankSymbolCode       int                         `yaml:"-" json:"-"`
	SrcPositionCollection []string                    `yaml:"srcPositionCollection" json:"srcPositionCollection"`
	SrcSymbolWeight       string                      `yaml:"srcSymbolWeight" json:"srcSymbolWeight"`
	SrcSymbolWeightVW2    *sgc7game.ValWeights2       `yaml:"-" json:"-"`
	Symbol                string                      `yaml:"symbol" json:"symbol"`
	SymbolCode            int                         `yaml:"-" json:"-"`
	SymbolCollection      string                      `json:"symbolCollection"`
	MaxNumber             int                         `yaml:"maxNumber" json:"maxNumber"`
	RowMask               string                      `yaml:"rowMask" json:"rowMask"`
	JumpToComponent       string                      `yaml:"jumpToComponent" json:"jumpToComponent"`
	OutputToComponent     string                      `yaml:"outputToComponent" json:"outputToComponent"`
	IsClearOutput         bool                        `yaml:"isClearOutput" json:"isClearOutput"`
	GenGigaSymbols2       string                      `yaml:"genGigaSymbols2" json:"genGigaSymbols2"`
	MapControllers        map[string][]*Award         `yaml:"controllers" json:"controllers"`
}

ChgSymbols2Config - configuration for ChgSymbols2

func (*ChgSymbols2Config) SetLinkComponent added in v0.13.515

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

SetLinkComponent

type ChgSymbols2Data added in v0.13.515

type ChgSymbols2Data struct {
	BasicComponentData
	Pos []int
	// contains filtered or unexported fields
}

func (*ChgSymbols2Data) AddPos added in v0.13.568

func (chgSymbolsData *ChgSymbols2Data) AddPos(x int, y int)

AddPos -

func (*ChgSymbols2Data) AddPosEx added in v0.13.568

func (chgSymbolsData *ChgSymbols2Data) AddPosEx(x int, y int)

AddPosEx -

func (*ChgSymbols2Data) BuildPBComponentData added in v0.13.568

func (chgSymbolsData *ChgSymbols2Data) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*ChgSymbols2Data) ChgConfigIntVal added in v0.13.515

func (chgSymbolsData *ChgSymbols2Data) ChgConfigIntVal(key string, off int) int

ChgConfigIntVal -

func (*ChgSymbols2Data) ClearPos added in v0.13.599

func (chgSymbolsData *ChgSymbols2Data) ClearPos()

ClearPos -

func (*ChgSymbols2Data) Clone added in v0.13.515

func (chgSymbolsData *ChgSymbols2Data) Clone() IComponentData

Clone

func (*ChgSymbols2Data) GetPos added in v0.13.568

func (chgSymbolsData *ChgSymbols2Data) GetPos() []int

GetPos -

func (*ChgSymbols2Data) HasPos added in v0.13.568

func (chgSymbolsData *ChgSymbols2Data) HasPos(x int, y int) bool

HasPos -

func (*ChgSymbols2Data) OnNewGame added in v0.13.515

func (chgSymbolsData *ChgSymbols2Data) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*ChgSymbols2Data) OnNewStep added in v0.13.568

func (chgSymbolsData *ChgSymbols2Data) OnNewStep()

OnNewStep -

type ChgSymbols2ExitType added in v0.13.515

type ChgSymbols2ExitType int
const (
	CS2ETypeNone       ChgSymbols2ExitType = 0
	CS2ETypeMaxNumber  ChgSymbols2ExitType = 1
	CS2ETypeNoSameReel ChgSymbols2ExitType = 2
)

type ChgSymbols2SourceSymbolType added in v0.13.515

type ChgSymbols2SourceSymbolType int
const (
	CS2SSTypeNone         ChgSymbols2SourceSymbolType = 0
	CS2SSTypeSymbols      ChgSymbols2SourceSymbolType = 1
	CS2SSTypeSymbolWeight ChgSymbols2SourceSymbolType = 2
	CS2SSTypeNoEmpty      ChgSymbols2SourceSymbolType = 3
)

type ChgSymbols2SourceType added in v0.13.515

type ChgSymbols2SourceType int
const (
	CS2STypeAll                ChgSymbols2SourceType = 0
	CS2STypeReels              ChgSymbols2SourceType = 1
	CS2STypeMask               ChgSymbols2SourceType = 2
	CS2STypePositionCollection ChgSymbols2SourceType = 3
	CS2STypeRowMask            ChgSymbols2SourceType = 4
	CS2STypeAllMask            ChgSymbols2SourceType = 5
)

func (ChgSymbols2SourceType) IsReelsMode added in v0.13.515

func (t ChgSymbols2SourceType) IsReelsMode() bool

type ChgSymbols2Type added in v0.13.515

type ChgSymbols2Type int
const (
	CS2TypeSymbol         ChgSymbols2Type = 0
	CS2TypeSymbolWeight   ChgSymbols2Type = 1
	CS2TypeMystery        ChgSymbols2Type = 2
	CS2TypeMysteryOnReels ChgSymbols2Type = 3
	CS2TypeUpSymbol       ChgSymbols2Type = 4
	CS2TypeEachPosRandom  ChgSymbols2Type = 5
	CS2TypeSymbols        ChgSymbols2Type = 6
)

type ChgSymbolsConfig added in v0.13.89

type ChgSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string                                `yaml:"chgSymbolsType" json:"-"`
	Type                 ChgSymbolsType                        `yaml:"-" json:"chgSymbolsType"`
	Symbols              []string                              `yaml:"symbols" json:"-"`
	SymbolCodes          []int                                 `yaml:"-" json:"symbols"`
	BlankSymbol          string                                `yaml:"blankSymbol" json:"-"`
	BlankSymbolCode      int                                   `yaml:"-" json:"blankSymbol"`
	SourceWeight         string                                `yaml:"sourceWeight" json:"sourceWeight"`
	SourceWeightVW2      *sgc7game.ValWeights2                 `yaml:"-" json:"-"`
	Weight               string                                `yaml:"weight" json:"-"`
	WeightVW2            *sgc7game.ValWeights2                 `yaml:"-" json:"-"`
	MaxNumber            int                                   `yaml:"maxNumber" json:"maxNumber"`
	IsAlwaysGen          bool                                  `yaml:"isAlwaysGen" json:"isAlwaysGen"`
	Controllers          []*Award                              `yaml:"controllers" json:"controllers"`
	JumpToComponent      string                                `yaml:"jumpToComponent" json:"jumpToComponent"`
	StrTriggers          []string                              `yaml:"triggers" json:"-"`
	Height               int                                   `yaml:"height" json:"height"`
	StrWeightOnReels     map[int]string                        `yaml:"weightOnReels" json:"weightOnReels"`
	WeightOnReels        map[int]*sgc7game.ValWeights2         `yaml:"-" json:"-"`
	MysteryOnReelsWeight []*ChgSymbolsMysteryOnReelsWeightData `yaml:"mysteryOnReelsWeight" json:"mysteryOnReelsWeight"`
}

ChgSymbolsConfig - configuration for ChgSymbols

func (*ChgSymbolsConfig) SetLinkComponent added in v0.13.89

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

SetLinkComponent

type ChgSymbolsData added in v0.13.388

type ChgSymbolsData struct {
	BasicComponentData
	// contains filtered or unexported fields
}

func (*ChgSymbolsData) ChgConfigIntVal added in v0.13.388

func (chgSymbolsData *ChgSymbolsData) ChgConfigIntVal(key string, off int) int

ChgConfigIntVal -

func (*ChgSymbolsData) Clone added in v0.13.388

func (chgSymbolsData *ChgSymbolsData) Clone() IComponentData

Clone

func (*ChgSymbolsData) OnNewGame added in v0.13.388

func (chgSymbolsData *ChgSymbolsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type ChgSymbolsInReels added in v0.13.568

type ChgSymbolsInReels struct {
	*BasicComponent `json:"-"`
	Config          *ChgSymbolsInReelsConfig `json:"config"`
}

func (*ChgSymbolsInReels) GetAllLinkComponents added in v0.13.568

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

GetAllLinkComponents - get all link components

func (*ChgSymbolsInReels) GetNextLinkComponents added in v0.13.568

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

GetNextLinkComponents - get next link components

func (*ChgSymbolsInReels) Init added in v0.13.568

func (chgSymbolsInReels *ChgSymbolsInReels) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ChgSymbolsInReels) InitEx added in v0.13.568

func (chgSymbolsInReels *ChgSymbolsInReels) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ChgSymbolsInReels) NewComponentData added in v0.13.568

func (chgSymbols *ChgSymbolsInReels) NewComponentData() IComponentData

NewComponentData -

func (*ChgSymbolsInReels) OnAsciiGame added in v0.13.568

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

OnAsciiGame - outpur to asciigame

func (*ChgSymbolsInReels) OnPlayGame added in v0.13.568

func (chgSymbols *ChgSymbolsInReels) 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 (*ChgSymbolsInReels) ProcControllers added in v0.13.568

func (chgSymbolsInReels *ChgSymbolsInReels) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type ChgSymbolsInReelsConfig added in v0.13.568

type ChgSymbolsInReelsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrSrcType           string                            `yaml:"srcType" json:"srcType"`
	SrcType              ChgSymbolsInReelsSourceType       `yaml:"-" json:"-"`
	StrSrcSymbolType     string                            `yaml:"srcSymbolType" json:"srcSymbolType"`
	SrcSymbolType        ChgSymbolsInReelsSourceSymbolType `yaml:"-" json:"-"`
	StrType              string                            `yaml:"type" json:"type"`
	Type                 ChgSymbolsInReelsCoreType         `yaml:"-" json:"-"`
	StrNumberType        string                            `yaml:"numberType" json:"numberType"`
	NumberType           ChgSymbolsInReelsNumberType       `yaml:"-" json:"-"`
	IsAlwaysGen          bool                              `yaml:"isAlwaysGen" json:"isAlwaysGen"`
	Height               int                               `yaml:"Height" json:"Height"`
	BlankSymbol          string                            `yaml:"blankSymbol" json:"blankSymbol"`
	BlankSymbolCode      int                               `yaml:"-" json:"-"`
	MapSymbol            map[int]string                    `yaml:"mapSymbol" json:"mapSymbol"`
	MapSymbolCode        map[int]int                       `yaml:"-" json:"-"`
	MapSymbolWeight      map[int]string                    `yaml:"mapWeight" json:"mapWeight"`
	MapSymbolWeightVW    map[int]*sgc7game.ValWeights2     `yaml:"-" json:"-"`
	MapSrcSymbols        map[int][]string                  `yaml:"mapSrcSymbols" json:"mapSrcSymbols"`
	MapSrcSymbolCodes    map[int][]int                     `yaml:"-" json:"-"`
	MapNumber            map[int]int                       `yaml:"mapNumber" json:"mapNumber"`
	Controllers          []*Award                          `yaml:"controllers" json:"controllers"`
	JumpToComponent      string                            `yaml:"jumpToComponent" json:"jumpToComponent"`
}

ChgSymbolsInReelsConfig - configuration for ChgSymbolsInReels

func (*ChgSymbolsInReelsConfig) SetLinkComponent added in v0.13.568

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

SetLinkComponent

type ChgSymbolsInReelsCoreType added in v0.13.568

type ChgSymbolsInReelsCoreType int
const (
	CSIRCTypeSymbol        ChgSymbolsInReelsCoreType = 0
	CSIRCTypeSymbolWeight  ChgSymbolsInReelsCoreType = 1
	CSIRCTypeEachPosRandom ChgSymbolsInReelsCoreType = 2
)

type ChgSymbolsInReelsData added in v0.13.568

type ChgSymbolsInReelsData struct {
	BasicComponentData
	Pos []int
	// contains filtered or unexported fields
}

func (*ChgSymbolsInReelsData) AddPos added in v0.13.568

func (chgSymbolsData *ChgSymbolsInReelsData) AddPos(x int, y int)

AddPos -

func (*ChgSymbolsInReelsData) AddPosEx added in v0.13.568

func (chgSymbolsData *ChgSymbolsInReelsData) AddPosEx(x int, y int)

AddPosEx -

func (*ChgSymbolsInReelsData) BuildPBComponentData added in v0.13.568

func (chgSymbolsData *ChgSymbolsInReelsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*ChgSymbolsInReelsData) ChgConfigIntVal added in v0.13.568

func (chgSymbolsData *ChgSymbolsInReelsData) ChgConfigIntVal(key string, off int) int

ChgConfigIntVal -

func (*ChgSymbolsInReelsData) ClearPos added in v0.13.599

func (chgSymbolsData *ChgSymbolsInReelsData) ClearPos()

ClearPos -

func (*ChgSymbolsInReelsData) Clone added in v0.13.568

func (chgSymbolsData *ChgSymbolsInReelsData) Clone() IComponentData

Clone

func (*ChgSymbolsInReelsData) GetPos added in v0.13.568

func (chgSymbolsData *ChgSymbolsInReelsData) GetPos() []int

GetPos -

func (*ChgSymbolsInReelsData) HasPos added in v0.13.568

func (chgSymbolsData *ChgSymbolsInReelsData) HasPos(x int, y int) bool

HasPos -

func (*ChgSymbolsInReelsData) OnNewGame added in v0.13.568

func (chgSymbolsData *ChgSymbolsInReelsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*ChgSymbolsInReelsData) OnNewStep added in v0.13.568

func (chgSymbolsData *ChgSymbolsInReelsData) OnNewStep()

OnNewStep -

type ChgSymbolsInReelsNumberType added in v0.13.568

type ChgSymbolsInReelsNumberType int
const (
	CSIRNTypeNoLimit      ChgSymbolsInReelsNumberType = 0
	CSIRNTypeNumber       ChgSymbolsInReelsNumberType = 1
	CSIRNTypeNumberWeight ChgSymbolsInReelsNumberType = 2
)

type ChgSymbolsInReelsSourceSymbolType added in v0.13.568

type ChgSymbolsInReelsSourceSymbolType int
const (
	CSIRSSTypeNone         ChgSymbolsInReelsSourceSymbolType = 0
	CSIRSSTypeSymbols      ChgSymbolsInReelsSourceSymbolType = 1
	CSIRSSTypeSymbolWeight ChgSymbolsInReelsSourceSymbolType = 2
)

type ChgSymbolsInReelsSourceType added in v0.13.568

type ChgSymbolsInReelsSourceType int
const (
	CSIRSTypeAll   ChgSymbolsInReelsSourceType = 0
	CSIRSTypeReels ChgSymbolsInReelsSourceType = 1
	CSIRSTypeMask  ChgSymbolsInReelsSourceType = 2
)

type ChgSymbolsMysteryOnReelsWeightData added in v0.13.460

type ChgSymbolsMysteryOnReelsWeightData struct {
	Index     []int
	StrWeight string
	Weight    *sgc7game.ValWeights2
}

type ChgSymbolsType added in v0.13.210

type ChgSymbolsType int
const (
	ChgSymTypeNormal                  ChgSymbolsType = 0
	ChgSymTypeMystery                 ChgSymbolsType = 1
	ChgSymTypeRandomWithNoTrigger     ChgSymbolsType = 2
	ChgSymTypeUpgradeSymbolOfCategory ChgSymbolsType = 3
	ChgSymTypeReels                   ChgSymbolsType = 4
	ChgSymTypeMysteryOnReels          ChgSymbolsType = 5
)

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, icd IComponentData) (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, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

func (*ClusterTrigger) ProcControllers added in v0.13.376

func (clusterTrigger *ClusterTrigger) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

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
	OutputToComponent               string                        `yaml:"outputToComponent" json:"outputToComponent"`                         // 将结果给到一个 positionCollection
	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
	SetWinSymbols                   []string                      `yaml:"setWinSymbols" json:"setWinSymbols"`
}

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

func (*ClusterTriggerConfig) SetLinkComponent added in v0.13.8

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

SetLinkComponent

type ClusterTriggerData added in v0.13.8

type ClusterTriggerData struct {
	BasicComponentData
	NextComponent     string
	SymbolNum         int
	WildNum           int
	RespinNum         int
	Wins              int
	WinMulti          int
	AvgSymbolValMulti int // 平均的symbolVal倍数,用整数来表达浮点数,100是1倍
	SymbolCodes       []int
}

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) GetSymbolCodes added in v0.13.596

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

func (*ClusterTriggerData) GetValEx added in v0.13.336

func (clusterTriggerData *ClusterTriggerData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*ClusterTriggerData) OnNewGame added in v0.13.8

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

OnNewGame -

func (*ClusterTriggerData) SetSymbolCodes added in v0.13.596

func (clusterTriggerData *ClusterTriggerData) SetSymbolCodes(symbolCodes []int)

type Collector

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

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) IsNeedOnStepEndStats2 added in v0.13.338

func (collector *Collector) IsNeedOnStepEndStats2() bool

IsNeedOnStepEndStats2 - 除respin外,如果也有component也需要在stepEnd调用的话,这里需要返回true

func (*Collector) NewComponentData

func (collector *Collector) NewComponentData() IComponentData

NewComponentData -

func (*Collector) NewStats2 added in v0.13.337

func (collector *Collector) NewStats2(parent string) *stats2.Feature

NewStats2 -

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

func (*Collector) OnStats2 added in v0.13.337

func (collector *Collector) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

type Collector2 added in v0.13.603

type Collector2 struct {
	*BasicComponent `json:"-"`
	Config          *Collector2Config `json:"config"`
}

func (*Collector2) EachUsedResults added in v0.13.603

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

func (*Collector2) Init added in v0.13.603

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

func (*Collector2) InitEx added in v0.13.603

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

func (*Collector2) InitPlayerState added in v0.13.607

func (collector *Collector2) InitPlayerState(pool *GamePropertyPool, gameProp *GameProperty, plugin sgc7plugin.IPlugin,
	ps *PlayerState, betMethod int, bet int) error

InitPlayerState -

func (*Collector2) IsNeedOnStepEndStats2 added in v0.13.603

func (collector *Collector2) IsNeedOnStepEndStats2() bool

func (*Collector2) NewComponentData added in v0.13.603

func (collector *Collector2) NewComponentData() IComponentData

func (*Collector2) NewStats2 added in v0.13.603

func (collector *Collector2) NewStats2(parent string) *stats2.Feature

func (*Collector2) OnAsciiGame added in v0.13.603

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

func (*Collector2) OnPlayGame added in v0.13.603

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

func (*Collector2) OnStats2 added in v0.13.603

func (collector *Collector2) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

func (*Collector2) OnUpdateDataWithPlayerState added in v0.13.612

func (collector *Collector2) OnUpdateDataWithPlayerState(pool *GamePropertyPool, gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, ps *PlayerState, betMethod int, bet int, cd IComponentData)

OnUpdateDataWithPlayerState -

func (*Collector2) ProcControllers added in v0.13.603

func (collector *Collector2) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type Collector2Config added in v0.13.603

type Collector2Config struct {
	BasicComponentConfig     `yaml:",inline" json:",inline"`
	MaxVal                   int                 `yaml:"maxVal" json:"maxVal"`
	IsCycle                  bool                `yaml:"isCycle" json:"isCycle"`
	IsPlayerState            bool                `yaml:"isPlayerState" json:"isPlayerState"`
	IsIgnoreBet              bool                `yaml:"isIgnoreBet" json:"isIgnoreBet"`
	IsForceTriggerController bool                `yaml:"isForceTriggerController" json:"isForceTriggerController"`
	MapAwards                map[string][]*Award `yaml:"controllers" json:"controllers"`
}

func (*Collector2Config) SetLinkComponent added in v0.13.603

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

type Collector2Data added in v0.13.603

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

func (*Collector2Data) BuildPBComponentData added in v0.13.603

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

func (*Collector2Data) ChgConfigIntVal added in v0.13.674

func (collectorData *Collector2Data) ChgConfigIntVal(key string, off int) int

ChgConfigIntVal -

func (*Collector2Data) Clone added in v0.13.603

func (collectorData *Collector2Data) Clone() IComponentData

func (*Collector2Data) GetOutput added in v0.13.603

func (collectorData *Collector2Data) GetOutput() int

func (*Collector2Data) GetValEx added in v0.13.603

func (collectorData *Collector2Data) GetValEx(key string, getType GetComponentValType) (int, bool)

func (*Collector2Data) OnNewGame added in v0.13.603

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

func (*Collector2Data) SetConfigIntVal added in v0.13.603

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

type Collector2PS added in v0.13.607

type Collector2PS struct {
	Value int `json:"value"` // value
}

func (*Collector2PS) Clone added in v0.13.607

func (ps *Collector2PS) Clone() IComponentPS

Clone

func (*Collector2PS) GetPrivateJson added in v0.13.607

func (ps *Collector2PS) GetPrivateJson() string

GetPrivateJson

func (*Collector2PS) GetPublicJson added in v0.13.607

func (ps *Collector2PS) GetPublicJson() string

GetPublicJson

func (*Collector2PS) SetPrivateJson added in v0.13.607

func (ps *Collector2PS) SetPrivateJson(str string) error

SetPrivateJson

func (*Collector2PS) SetPublicJson added in v0.13.607

func (ps *Collector2PS) SetPublicJson(str string) error

SetPublicJson

type CollectorConfig

type CollectorConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	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) GetOutput added in v0.13.245

func (collectorData *CollectorData) GetOutput() int

GetOutput -

func (*CollectorData) GetValEx added in v0.13.336

func (collectorData *CollectorData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

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 - CCVValueNum的set和chg逻辑不太一样,等于的时候不会触发任何的 controllers

type CollectorPayTrigger added in v0.13.722

type CollectorPayTrigger struct {
	*BasicComponent `json:"-"`
	Config          *CollectorPayTriggerConfig `json:"config"`
}

CollectorPayTrigger is the runtime component that implements collector pay trigger logic.

func (*CollectorPayTrigger) Init added in v0.13.722

func (cpt *CollectorPayTrigger) Init(fn string, pool *GamePropertyPool) error

Init - load from file Init loads the component configuration from a YAML file and initializes the component.

func (*CollectorPayTrigger) InitEx added in v0.13.722

func (cpt *CollectorPayTrigger) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config object InitEx initializes the component from an in-memory config object (usually unmarshaled from YAML).

func (*CollectorPayTrigger) NewComponentData added in v0.13.773

func (cpt *CollectorPayTrigger) NewComponentData() IComponentData

func (*CollectorPayTrigger) OnAsciiGame added in v0.13.722

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

OnAsciiGame - output to asciigame (no-op) OnAsciiGame outputs the component state to an asciigame representation (no-op for this component).

func (*CollectorPayTrigger) OnPlayGame added in v0.13.722

func (cpt *CollectorPayTrigger) 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)

OnPlayGame - check collector value and proc awards when reach threshold OnPlayGame processes a play event for the component and returns the next component name (if any).

func (*CollectorPayTrigger) ProcControllers added in v0.13.728

func (cpt *CollectorPayTrigger) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type CollectorPayTriggerConfig added in v0.13.722

type CollectorPayTriggerConfig struct {
	BasicComponentConfig   `yaml:",inline" json:",inline"`
	CategoryCount          int                 `yaml:"categoryCount" json:"categoryCount"`
	MapSymbol              map[string][]string `yaml:"mapSymbol" json:"mapSymbol"`
	MapSymbolCode          map[int][]int       `yaml:"-" json:"-"`
	BlankSymbol            string              `yaml:"blankSymbol" json:"blankSymbol"`
	BlankSymbolCode        int                 `yaml:"-" json:"-"`
	WildSymbol             string              `yaml:"wildSymbol" json:"wildSymbol"`
	WildSymbolCode         int                 `yaml:"-" json:"-"`
	CoinSymbols            []string            `yaml:"coinSymbols" json:"coinSymbols"`
	CoinSymbolCodes        []int               `yaml:"-" json:"-"`
	UpLevelSymbols         []string            `yaml:"upLevelSymbols" json:"upLevelSymbols"`
	UpLevelSymbolCodes     []int               `yaml:"-" json:"-"`
	AllUpLevelSymbols      []string            `yaml:"allUpLevelSymbol" json:"allUpLevelSymbol"`
	AllUpLevelSymbolCodes  []int               `yaml:"-" json:"-"`
	SwitcherSymbol         string              `yaml:"switcherSymbol" json:"switcherSymbol"`
	SwitcherSymbolCode     int                 `yaml:"-" json:"-"`
	PopcornSymbol          string              `yaml:"popcornSymbol" json:"popcornSymbol"`
	PopcornSymbolCode      int                 `yaml:"-" json:"-"`
	EggSymbol              string              `yaml:"eggSymbol" json:"eggSymbol"`
	EggSymbolCode          int                 `yaml:"-" json:"-"`
	DontPressSymbol        string              `yaml:"dontpressSymbol" json:"dontpressSymbol"`
	DontPressSymbolCode    int                 `yaml:"-" json:"-"`
	TriggerOnlySymbols     []string            `yaml:"triggerOnlySymbols" json:"triggerOnlySymbols"`
	TriggerOnlySymbolCodes []int               `yaml:"-" json:"-"`
	HighLevelSPSymbolCount int                 `yaml:"highLevelSPSymbolCount" json:"highLevelSPSymbolCount"`
	HighLevelSPSymbols     []string            `yaml:"highLevelSPSymbols" json:"highLevelSPSymbols"`
	HighLevelSPSymbolCodes []int               `yaml:"-" json:"-"`
	LowLevelSPSymbolCount  int                 `yaml:"lowLevelSPSymbolCount" json:"lowLevelSPSymbolCount"`
	LowLevelSPSymbols      []string            `yaml:"lowLevelSPSymbols" json:"lowLevelSPSymbols"`
	LowLevelSPSymbolCodes  []int               `yaml:"-" json:"-"`
	JumpToComponent        string              `yaml:"jump" json:"jump"`

	CPCore         string              `yaml:"cpCore" json:"cpCore"`
	MapControllers map[string][]*Award `yaml:"mapControllers" json:"mapControllers"` // 新的奖励系统
	// contains filtered or unexported fields
}

CollectorPayTriggerConfig - configuration for CollectorPayTrigger CollectorPayTriggerConfig is the configuration for the CollectorPayTrigger component.

func (*CollectorPayTriggerConfig) SetLinkComponent added in v0.13.722

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

SetLinkComponent sets a link ("next" or "jump") to another component by name.

type CollectorPayTriggerData added in v0.13.773

type CollectorPayTriggerData struct {
	BasicComponentData
	// contains filtered or unexported fields
}

func (*CollectorPayTriggerData) Clone added in v0.13.773

func (*CollectorPayTriggerData) OnNewGame added in v0.13.773

func (cpt *CollectorPayTriggerData) OnNewGame(gameProp *GameProperty, component IComponent)

type ComponentConfig

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

type ComponentList

type ComponentList struct {
	Components    []IComponent          `yaml:"-" json:"-"`
	MapComponents map[string]IComponent `yaml:"mapComponents" json:"mapComponents"`
	Stats2        *stats2.Stats         `yaml:"-" json:"-"`

	RngLib *RngLib `yaml:"-" json:"-"`
	// 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) 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, endings []string)

type ControllerWorker added in v0.13.197

type ControllerWorker struct {
	*BasicComponent `json:"-"`
	Config          *ControllerWorkerConfig `json:"config"`
}

func (*ControllerWorker) Init added in v0.13.197

func (controllerWorker *ControllerWorker) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ControllerWorker) InitEx added in v0.13.197

func (controllerWorker *ControllerWorker) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ControllerWorker) OnAsciiGame added in v0.13.197

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

OnAsciiGame - outpur to asciigame

func (*ControllerWorker) OnPlayGame added in v0.13.197

func (controllerWorker *ControllerWorker) 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 (*ControllerWorker) ProcControllers added in v0.13.376

func (controllerWorker *ControllerWorker) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type ControllerWorkerConfig added in v0.13.197

type ControllerWorkerConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Awards               []*Award `yaml:"awards" json:"awards"` // 新的奖励系统
}

ControllerWorkerConfig - configuration for ControllerWorker

func (*ControllerWorkerConfig) SetLinkComponent added in v0.13.197

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

SetLinkComponent

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 DropDownSymbols2 struct {
	*BasicComponent `json:"-"`
	Config          *DropDownSymbols2Config `json:"config"`
}
func (dropDownSymbols *DropDownSymbols2) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

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

Init -

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

InitEx -

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

OnAsciiGame - outpur to asciigame

func (dropDownSymbols *DropDownSymbols2) 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 (dropDownSymbols *DropDownSymbols2) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type DropDownSymbols2Config struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	HoldSymbols          []string             `yaml:"holdSymbols" json:"holdSymbols"`                   // 不需要下落的symbol
	HoldSymbolCodes      []int                `yaml:"-" json:"-"`                                       // 不需要下落的symbol
	IsNeedProcSymbolVals bool                 `yaml:"isNeedProcSymbolVals" json:"isNeedProcSymbolVals"` // 是否需要同时处理symbolVals
	EmptySymbolVal       int                  `yaml:"emptySymbolVal" json:"emptySymbolVal"`             // 空的symbolVal是什么
	StrType              string               `yaml:"type" json:"type"`                                 // 类型
	Type                 DropDownSymbols2Type `yaml:"-" json:"-"`                                       // 类型
	RowMask              string               `yaml:"rowMask" json:"rowMask"`                           // rowMask

	OutputToComponent string              `yaml:"outputToComponent" json:"outputToComponent"` // outputToComponent
	GenGigaSymbols2   string              `yaml:"genGigaSymbols2" json:"genGigaSymbols2"`     // genGigaSymbols2
	MapAwards         map[string][]*Award `yaml:"controllers" json:"controllers"`
	// contains filtered or unexported fields
}

DropDownSymbols2Config - configuration for DropDownSymbols2

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

SetLinkComponent

type DropDownSymbols2Type int
const (
	DDS2TypeNormal           DropDownSymbols2Type = 0
	DDS2TypeHexGridStaggered DropDownSymbols2Type = 1
)
type DropDownSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	HoldSymbols          []string `yaml:"holdSymbols" json:"holdSymbols"`                   // 不需要下落的symbol
	HoldSymbolCodes      []int    `yaml:"-" json:"-"`                                       // 不需要下落的symbol
	IsNeedProcSymbolVals bool     `yaml:"isNeedProcSymbolVals" json:"isNeedProcSymbolVals"` // 是否需要同时处理symbolVals
	EmptySymbolVal       int      `yaml:"emptySymbolVal" json:"emptySymbolVal"`             // 空的symbolVal是什么
}

DropDownSymbolsConfig - configuration for DropDownSymbols

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

SetLinkComponent

type DropDownTropiCoolSPGrid struct {
	*BasicComponent `json:"-"`
	Config          *DropDownTropiCoolSPGridConfig `json:"config"`
}

Init - load from file

func (gen *DropDownTropiCoolSPGrid) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config object

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

OnAsciiGame - output to asciigame (no-op)

func (gen *DropDownTropiCoolSPGrid) 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)

OnPlayGame - minimal implementation: does nothing but advance

type DropDownTropiCoolSPGridConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	SPGrid               string   `yaml:"spGrid" json:"spGrid"`
	BlankSymbol          string   `yaml:"blankSymbol" json:"blankSymbol"`
	BlankSymbolCode      int      `yaml:"-" json:"-"`
	InitTropiCoolSPGrid  string   `yaml:"initTropiCoolSPGrid" json:"initTropiCoolSPGrid"`
	GenGigaSymbols2      string   `yaml:"genGigaSymbols2" json:"genGigaSymbols2"`
	BrokenSymbols        []string `yaml:"brokenSymbols" json:"brokenSymbols"`
	BrokenSymbolCodes    []int    `yaml:"-" json:"-"`
}

DropDownTropiCoolSPGridConfig - configuration for DropDownTropiCoolSPGrid

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

SetLinkComponent

type DropSymbols added in v0.13.743

type DropSymbols struct {
	*BasicComponent `json:"-"`
	Config          *DropSymbolsConfig `json:"config"`
}

DropSymbols - placeholder component

func (*DropSymbols) Init added in v0.13.743

func (dropSymbols *DropSymbols) Init(fn string, pool *GamePropertyPool) error

Init - read yaml file

func (*DropSymbols) InitEx added in v0.13.743

func (dropSymbols *DropSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config

func (*DropSymbols) OnAsciiGame added in v0.13.743

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

OnAsciiGame - output to asciigame (no-op placeholder)

func (*DropSymbols) OnPlayGame added in v0.13.743

func (dropSymbols *DropSymbols) 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)

OnPlayGame - placeholder behavior: generate symbols and add to output symbol collection

func (*DropSymbols) ProcControllers added in v0.13.757

func (dropSymbols *DropSymbols) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type DropSymbolsConfig added in v0.13.743

type DropSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	ReelIndex            int                 `yaml:"reelIndex" json:"reelIndex"`
	Number               int                 `yaml:"number" json:"number"`
	Symbol               string              `yaml:"symbol" json:"symbol"`
	SymbolCode           int                 `yaml:"-" json:"-"`
	JumpToComponent      string              `yaml:"jumpToComponent" json:"jumpToComponent"` // jump to
	MapControllers       map[string][]*Award `yaml:"controllers" json:"controllers"`
}

DropSymbolsConfig - configuration for DropSymbols (placeholder)

func (*DropSymbolsConfig) SetLinkComponent added in v0.13.743

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

type EmptyFeatureLevel added in v0.13.192

type EmptyFeatureLevel struct {
}

func (*EmptyFeatureLevel) CountLevel added in v0.13.193

func (fl *EmptyFeatureLevel) CountLevel() int

CountLevel -

func (*EmptyFeatureLevel) Init added in v0.13.192

func (fl *EmptyFeatureLevel) Init()

Init -

func (*EmptyFeatureLevel) OnStepEnd added in v0.13.194

func (fl *EmptyFeatureLevel) OnStepEnd(gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult)

OnStepEnd -

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 FeatureBar added in v0.13.447

type FeatureBar struct {
	*BasicComponent `json:"-"`
	Config          *FeatureBarConfig `json:"config"`
}

func (*FeatureBar) Init added in v0.13.447

func (featureBar *FeatureBar) Init(fn string, pool *GamePropertyPool) error

Init -

func (*FeatureBar) InitEx added in v0.13.447

func (featureBar *FeatureBar) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*FeatureBar) NewComponentData added in v0.13.447

func (featureBar *FeatureBar) NewComponentData() IComponentData

NewComponentData -

func (*FeatureBar) OnAsciiGame added in v0.13.447

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

OnAsciiGame - outpur to asciigame

func (*FeatureBar) OnPlayGame added in v0.13.447

func (featureBar *FeatureBar) 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 (*FeatureBar) ProcControllers added in v0.13.447

func (featureBar *FeatureBar) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type FeatureBar2 added in v0.13.508

type FeatureBar2 struct {
	*BasicComponent `json:"-"`
	Config          *FeatureBar2Config `json:"config"`
}

func (*FeatureBar2) Init added in v0.13.508

func (featureBar2 *FeatureBar2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*FeatureBar2) InitEx added in v0.13.508

func (featureBar2 *FeatureBar2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*FeatureBar2) InitPlayerState added in v0.13.519

func (featureBar2 *FeatureBar2) InitPlayerState(pool *GamePropertyPool, gameProp *GameProperty, plugin sgc7plugin.IPlugin,
	ps *PlayerState, betMethod int, bet int) error

InitPlayerState -

func (*FeatureBar2) NewComponentData added in v0.13.508

func (featureBar2 *FeatureBar2) NewComponentData() IComponentData

NewComponentData -

func (*FeatureBar2) OnAsciiGame added in v0.13.508

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

OnAsciiGame - outpur to asciigame

func (*FeatureBar2) OnPlayGame added in v0.13.508

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

playgame

func (*FeatureBar2) ProcControllers added in v0.13.508

func (featureBar2 *FeatureBar2) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type FeatureBar2Config added in v0.13.508

type FeatureBar2Config struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Length               int                   `yaml:"length" json:"length"`                   // bar 的长度
	StrFeatureWeight     string                `yaml:"featureWeight" json:"featureWeight"`     // feature权重
	FeatureWeight        *sgc7game.ValWeights2 `yaml:"-" json:"-"`                             // feature权重
	FirstJumpWeight      int                   `yaml:"firstJumpWeight" json:"firstJumpWeight"` // firstJump 权重
	EmptyFeature         string                `yaml:"emptyFeature" json:"emptyFeature"`       // emptyFeature
	IsPlayerState        bool                  `yaml:"IsPlayerState" json:"IsPlayerState"`     // IsPlayerState
	IsMergeData          bool                  `yaml:"IsMergeData" json:"IsMergeData"`         // IsMergeData
	MapAwards            map[string][]*Award   `yaml:"mapAwards" json:"mapAwards"`             // 新的奖励系统
	MapBranch            map[string]string     `yaml:"mapBranch" json:"mapBranch"`             // mapBranch
}

FeatureBar2Config - configuration for FeatureBar2

func (*FeatureBar2Config) SetLinkComponent added in v0.13.508

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

SetLinkComponent

type FeatureBar2Data added in v0.13.508

type FeatureBar2Data struct {
	BasicComponentData
	Features      []string
	UsedFeatures  []string
	CacheFeatures []string
	CurFeature    string
	// contains filtered or unexported fields
}

func (*FeatureBar2Data) BuildPBComponentData added in v0.13.508

func (featureBar2Data *FeatureBar2Data) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*FeatureBar2Data) Clone added in v0.13.508

func (featureBar2Data *FeatureBar2Data) Clone() IComponentData

Clone

func (*FeatureBar2Data) GetStrVal added in v0.13.508

func (featureBar2Data *FeatureBar2Data) GetStrVal(key string) (string, bool)

GetStrVal -

func (*FeatureBar2Data) OnNewGame added in v0.13.508

func (featureBar2Data *FeatureBar2Data) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type FeatureBar2PS added in v0.13.519

type FeatureBar2PS struct {
	Features []string `json:"features"` // features
}

func (*FeatureBar2PS) Clone added in v0.13.519

func (ps *FeatureBar2PS) Clone() IComponentPS

Clone

func (*FeatureBar2PS) GetPrivateJson added in v0.13.519

func (ps *FeatureBar2PS) GetPrivateJson() string

GetPrivateJson

func (*FeatureBar2PS) GetPublicJson added in v0.13.519

func (ps *FeatureBar2PS) GetPublicJson() string

GetPublicJson

func (*FeatureBar2PS) SetPrivateJson added in v0.13.519

func (ps *FeatureBar2PS) SetPrivateJson(str string) error

SetPrivateJson

func (*FeatureBar2PS) SetPublicJson added in v0.13.519

func (ps *FeatureBar2PS) SetPublicJson(str string) error

SetPublicJson

type FeatureBarConfig added in v0.13.447

type FeatureBarConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Length               int                   `yaml:"length" json:"length"`                   // bar 的长度
	StrFeatureWeight     string                `yaml:"featureWeight" json:"featureWeight"`     // feature权重
	FeatureWeight        *sgc7game.ValWeights2 `yaml:"-" json:"-"`                             // feature权重
	FirstJumpWeight      int                   `yaml:"firstJumpWeight" json:"firstJumpWeight"` // firstJump 权重
	MapAwards            map[int][]*Award      `yaml:"awards" json:"awards"`                   // 新的奖励系统
}

FeatureBarConfig - configuration for FeatureBar

func (*FeatureBarConfig) SetLinkComponent added in v0.13.447

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

SetLinkComponent

type FeatureBarData added in v0.13.447

type FeatureBarData struct {
	BasicComponentData
	Features     []int
	UsedFeatures []int
	CurFeature   int
	// contains filtered or unexported fields
}

func (*FeatureBarData) BuildPBComponentData added in v0.13.447

func (featureBarData *FeatureBarData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*FeatureBarData) Clone added in v0.13.447

func (featureBarData *FeatureBarData) Clone() IComponentData

Clone

func (*FeatureBarData) OnNewGame added in v0.13.447

func (featureBarData *FeatureBarData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type FeatureEmitter added in v0.13.763

type FeatureEmitter struct {
	*BasicComponent `json:"-"`
	Config          *FeatureEmitterConfig `json:"config"`
}

FeatureEmitter - placeholder component

func (*FeatureEmitter) Init added in v0.13.763

func (fe *FeatureEmitter) Init(fn string, pool *GamePropertyPool) error

Init - read yaml file

func (*FeatureEmitter) InitEx added in v0.13.763

func (fe *FeatureEmitter) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config

func (*FeatureEmitter) OnAsciiGame added in v0.13.763

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

OnAsciiGame - output to asciigame (no-op placeholder)

func (*FeatureEmitter) OnPlayGame added in v0.13.763

func (fe *FeatureEmitter) 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)

OnPlayGame - placeholder behavior: does nothing

func (*FeatureEmitter) ProcControllers added in v0.13.763

func (fe *FeatureEmitter) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type FeatureEmitterConfig added in v0.13.763

type FeatureEmitterConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Collect              string              `yaml:"collect" json:"collect"`
	ConsumedAmount       int                 `yaml:"consumedAmount" json:"consumedAmount"`
	JumpToComponent      string              `yaml:"jumpToComponent" json:"jumpToComponent"`
	MapControllers       map[string][]*Award `yaml:"mapControllers" json:"mapControllers"`
}

FeatureEmitterConfig - configuration for FeatureEmitter (placeholder)

func (*FeatureEmitterConfig) SetLinkComponent added in v0.13.763

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

type FeaturePick added in v0.13.525

type FeaturePick struct {
	*BasicComponent `json:"-"`
	Config          *FeaturePickConfig `json:"config"`
}

func (*FeaturePick) Init added in v0.13.525

func (featurePick *FeaturePick) Init(fn string, pool *GamePropertyPool) error

Init -

func (*FeaturePick) InitEx added in v0.13.525

func (featurePick *FeaturePick) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*FeaturePick) NewComponentData added in v0.13.525

func (featurePick *FeaturePick) NewComponentData() IComponentData

NewComponentData -

func (*FeaturePick) NewStats2 added in v0.13.525

func (featurePick *FeaturePick) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*FeaturePick) OnAsciiGame added in v0.13.525

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

OnAsciiGame - outpur to asciigame

func (*FeaturePick) OnPlayGame added in v0.13.525

func (featurePick *FeaturePick) 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 (*FeaturePick) OnStats2 added in v0.13.525

func (featurePick *FeaturePick) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

func (*FeaturePick) ProcControllers added in v0.13.525

func (featurePick *FeaturePick) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type FeaturePickConfig added in v0.13.525

type FeaturePickConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrWeight            string                `yaml:"weight" json:"weight"` // weight
	Weight               *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	PoolSize             int                   `json:"poolSize"`
	PickNum              int                   `json:"pickNum"`
	MapControllers       map[string][]*Award   `yaml:"mapControllers" json:"mapControllers"`
}

FeaturePickConfig - configuration for FeaturePick

func (*FeaturePickConfig) SetLinkComponent added in v0.13.525

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

SetLinkComponent

type FeaturePickData added in v0.13.525

type FeaturePickData struct {
	BasicComponentData
	Selected     []string
	UnSelected   []string
	CurSelected  []string
	PickNum      int
	CurPickedNum int
}

func (*FeaturePickData) BuildPBComponentData added in v0.13.525

func (featurePickData *FeaturePickData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*FeaturePickData) ChgConfigIntVal added in v0.13.596

func (featurePickData *FeaturePickData) ChgConfigIntVal(key string, off int) int

ChgConfigIntVal -

func (*FeaturePickData) Clone added in v0.13.525

func (featurePickData *FeaturePickData) Clone() IComponentData

Clone

func (*FeaturePickData) OnNewGame added in v0.13.525

func (featurePickData *FeaturePickData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*FeaturePickData) SetConfigIntVal added in v0.13.596

func (featurePickData *FeaturePickData) SetConfigIntVal(key string, val int)

SetConfigIntVal -

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 FlowDownSymbols added in v0.13.530

type FlowDownSymbols struct {
	*BasicComponent `json:"-"`
	Config          *FlowDownSymbolsConfig `json:"config"`
}

func (*FlowDownSymbols) Init added in v0.13.530

func (flowDownSymbols *FlowDownSymbols) Init(fn string, pool *GamePropertyPool) error

Init -

func (*FlowDownSymbols) InitEx added in v0.13.530

func (flowDownSymbols *FlowDownSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*FlowDownSymbols) NewComponentData added in v0.13.530

func (flowDownSymbols *FlowDownSymbols) NewComponentData() IComponentData

NewComponentData -

func (*FlowDownSymbols) OnAsciiGame added in v0.13.530

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

OnAsciiGame - outpur to asciigame

func (*FlowDownSymbols) OnPlayGame added in v0.13.530

func (flowDownSymbols *FlowDownSymbols) 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 (*FlowDownSymbols) ProcControllers added in v0.13.530

func (flowDownSymbols *FlowDownSymbols) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type FlowDownSymbolsConfig added in v0.13.530

type FlowDownSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string              `yaml:"type" json:"type"`
	Type                 FlowDownSymbolsType `yaml:"-" json:"-"`
	SrcMask              string              `yaml:"srcMask" json:"srcMask"`
	FillSymbol           string              `yaml:"fillSymbol" json:"fillSymbol"`
	FillSymbolCode       int                 `yaml:"-" json:"-"`
	BlockSymbols         []string            `yaml:"blockSymbols" json:"blockSymbols"`
	BlockSymbolCodes     []int               `yaml:"-" json:"-"`
	Number               int                 `yaml:"number" json:"number"`
	JumpToComponent      string              `yaml:"jumpToComponent" json:"jumpToComponent"` // jump to
	Controllers          []*Award            `yaml:"controllers" json:"controllers"`
}

FlowDownSymbolsConfig - configuration for FlowDownSymbols

func (*FlowDownSymbolsConfig) SetLinkComponent added in v0.13.530

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

SetLinkComponent

type FlowDownSymbolsData added in v0.13.530

type FlowDownSymbolsData struct {
	BasicComponentData
	Pos []int
}

func (*FlowDownSymbolsData) AddPos added in v0.13.530

func (flowDownSymbolsData *FlowDownSymbolsData) AddPos(x int, y int)

AddPos -

func (*FlowDownSymbolsData) AddPosEx added in v0.13.530

func (flowDownSymbolsData *FlowDownSymbolsData) AddPosEx(x int, y int)

AddPosEx -

func (*FlowDownSymbolsData) BuildPBComponentData added in v0.13.530

func (flowDownSymbolsData *FlowDownSymbolsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*FlowDownSymbolsData) ClearPos added in v0.13.599

func (flowDownSymbolsData *FlowDownSymbolsData) ClearPos()

ClearPos -

func (*FlowDownSymbolsData) Clone added in v0.13.530

func (flowDownSymbolsData *FlowDownSymbolsData) Clone() IComponentData

Clone

func (*FlowDownSymbolsData) GetPos added in v0.13.530

func (flowDownSymbolsData *FlowDownSymbolsData) GetPos() []int

GetPos -

func (*FlowDownSymbolsData) HasPos added in v0.13.530

func (flowDownSymbolsData *FlowDownSymbolsData) HasPos(x int, y int) bool

HasPos -

func (*FlowDownSymbolsData) OnNewGame added in v0.13.530

func (flowDownSymbolsData *FlowDownSymbolsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*FlowDownSymbolsData) OnNewStep added in v0.13.530

func (flowDownSymbolsData *FlowDownSymbolsData) OnNewStep()

OnNewStep -

type FlowDownSymbolsType added in v0.13.530

type FlowDownSymbolsType int
const (
	FDSTypeFlowToRight FlowDownSymbolsType = 0 // flow to right
)

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) SetPayTables added in v0.13.602

func (fo2 *ForceOutcome2) SetPayTables(payTables *sgc7game.PayTables)

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 FuncNewFeatureLevel added in v0.13.192

type FuncNewFeatureLevel func(betMode int) IFeatureLevel

type FuncNewRNG added in v0.13.135

type FuncNewRNG func() IRNG

type FuncOnChgComponentIntVal added in v0.13.271

type FuncOnChgComponentIntVal func(componentName string, valName string, off int) bool

FuncOnChgComponentIntVal - 当这个接口处理完数据,需要返回true,这时底层就不会再处理了

type FuncOnChgedComponentIntVal added in v0.13.376

type FuncOnChgedComponentIntVal func(componentName string, valName string, val int, off int)

FuncOnChgedComponentIntVal - 处理完后才调用这个接口,val 是最终数值

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 FuncOnSettedComponentIntVal added in v0.13.376

type FuncOnSettedComponentIntVal func(componentName string, valName string, val int)

FuncOnSettedComponentIntVal - 处理完后才调用这个接口,val 是最终数值

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, funcNewFeatureLevel FuncNewFeatureLevel) (*Game, error)

func NewGame2WithData added in v0.12.57

func NewGame2WithData(data []byte, funcNewPlugin sgc7plugin.FuncNewPlugin, funcNewRNG FuncNewRNG, funcNewFeatureLevel FuncNewFeatureLevel) (*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, funcNewFeatureLevel FuncNewFeatureLevel) 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 NewPlayerState 用于 new 一个空的 playerstate,不需要 initial ,后面会 reset 数据 Initialize 用于直接 生成一个 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) OnBet added in v0.13.519

func (game *Game) OnBet(plugin sgc7plugin.IPlugin, cmd string, param string, ips sgc7game.IPlayerState,
	stake *sgc7game.Stake, prs []*sgc7game.PlayResult, gameData any) error

OnBet

func (*Game) ResetConfig

func (game *Game) ResetConfig(cfg any)

ResetConfig

func (*Game) SaveParSheet added in v0.13.369

func (game *Game) SaveParSheet(f *excelize.File) error

type GameParams

type GameParams struct {
	sgc7pb.GameParam `json:",inline"`
	LastScene        *sgc7game.GameScene       `json:"-"`
	LastOtherScene   *sgc7game.GameScene       `json:"-"`
	MapComponentData map[string]IComponentData `json:"-"`
	// contains filtered or unexported fields
}

func NewGameParam added in v0.12.25

func NewGameParam(stake *sgc7game.Stake, ps *PlayerState) *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

	MapSPGridStack map[string]*SPGridStack
	// contains filtered or unexported fields
}

func (*GameProperty) AddComponentPos added in v0.13.210

func (gameProp *GameProperty) AddComponentPos(componentName string, pos []int)

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, onProc FuncOnChgComponentIntVal, onProced FuncOnChgedComponentIntVal) 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) GetBet3 added in v0.13.323

func (gameProp *GameProperty) GetBet3(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) GetComponentPos added in v0.13.210

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

func (*GameProperty) GetComponentScene added in v0.12.205

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

func (*GameProperty) GetComponentStrVal added in v0.13.508

func (gameProp *GameProperty) GetComponentStrVal(componentVal string) (string, error)

func (*GameProperty) GetComponentStrVal2 added in v0.13.273

func (gameProp *GameProperty) GetComponentStrVal2(component string, val string) (string, error)

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, pr *sgc7game.PlayResult)

OnCallEnd - call after the component onPlay

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) RunController added in v0.13.242

func (gameProp *GameProperty) RunController(award *Award, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams)

func (*GameProperty) SetComponentConfigIntVal added in v0.12.278

func (gameProp *GameProperty) SetComponentConfigIntVal(componentConfigValName string, val int, onProc FuncOnChgComponentIntVal, onProced FuncOnSettedComponentIntVal) 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) ChgReelsCollector added in v0.13.531

func (pool *GamePropertyPool) ChgReelsCollector(gameProp *GameProperty, name string, ps *PlayerState, betMethod int, bet int, reelsData []int) error

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) InitPlayerState added in v0.13.519

func (pool *GamePropertyPool) InitPlayerState() (*PlayerState, error)

func (*GamePropertyPool) InitPlayerStateOnBet added in v0.13.519

func (pool *GamePropertyPool) InitPlayerStateOnBet(gameProp *GameProperty, plugin sgc7plugin.IPlugin, ps *PlayerState,
	stake *sgc7game.Stake) 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) NewPlayerState added in v0.13.519

func (pool *GamePropertyPool) NewPlayerState() (*PlayerState, error)

func (*GamePropertyPool) PushTrigger added in v0.12.193

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

func (*GamePropertyPool) SetMask added in v0.12.155

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

func (*GamePropertyPool) SetMaskVal added in v0.12.170

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

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

func (genGigaSymbol *GenGigaSymbol) NewComponentData() IComponentData

NewComponentData -

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 GenGigaSymbolData added in v0.13.199

type GenGigaSymbolData struct {
	BasicComponentData
	Pos []int
}

func (*GenGigaSymbolData) AddPos added in v0.13.199

func (genGigaSymbolData *GenGigaSymbolData) AddPos(x int, y int)

AddPos -

func (*GenGigaSymbolData) BuildPBComponentData added in v0.13.199

func (genGigaSymbolData *GenGigaSymbolData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*GenGigaSymbolData) ClearPos added in v0.13.599

func (genGigaSymbolData *GenGigaSymbolData) ClearPos()

ClearPos -

func (*GenGigaSymbolData) Clone added in v0.13.199

func (genGigaSymbolData *GenGigaSymbolData) Clone() IComponentData

Clone

func (*GenGigaSymbolData) GetPos added in v0.13.199

func (genGigaSymbolData *GenGigaSymbolData) GetPos() []int

GetPos -

func (*GenGigaSymbolData) HasPos added in v0.13.199

func (genGigaSymbolData *GenGigaSymbolData) HasPos(x int, y int) bool

HasPos -

func (*GenGigaSymbolData) OnNewGame added in v0.13.199

func (genGigaSymbolData *GenGigaSymbolData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*GenGigaSymbolData) OnNewStep added in v0.13.199

func (genGigaSymbolData *GenGigaSymbolData) OnNewStep(gameProp *GameProperty, component IComponent)

OnNewStep -

type GenGigaSymbolType added in v0.13.78

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

type GenGigaSymbols2 added in v0.13.782

type GenGigaSymbols2 struct {
	*BasicComponent `json:"-"`
	Config          *GenGigaSymbols2Config `json:"config"`
}

func (*GenGigaSymbols2) Init added in v0.13.782

func (genGigaSymbols2 *GenGigaSymbols2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*GenGigaSymbols2) InitEx added in v0.13.782

func (genGigaSymbols2 *GenGigaSymbols2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*GenGigaSymbols2) NewComponentData added in v0.13.782

func (genGigaSymbols2 *GenGigaSymbols2) NewComponentData() IComponentData

NewComponentData -

func (*GenGigaSymbols2) OnAsciiGame added in v0.13.782

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

OnAsciiGame - outpur to asciigame

func (*GenGigaSymbols2) OnPlayGame added in v0.13.782

func (genGigaSymbols2 *GenGigaSymbols2) 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 placeholder

type GenGigaSymbols2Config added in v0.13.782

type GenGigaSymbols2Config struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	MaxNumber            int                   `yaml:"maxNumber" json:"maxNumber"`
	Symbols              []string              `yaml:"symbols" json:"symbols"`
	SymbolCodes          []int                 `yaml:"-" json:"-"`
	SpSymbols            []string              `yaml:"spSymbols" json:"spSymbols"`
	SpSymbolCodes        []int                 `yaml:"-" json:"-"`
	Weight               string                `yaml:"weight" json:"weight"`
	GigaSymbolCodes      map[int][]int         `yaml:"-" json:"-"`
	WeightVW             *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	BrokenSymbols        []string              `yaml:"brokenSymbols" json:"brokenSymbols"`
	BrokenSymbolCodes    []int                 `yaml:"-" json:"-"`
}

GenGigaSymbols2Config - configuration for GenGigaSymbols2

func (*GenGigaSymbols2Config) SetLinkComponent added in v0.13.782

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

SetLinkComponent

type GenGigaSymbols2Data added in v0.13.782

type GenGigaSymbols2Data struct {
	BasicComponentData
	// contains filtered or unexported fields
}

func (*GenGigaSymbols2Data) BuildPBComponentData added in v0.13.782

func (genGigaSymbols2Data *GenGigaSymbols2Data) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*GenGigaSymbols2Data) Clone added in v0.13.782

func (genGigaSymbols2Data *GenGigaSymbols2Data) Clone() IComponentData

Clone

func (*GenGigaSymbols2Data) OnNewGame added in v0.13.782

func (genGigaSymbols2Data *GenGigaSymbols2Data) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*GenGigaSymbols2Data) OnNewStep added in v0.13.782

func (genGigaSymbols2Data *GenGigaSymbols2Data) OnNewStep()

OnNewStep -

type GenMask added in v0.13.630

type GenMask struct {
	*BasicComponent `json:"-"`
	Config          *GenMaskConfig `json:"config"`
}

func (*GenMask) Init added in v0.13.630

func (gm *GenMask) Init(fn string, pool *GamePropertyPool) error

Init -

func (*GenMask) InitEx added in v0.13.630

func (gm *GenMask) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*GenMask) OnAsciiGame added in v0.13.630

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

OnAsciiGame - output to asciigame

func (*GenMask) OnPlayGame added in v0.13.630

func (gm *GenMask) 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 (*GenMask) ProcControllers added in v0.13.630

func (gm *GenMask) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type GenMaskConfig added in v0.13.630

type GenMaskConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string      `yaml:"type" json:"type"`
	Type                 GenMaskType `yaml:"-" json:"-"`
	MaskLen              int         `yaml:"maskLen" json:"maskLen"`
	OutputMask           string      `yaml:"outputMask" json:"outputMask"`
	SrcMask              []string    `yaml:"srcMask" json:"srcMask"`
	WeightValue          int         `yaml:"weightValue" json:"weightValue"`
	InitMask             []bool      `yaml:"initMask" json:"initMask"`
	Controllers          []*Award    `yaml:"controllers" json:"controllers"` // 新的奖励系统
}

GenMaskConfig - configuration for GenMask

func (*GenMaskConfig) SetLinkComponent added in v0.13.630

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

SetLinkComponent

type GenMaskType added in v0.13.630

type GenMaskType int
const (
	GMTypeSet    GenMaskType = 0 // set
	GMTypeNot    GenMaskType = 1 // not
	GMTypeAnd    GenMaskType = 2 // and
	GMTypeOr     GenMaskType = 3 // or
	GMTypeXor    GenMaskType = 4 // xor
	GMTypeRandom GenMaskType = 5 // random
)

type GenPositionCollection added in v0.13.414

type GenPositionCollection struct {
	*BasicComponent `json:"-"`
	Config          *GenPositionCollectionConfig `json:"config"`
}

func (*GenPositionCollection) Init added in v0.13.414

func (genPositionCollection *GenPositionCollection) Init(fn string, pool *GamePropertyPool) error

Init -

func (*GenPositionCollection) InitEx added in v0.13.414

func (genPositionCollection *GenPositionCollection) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*GenPositionCollection) OnAsciiGame added in v0.13.414

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

OnAsciiGame - outpur to asciigame

func (*GenPositionCollection) OnPlayGame added in v0.13.414

func (genPositionCollection *GenPositionCollection) 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 (*GenPositionCollection) ProcControllers added in v0.13.767

func (genPositionCollection *GenPositionCollection) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type GenPositionCollectionConfig added in v0.13.414

type GenPositionCollectionConfig struct {
	BasicComponentConfig     `yaml:",inline" json:",inline"`
	StrSrcType               string                          `yaml:"srcType" json:"srcType"`
	SrcType                  GenPositionCollectionSourceType `yaml:"-" json:"-"`
	StrCoreType              string                          `yaml:"coreType" json:"coreType"`
	CoreType                 GenPositionCollectionCoreType   `yaml:"-" json:"-"`
	Number                   int                             `yaml:"number" json:"number"`
	NumberWeight             string                          `yaml:"numberWeight" json:"numberWeight"`
	NumberWeightVW2          *sgc7game.ValWeights2           `yaml:"-" json:"-"`
	OutputPositionCollection string                          `yaml:"outputPositionCollection" json:"outputPositionCollection"`
	RowMask                  string                          `yaml:"rowMask" json:"rowMask"`
	Mask                     string                          `yaml:"mask" json:"mask"`
	SrcPositionCollection    string                          `yaml:"srcPositionCollection" json:"srcPositionCollection"`
	SrcSymbols               []string                        `yaml:"srcSymbols" json:"srcSymbols"`
	SrcSymbolCodes           []int                           `yaml:"-" json:"-"`
	MapControllers           map[string][]*Award             `yaml:"controllers" json:"controllers"`
	JumpToComponent          string                          `yaml:"jumpToComponent" json:"jumpToComponent"`
}

GenPositionCollectionConfig - configuration for GenPositionCollection

func (*GenPositionCollectionConfig) SetLinkComponent added in v0.13.414

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

SetLinkComponent

type GenPositionCollectionCoreType added in v0.13.767

type GenPositionCollectionCoreType int
const (
	GPCCTypeNumber        GenPositionCollectionCoreType = 0
	GPCCTypeNumberWeight  GenPositionCollectionCoreType = 1
	GPCCTypeEachPosRandom GenPositionCollectionCoreType = 2
)

type GenPositionCollectionSourceType added in v0.13.767

type GenPositionCollectionSourceType int
const (
	GPCSTypeAll                GenPositionCollectionSourceType = 0
	GPCSTypeMask               GenPositionCollectionSourceType = 1
	GPCSTypeRowMask            GenPositionCollectionSourceType = 2
	GPCSTypeAllMask            GenPositionCollectionSourceType = 3
	GPCSTypePositionCollection GenPositionCollectionSourceType = 4
)

type GenPositionCollectionWithSymbol added in v0.13.749

type GenPositionCollectionWithSymbol struct {
	*BasicComponent `json:"-"`
	Config          *GenPositionCollectionWithSymbolConfig `json:"config"`
}

func (*GenPositionCollectionWithSymbol) Init added in v0.13.749

func (genPositionCollection *GenPositionCollectionWithSymbol) Init(fn string, pool *GamePropertyPool) error

Init -

func (*GenPositionCollectionWithSymbol) InitEx added in v0.13.749

func (genPositionCollection *GenPositionCollectionWithSymbol) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*GenPositionCollectionWithSymbol) OnAsciiGame added in v0.13.749

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

OnAsciiGame - outpur to asciigame

func (*GenPositionCollectionWithSymbol) OnPlayGame added in v0.13.749

func (genPositionCollection *GenPositionCollectionWithSymbol) 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 GenPositionCollectionWithSymbolConfig added in v0.13.749

type GenPositionCollectionWithSymbolConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Symbols              []string `yaml:"symbols" json:"symbols"`
	SymbolCodes          []int    `yaml:"-" json:"-"`
	OutputToComponent    string   `yaml:"outputToComponent" json:"outputToComponent"`
}

GenPositionCollectionWithSymbolConfig - configuration for GenPositionCollectionWithSymbol

func (*GenPositionCollectionWithSymbolConfig) SetLinkComponent added in v0.13.749

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

SetLinkComponent

type GenSPGrid added in v0.13.705

type GenSPGrid struct {
	*BasicComponent `json:"-"`
	Config          *GenSPGridConfig `json:"config"`
}

func (*GenSPGrid) Init added in v0.13.705

func (gen *GenSPGrid) Init(fn string, pool *GamePropertyPool) error

Init - load from file

func (*GenSPGrid) InitEx added in v0.13.705

func (gen *GenSPGrid) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config object

func (*GenSPGrid) OnAsciiGame added in v0.13.705

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

OnAsciiGame - output to asciigame (no-op)

func (*GenSPGrid) OnPlayGame added in v0.13.705

func (gen *GenSPGrid) 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)

OnPlayGame - minimal implementation: does nothing but advance

type GenSPGridConfig added in v0.13.705

type GenSPGridConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Width                int `yaml:"width" json:"width"`
	Height               int `yaml:"height" json:"height"`
}

GenSPGridConfig - configuration for GenSPGrid

func (*GenSPGridConfig) SetLinkComponent added in v0.13.705

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

SetLinkComponent

type GenSymbolCollection added in v0.13.735

type GenSymbolCollection struct {
	*BasicComponent `json:"-"`
	Config          *GenSymbolCollectionConfig `json:"config"`
}

func (*GenSymbolCollection) Init added in v0.13.735

func (genSymbolCollection *GenSymbolCollection) Init(fn string, pool *GamePropertyPool) error

Init -

func (*GenSymbolCollection) InitEx added in v0.13.735

func (genSymbolCollection *GenSymbolCollection) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*GenSymbolCollection) OnAsciiGame added in v0.13.735

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

OnAsciiGame - outpur to asciigame

func (*GenSymbolCollection) OnPlayGame added in v0.13.735

func (genSymbolCollection *GenSymbolCollection) 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 GenSymbolCollectionConfig added in v0.13.735

type GenSymbolCollectionConfig struct {
	BasicComponentConfig   `yaml:",inline" json:",inline"`
	StrCoreType            string                      `yaml:"coreType" json:"coreType"`
	CoreType               GenSymbolCollectionCoreType `yaml:"-" json:"-"`
	Number                 int                         `yaml:"number" json:"number"`
	NumberWeight           string                      `yaml:"numberWeight" json:"numberWeight"`
	NumberWeightVM         *sgc7game.ValWeights2       `yaml:"-" json:"-"`
	SymbolWeight           string                      `yaml:"symbolWeight" json:"symbolWeight"`
	SymbolWeightVM         *sgc7game.ValWeights2       `yaml:"-" json:"-"`
	OutputSymbolCollection string                      `yaml:"outputSymbolCollection" json:"outputSymbolCollection"`
}

GenSymbolCollectionConfig - configuration for GenSymbolCollection

func (*GenSymbolCollectionConfig) SetLinkComponent added in v0.13.735

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

SetLinkComponent

type GenSymbolCollectionCoreType added in v0.13.735

type GenSymbolCollectionCoreType int
const (
	GSCCoreTypeNumber       GenSymbolCollectionCoreType = 0
	GSCCoreTypeNumberWeight GenSymbolCollectionCoreType = 1
)

type GenSymbolVals added in v0.13.189

type GenSymbolVals struct {
	*BasicComponent `json:"-"`
	Config          *GenSymbolValsConfig `json:"config"`
}

func (*GenSymbolVals) Init added in v0.13.189

func (genSymbolVals *GenSymbolVals) Init(fn string, pool *GamePropertyPool) error

Init -

func (*GenSymbolVals) InitEx added in v0.13.189

func (genSymbolVals *GenSymbolVals) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*GenSymbolVals) OnAsciiGame added in v0.13.189

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

OnAsciiGame - outpur to asciigame

func (*GenSymbolVals) OnPlayGame added in v0.13.189

func (genSymbolVals *GenSymbolVals) 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 GenSymbolVals2 added in v0.13.502

type GenSymbolVals2 struct {
	*BasicComponent `json:"-"`
	Config          *GenSymbolVals2Config `json:"config"`
}

func (*GenSymbolVals2) Init added in v0.13.502

func (genSymbolVals2 *GenSymbolVals2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*GenSymbolVals2) InitEx added in v0.13.502

func (genSymbolVals2 *GenSymbolVals2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*GenSymbolVals2) NewComponentData added in v0.13.560

func (genSymbolVals2 *GenSymbolVals2) NewComponentData() IComponentData

NewComponentData -

func (*GenSymbolVals2) OnAsciiGame added in v0.13.502

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

OnAsciiGame - outpur to asciigame

func (*GenSymbolVals2) OnPlayGame added in v0.13.502

func (genSymbolVals2 *GenSymbolVals2) 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 (*GenSymbolVals2) ProcControllers added in v0.13.663

func (genSymbolVals2 *GenSymbolVals2) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type GenSymbolVals2Config added in v0.13.502

type GenSymbolVals2Config struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrSrcSymbolValsType string                          `yaml:"srcSymbolValsType" json:"srcSymbolValsType"`
	SrcSymbolValsType    GenSymbolVals2SrcSymbolValsType `yaml:"-" json:"-"`
	SrcSymbols           []string                        `yaml:"srcSymbols" json:"srcSymbols"`
	SrcSymbolCodes       []int                           `yaml:"-" json:"-"`
	SrcComponents        []string                        `yaml:"srcComponents" json:"srcComponents"`
	StrGenType           string                          `yaml:"genType" json:"genType"`
	GenType              GenSymbolVals2CoreType          `yaml:"-" json:"-"`
	Number               int                             `yaml:"number" json:"number"`
	StrWeight            string                          `yaml:"number" json:"weight"`
	WeightVW             *sgc7game.ValWeights2           `yaml:"-" json:"-"`
	DefaultVal           int                             `yaml:"defaultVal" json:"defaultVal"`
	IsForceRefresh       bool                            `yaml:"isForceRefresh" json:"isForceRefresh"`
	MaxVal               int                             `yaml:"maxVal" json:"maxVal"`
	IsAlwaysGen          bool                            `yaml:"isAlwaysGen" json:"isAlwaysGen"`
	MapSymbolWeights     map[string]string               `yaml:"symbolWeights" json:"symbolWeights"`
	MapSymbolWeightsVM   map[int]*sgc7game.ValWeights2   `yaml:"-" json:"-"`
	Awards               []*Award                        `yaml:"awards" json:"awards"` // 新的奖励系统
	SpGrid               string                          `yaml:"spGrid" json:"spGrid"`
}

GenSymbolVals2Config - configuration for GenSymbolVals2

func (*GenSymbolVals2Config) SetLinkComponent added in v0.13.502

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

SetLinkComponent

type GenSymbolVals2CoreType added in v0.13.502

type GenSymbolVals2CoreType int
const (
	GSV2CTypeNone         GenSymbolVals2CoreType = 0
	GSV2CTypeNumber       GenSymbolVals2CoreType = 1
	GSV2CTypeWeight       GenSymbolVals2CoreType = 2
	GSV2CTypeAdd          GenSymbolVals2CoreType = 3
	GSV2CTypeMask         GenSymbolVals2CoreType = 4
	GSV2CTypeSymbolWeight GenSymbolVals2CoreType = 5
)

type GenSymbolVals2Data added in v0.13.560

type GenSymbolVals2Data struct {
	BasicComponentData
	// contains filtered or unexported fields
}

func (*GenSymbolVals2Data) BuildPBComponentData added in v0.13.570

func (genSymbolVals2Data *GenSymbolVals2Data) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*GenSymbolVals2Data) ChgConfigIntVal added in v0.13.560

func (genSymbolVals2Data *GenSymbolVals2Data) ChgConfigIntVal(key string, off int) int

ChgConfigIntVal -

func (*GenSymbolVals2Data) Clone added in v0.13.570

func (genSymbolVals2Data *GenSymbolVals2Data) Clone() IComponentData

Clone

func (*GenSymbolVals2Data) OnNewGame added in v0.13.570

func (genSymbolVals2Data *GenSymbolVals2Data) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*GenSymbolVals2Data) OnNewStep added in v0.13.572

func (genSymbolVals2Data *GenSymbolVals2Data) OnNewStep()

OnNewStep -

type GenSymbolVals2SrcSymbolValsType added in v0.13.502

type GenSymbolVals2SrcSymbolValsType int
const (
	GSV2SSVTypeNone  GenSymbolVals2SrcSymbolValsType = 0
	GSV2SSVTypeClone GenSymbolVals2SrcSymbolValsType = 1
)

type GenSymbolValsConfig added in v0.13.189

type GenSymbolValsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string                `yaml:"type" json:"type"`
	Type                 GenSymbolValsType     `yaml:"-" json:"-"`
	DefaultVal           int                   `yaml:"defaultVal" json:"defaultVal"`
	Weight               string                `yaml:"weight" json:"weight"`
	WeightVW             *sgc7game.ValWeights2 `json:"-"`
}

GenSymbolValsConfig - configuration for GenSymbolVals

func (*GenSymbolValsConfig) SetLinkComponent added in v0.13.189

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

SetLinkComponent

type GenSymbolValsInReels added in v0.13.769

type GenSymbolValsInReels struct {
	*BasicComponent `json:"-"`
	Config          *GenSymbolValsInReelsConfig `json:"config"`
}

func (*GenSymbolValsInReels) Init added in v0.13.769

func (gsv *GenSymbolValsInReels) Init(fn string, pool *GamePropertyPool) error

Init - read config from file

func (*GenSymbolValsInReels) InitEx added in v0.13.769

func (gsv *GenSymbolValsInReels) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - placeholder init with parsed config

func (*GenSymbolValsInReels) OnAsciiGame added in v0.13.769

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

OnAsciiGame - placeholder - no output for ascii game

func (*GenSymbolValsInReels) OnPlayGame added in v0.13.769

func (gsv *GenSymbolValsInReels) 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)

OnPlayGame - placeholder implementation; do nothing

func (*GenSymbolValsInReels) ProcControllers added in v0.13.769

func (gsv *GenSymbolValsInReels) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type GenSymbolValsInReelsConfig added in v0.13.769

type GenSymbolValsInReelsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrSrcSymbolValsType string                                `yaml:"srcSymbolValsType" json:"srcSymbolValsType"`
	SrcSymbolValsType    GenSymbolValsInReelsSrcSymbolValsType `yaml:"-" json:"-"`
	DefaultVal           int                                   `yaml:"defaultVal" json:"defaultVal"`
	IsForceRefresh       bool                                  `yaml:"isForceRefresh" json:"isForceRefresh"`
	StrGenType           string                                `yaml:"genType" json:"genType"`
	GenType              GenSymbolValsInReelsCoreType          `yaml:"-" json:"-"`
	IsAlwaysGen          bool                                  `yaml:"isAlwaysGen" json:"isAlwaysGen"`
	MapSrcSymbols        map[int][]string                      `yaml:"mapSrcSymbols" json:"mapSrcSymbols"`
	MapSrcSymbolCodes    map[int][]int                         `yaml:"-" json:"-"`
	MapNumber            map[int]int                           `yaml:"mapNumber" json:"mapNumber"`
	MapNumberWeight      map[int]string                        `yaml:"mapNumberWeight" json:"mapNumberWeight"`
	MapNumberWeightVW    map[int]*sgc7game.ValWeights2         `yaml:"-" json:"-"`
	SpGrid               string                                `yaml:"spGrid" json:"spGrid"`
	MapControllers       map[string][]*Award                   `yaml:"mapControllers" json:"mapControllers"`
	JumpToComponent      string                                `yaml:"jumpToComponent" json:"jumpToComponent"`
}

GenSymbolValsInReelsConfig - minimal configuration for the placeholder

func (*GenSymbolValsInReelsConfig) SetLinkComponent added in v0.13.769

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

type GenSymbolValsInReelsCoreType added in v0.13.769

type GenSymbolValsInReelsCoreType int
const (
	GSVIRCTypeNumber GenSymbolValsInReelsCoreType = 0
	GSVIRCTypeWeight GenSymbolValsInReelsCoreType = 1
)

type GenSymbolValsInReelsSrcSymbolValsType added in v0.13.769

type GenSymbolValsInReelsSrcSymbolValsType int
const (
	GSVIRSSVTypeNone  GenSymbolValsInReelsSrcSymbolValsType = 0
	GSVIRSSVTypeClone GenSymbolValsInReelsSrcSymbolValsType = 1
)

type GenSymbolValsType added in v0.13.305

type GenSymbolValsType int
const (
	GSVTypeBasic  GenSymbolValsType = 0
	GSVTypeWeight GenSymbolValsType = 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) NewComponentData added in v0.13.332

func (genSymbolValsWithSymbol *GenSymbolValsWithSymbol) NewComponentData() IComponentData

NewComponentData -

func (*GenSymbolValsWithSymbol) NewStats2 added in v0.13.334

func (genSymbolValsWithSymbol *GenSymbolValsWithSymbol) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*GenSymbolValsWithSymbol) OnAsciiGame added in v0.13.89

func (genSymbolValsWithSymbol *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

func (*GenSymbolValsWithSymbol) OnStats2 added in v0.13.334

func (genSymbolValsWithSymbol *GenSymbolValsWithSymbol) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

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 GenSymbolValsWithSymbolData added in v0.13.332

type GenSymbolValsWithSymbolData struct {
	BasicComponentData
	GenVals []int
}

func (*GenSymbolValsWithSymbolData) BuildPBComponentData added in v0.13.332

func (genSymbolValsWithSymbolData *GenSymbolValsWithSymbolData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*GenSymbolValsWithSymbolData) Clone added in v0.13.332

func (genSymbolValsWithSymbolData *GenSymbolValsWithSymbolData) Clone() IComponentData

Clone

func (*GenSymbolValsWithSymbolData) GetValEx added in v0.13.332

func (genSymbolValsWithSymbolData *GenSymbolValsWithSymbolData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*GenSymbolValsWithSymbolData) OnNewGame added in v0.13.332

func (genSymbolValsWithSymbolData *GenSymbolValsWithSymbolData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type GenSymbolValsWithSymbolType added in v0.13.89

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

type GenTropiCoolSPSymbols added in v0.13.782

type GenTropiCoolSPSymbols struct {
	*BasicComponent `json:"-"`
	Config          *GenTropiCoolSPSymbolsConfig `json:"config"`
}

func (*GenTropiCoolSPSymbols) Init added in v0.13.782

func (gen *GenTropiCoolSPSymbols) Init(fn string, pool *GamePropertyPool) error

Init - load from file

func (*GenTropiCoolSPSymbols) InitEx added in v0.13.782

func (gen *GenTropiCoolSPSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config object

func (*GenTropiCoolSPSymbols) NewComponentData added in v0.13.782

func (gen *GenTropiCoolSPSymbols) NewComponentData() IComponentData

NewComponentData - return base component data

func (*GenTropiCoolSPSymbols) OnAsciiGame added in v0.13.782

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

OnAsciiGame - no-op

func (*GenTropiCoolSPSymbols) OnPlayGame added in v0.13.782

func (gen *GenTropiCoolSPSymbols) 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)

OnPlayGame - placeholder: do nothing

type GenTropiCoolSPSymbolsConfig added in v0.13.782

type GenTropiCoolSPSymbolsConfig struct {
	BasicComponentConfig  `yaml:",inline" json:",inline"`
	SpBonusSymbol         string                `yaml:"spBonusSymbol" json:"spBonusSymbol"`
	SpBonusSymbolCode     int                   `yaml:"-" json:"-"`
	SpSymbols             []string              `yaml:"SpSymbols" json:"SpSymbols"`
	SpSymbolCodes         []int                 `yaml:"-" json:"-"`
	GenGigaSymbols2       string                `yaml:"genGigaSymbols2" json:"genGigaSymbols2"`
	Symbols               []string              `yaml:"symbols" json:"symbols"`
	SymbolCodes           []int                 `yaml:"-" json:"-"`
	GenTropiCoolSPSymbols string                `yaml:"genTropiCoolSPSymbols" json:"genTropiCoolSPSymbols"`
	SymbolWeight          string                `yaml:"symbolWeight" json:"symbolWeight"`
	SymbolWeightVW        *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	BlankSymbol           string                `yaml:"blankSymbol" json:"blankSymbol"`
	BlankSymbolCode       int                   `yaml:"-" json:"-"`
	MapSpSymbolCodes      map[int][]int         `yaml:"-" json:"-"`
}

GenTropiCoolSPSymbolsConfig - placeholder configuration

func (*GenTropiCoolSPSymbolsConfig) SetLinkComponent added in v0.13.782

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

SetLinkComponent

type GenTropiCoolSPSymbolsData added in v0.13.782

type GenTropiCoolSPSymbolsData struct {
	BasicComponentData
	// contains filtered or unexported fields
}

func (*GenTropiCoolSPSymbolsData) BuildPBComponentData added in v0.13.782

func (gcd *GenTropiCoolSPSymbolsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*GenTropiCoolSPSymbolsData) Clone added in v0.13.782

Clone

func (*GenTropiCoolSPSymbolsData) OnNewGame added in v0.13.782

func (gcd *GenTropiCoolSPSymbolsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type GetComponentValType added in v0.13.332

type GetComponentValType int
const (
	GCVTypeNormal GetComponentValType = 0
	GCVTypeMin    GetComponentValType = 1
	GCVTypeMax    GetComponentValType = 2
)

type HistoryComponentData added in v0.13.39

type HistoryComponentData struct {
	Component    IComponent
	ForeachIndex int
}

type HoldAndRespinReels added in v0.13.614

type HoldAndRespinReels struct {
	*BasicComponent `json:"-"`
	Config          *HoldAndRespinReelsConfig `json:"config"`
}

func (*HoldAndRespinReels) Init added in v0.13.614

func (har *HoldAndRespinReels) Init(fn string, pool *GamePropertyPool) error

Init -

func (*HoldAndRespinReels) InitEx added in v0.13.614

func (har *HoldAndRespinReels) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*HoldAndRespinReels) NewComponentData added in v0.13.614

func (har *HoldAndRespinReels) NewComponentData() IComponentData

NewComponentData -

func (*HoldAndRespinReels) OnAsciiGame added in v0.13.614

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

OnAsciiGame - output to asciigame

func (*HoldAndRespinReels) OnPlayGame added in v0.13.614

func (har *HoldAndRespinReels) 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 (*HoldAndRespinReels) ProcControllers added in v0.13.614

func (har *HoldAndRespinReels) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type HoldAndRespinReelsConfig added in v0.13.614

type HoldAndRespinReelsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string                 `yaml:"type" json:"type"`
	Type                 HoldAndRespinReelsType `yaml:"-" json:"-"`
	ReelSetsWeight       string                 `yaml:"reelSetWeight" json:"reelSetWeight"`
	ReelSetsWeightVW     *sgc7game.ValWeights2  `json:"-"`
	HoldReels            []bool                 `yaml:"holdReels" json:"holdReels"`
	ReelSet              string                 `yaml:"reelSet" json:"reelSet"`
	MapControllers       map[string][]*Award    `yaml:"controllers" json:"controllers"` // 新的奖励系统
}

HoldAndRespinReelsConfig - configuration for HoldAndRespinReels

func (*HoldAndRespinReelsConfig) SetLinkComponent added in v0.13.614

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

SetLinkComponent

type HoldAndRespinReelsData added in v0.13.614

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

func (*HoldAndRespinReelsData) BuildPBComponentData added in v0.13.614

func (harData *HoldAndRespinReelsData) BuildPBComponentData() proto.Message

BuildPBComponentData returns a protobuf message representing this component's data. Note: we intentionally reuse sgc7pb.WeightReelsData to carry BasicComponentData and ReelSetIndex to avoid adding a new proto message for this small payload. If semantic separation is required in the future, introduce a dedicated proto message for HoldAndRespinReelsData.

func (*HoldAndRespinReelsData) Clone added in v0.13.614

func (harData *HoldAndRespinReelsData) Clone() IComponentData

Clone

func (*HoldAndRespinReelsData) GetValEx added in v0.13.614

func (harData *HoldAndRespinReelsData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*HoldAndRespinReelsData) OnNewGame added in v0.13.614

func (harData *HoldAndRespinReelsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type HoldAndRespinReelsType added in v0.13.614

type HoldAndRespinReelsType int
const (
	HARTypeKeepReels   HoldAndRespinReelsType = 0 // keep reels
	HARTypeResetReels  HoldAndRespinReelsType = 1 // reset reels
	HARTypeRerollReels HoldAndRespinReelsType = 2 // reroll reels
)

type HoldAndWin added in v0.13.530

type HoldAndWin struct {
	*BasicComponent `json:"-"`
	Config          *HoldAndWinConfig `json:"config"`
}

func (*HoldAndWin) Init added in v0.13.530

func (holdAndWin *HoldAndWin) Init(fn string, pool *GamePropertyPool) error

Init -

func (*HoldAndWin) InitEx added in v0.13.530

func (holdAndWin *HoldAndWin) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*HoldAndWin) NewComponentData added in v0.13.530

func (holdAndWin *HoldAndWin) NewComponentData() IComponentData

NewComponentData -

func (*HoldAndWin) OnAsciiGame added in v0.13.530

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

OnAsciiGame - outpur to asciigame

func (*HoldAndWin) OnPlayGame added in v0.13.530

func (holdAndWin *HoldAndWin) 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 (*HoldAndWin) ProcControllers added in v0.13.530

func (holdAndWin *HoldAndWin) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type HoldAndWinConfig added in v0.13.530

type HoldAndWinConfig struct {
	BasicComponentConfig  `yaml:",inline" json:",inline"`
	StrType               string                        `yaml:"type" json:"type"`
	Type                  HoldAndWinType                `yaml:"-" json:"-"`
	StrWeight             string                        `yaml:"weight" json:"weight"`
	WeightVW2             *sgc7game.ValWeights2         `yaml:"-" json:"-"`
	StrSPWeight           string                        `yaml:"spWeight" json:"spWeight"`
	SPWeightVW2           *sgc7game.ValWeights2         `yaml:"-" json:"-"`
	BlankSymbol           string                        `yaml:"blankSymbol" json:"blankSymbol"`
	BlankSymbolCode       int                           `yaml:"-" json:"-"`
	DefaultCoinSymbolCode int                           `yaml:"-" json:"-"`
	IgnoreSymbols         []string                      `yaml:"ignoreSymbols" json:"ignoreSymbols"`
	IgnoreSymbolCodes     []int                         `yaml:"-" json:"-"`
	MinHeight             int                           `yaml:"minHeight" json:"minHeight"`
	MaxHeight             int                           `yaml:"maxHeight" json:"maxHeight"`
	MapCoinWeight         map[string]string             `yaml:"mapCoinWeight" json:"mapCoinWeight"`
	MapCoinWeightVW2      map[int]*sgc7game.ValWeights2 `yaml:"-" json:"-"`
	JumpToComponent       string                        `yaml:"jumpToComponent" json:"jumpToComponent"` // jump to
	MapAwards             map[string][]*Award           `yaml:"controllers" json:"controllers"`
}

HoldAndWinConfig - configuration for HoldAndWin

func (*HoldAndWinConfig) SetLinkComponent added in v0.13.530

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

SetLinkComponent configures a link from this component to another component by name. Supported link keys are "next" and "jump".

type HoldAndWinData added in v0.13.530

type HoldAndWinData struct {
	BasicComponentData
	Pos    []int
	Height int
}

HoldAndWinData holds per-player/per-session runtime state for the component. It embeds BasicComponentData for common state and tracks positions and current height.

func (*HoldAndWinData) AddPos added in v0.13.530

func (holdAndWinData *HoldAndWinData) AddPos(x int, y int)

AddPos appends the provided coordinate to the internal positions list.

func (*HoldAndWinData) AddPosEx added in v0.13.530

func (holdAndWinData *HoldAndWinData) AddPosEx(x int, y int)

AddPosEx adds the coordinate only if it is not already present.

func (*HoldAndWinData) BuildPBComponentData added in v0.13.530

func (holdAndWinData *HoldAndWinData) BuildPBComponentData() proto.Message

BuildPBComponentData converts component data into its protobuf representation.

func (*HoldAndWinData) ClearPos added in v0.13.599

func (holdAndWinData *HoldAndWinData) ClearPos()

ClearPos removes all recorded positions.

func (*HoldAndWinData) Clone added in v0.13.530

func (holdAndWinData *HoldAndWinData) Clone() IComponentData

Clone creates and returns a deep copy of the HoldAndWinData.

func (*HoldAndWinData) GetPos added in v0.13.530

func (holdAndWinData *HoldAndWinData) GetPos() []int

GetPos returns a copy of the interleaved positions slice [x0,y0,x1,y1,...].

func (*HoldAndWinData) GetValEx added in v0.13.545

func (holdAndWinData *HoldAndWinData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx returns extended component values by key. Supported keys include CVHeight.

func (*HoldAndWinData) HasPos added in v0.13.530

func (holdAndWinData *HoldAndWinData) HasPos(x int, y int) bool

HasPos reports whether the given (x,y) coordinate has been recorded.

func (*HoldAndWinData) OnNewGame added in v0.13.530

func (holdAndWinData *HoldAndWinData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame is called when a new game session starts and delegates to BasicComponentData.

func (*HoldAndWinData) OnNewStep added in v0.13.530

func (holdAndWinData *HoldAndWinData) OnNewStep()

OnNewStep resets step-scoped fields before processing a new play step.

type HoldAndWinType added in v0.13.530

type HoldAndWinType int

HoldAndWinType enumerates supported variants of hold-and-win mechanics. Use parseHoldAndWinType to convert a textual type into this enum.

const (
	HAWTypeNormal                  HoldAndWinType = 0 // normal
	HAWTypeCollectorAndHeightLevel HoldAndWinType = 1 // Collector And Height Level
)

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

	// 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 - 除respin外,其它component都是在onPlayGame后调用;respin会在onStepEnd这个环节调用,而且是遍历Respin队列
	OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)
	// IsNeedOnStepEndStats2 - 除respin外,如果也有component也需要在stepEnd调用的话,这里需要返回true
	IsNeedOnStepEndStats2() bool

	// 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, icd IComponentData) (bool, []*sgc7game.Result)

	// ProcControllers -
	ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

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

	// ClearData -
	ClearData(icd IComponentData, bForceNow bool)

	// InitPlayerState -
	// 2 种调用时机,一个是玩家第一次初始化时,这时 bet 为 0,gameProp 和 plugin 为 nil
	// 另外一个是玩家下注时,这时 bet、gameProp、plugin 都有效
	InitPlayerState(pool *GamePropertyPool, gameProp *GameProperty, plugin sgc7plugin.IPlugin, ps *PlayerState, betMethod int, bet int) error

	// NewPlayerState - new IComponentPS
	NewPlayerState() IComponentPS

	// OnUpdateDataWithPlayerState -
	OnUpdateDataWithPlayerState(pool *GamePropertyPool, gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, ps *PlayerState, betMethod int, bet int, cd IComponentData)

	ChgReelsCollector(icd IComponentData, ps *PlayerState, betMethod int, bet int, reelsData []int)
}

func NewAddSymbols added in v0.13.47

func NewAddSymbols(name string) IComponent

func NewAdjacentPayTrigger added in v0.13.305

func NewAdjacentPayTrigger(name string) IComponent

func NewAlignTropiCoolSPGrid added in v0.13.711

func NewAlignTropiCoolSPGrid(name string) IComponent

func NewBasicReels

func NewBasicReels(name string) IComponent

func NewBasicReels2 added in v0.13.691

func NewBasicReels2(name string) IComponent

func NewBomb added in v0.13.447

func NewBomb(name string) IComponent

func NewBurstSymbols added in v0.13.202

func NewBurstSymbols(name string) IComponent

func NewCPCore added in v0.13.782

func NewCPCore(name string) IComponent

func NewCalculator added in v0.13.743

func NewCalculator(name string) IComponent

func NewCascadingRegulator added in v0.13.578

func NewCascadingRegulator(name string) IComponent

func NewCatchSymbols added in v0.13.202

func NewCatchSymbols(name string) IComponent

func NewCheckSymbolVals added in v0.13.89

func NewCheckSymbolVals(name string) IComponent

func NewCheckVal added in v0.13.273

func NewCheckVal(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 NewChgSymbols2 added in v0.13.515

func NewChgSymbols2(name string) IComponent

func NewChgSymbolsInReels added in v0.13.568

func NewChgSymbolsInReels(name string) IComponent

func NewClusterTrigger added in v0.13.8

func NewClusterTrigger(name string) IComponent

func NewCollector

func NewCollector(name string) IComponent

func NewCollector2 added in v0.13.603

func NewCollector2(name string) IComponent

func NewCollectorPayTrigger added in v0.13.722

func NewCollectorPayTrigger(name string) IComponent

NewCollectorPayTrigger creates a new CollectorPayTrigger component instance.

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 NewControllerWorker added in v0.13.197

func NewControllerWorker(name string) IComponent

func NewDropDownSymbols added in v0.13.17

func NewDropDownSymbols(name string) IComponent

func NewDropDownSymbols2 added in v0.13.609

func NewDropDownSymbols2(name string) IComponent

func NewDropDownTropiCoolSPGrid added in v0.13.709

func NewDropDownTropiCoolSPGrid(name string) IComponent

func NewDropSymbols added in v0.13.743

func NewDropSymbols(name string) IComponent

func NewFeatureBar added in v0.13.447

func NewFeatureBar(name string) IComponent

func NewFeatureBar2 added in v0.13.508

func NewFeatureBar2(name string) IComponent

func NewFeatureEmitter added in v0.13.763

func NewFeatureEmitter(name string) IComponent

func NewFeaturePick added in v0.13.525

func NewFeaturePick(name string) IComponent

func NewFixSymbols added in v0.10.350

func NewFixSymbols(name string) IComponent

func NewFlowDownSymbols added in v0.13.530

func NewFlowDownSymbols(name string) IComponent

func NewGenGigaSymbol added in v0.13.78

func NewGenGigaSymbol(name string) IComponent

func NewGenGigaSymbols2 added in v0.13.782

func NewGenGigaSymbols2(name string) IComponent

func NewGenMask added in v0.13.630

func NewGenMask(name string) IComponent

func NewGenPositionCollection added in v0.13.414

func NewGenPositionCollection(name string) IComponent

func NewGenPositionCollectionWithSymbol added in v0.13.749

func NewGenPositionCollectionWithSymbol(name string) IComponent

func NewGenSPGrid added in v0.13.705

func NewGenSPGrid(name string) IComponent

func NewGenSymbolCollection added in v0.13.735

func NewGenSymbolCollection(name string) IComponent

func NewGenSymbolVals added in v0.13.189

func NewGenSymbolVals(name string) IComponent

func NewGenSymbolVals2 added in v0.13.502

func NewGenSymbolVals2(name string) IComponent

func NewGenSymbolValsInReels added in v0.13.769

func NewGenSymbolValsInReels(name string) IComponent

NewGenSymbolValsInReels - factory

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 NewGenTropiCoolSPSymbols added in v0.13.782

func NewGenTropiCoolSPSymbols(name string) IComponent

func NewHoldAndRespinReels added in v0.13.614

func NewHoldAndRespinReels(name string) IComponent

func NewHoldAndWin added in v0.13.530

func NewHoldAndWin(name string) IComponent

NewHoldAndWin creates a new HoldAndWin component instance with the provided name.

func NewInitTropiCoolSPGrid added in v0.13.705

func NewInitTropiCoolSPGrid(name string) IComponent

func NewIntValMapping added in v0.13.57

func NewIntValMapping(name string) IComponent

func NewJackpot added in v0.13.261

func NewJackpot(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 NewMergePositionCollection added in v0.13.502

func NewMergePositionCollection(name string) IComponent

func NewMergeSPGrid added in v0.13.767

func NewMergeSPGrid(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 NewMoveSymbols2 added in v0.13.464

func NewMoveSymbols2(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 NewRandomMoveSymbols added in v0.13.414

func NewRandomMoveSymbols(name string) IComponent

func NewReRollReel added in v0.12.156

func NewReRollReel(name string) IComponent

func NewRebuildReelIndex added in v0.13.178

func NewRebuildReelIndex(name string) IComponent

func NewRebuildSymbols added in v0.13.189

func NewRebuildSymbols(name string) IComponent

func NewReelModifier added in v0.12.250

func NewReelModifier(name string) IComponent

func NewReelTrigger added in v0.13.261

func NewReelTrigger(name string) IComponent

func NewReelsCollector added in v0.13.530

func NewReelsCollector(name string) IComponent

func NewRefillSymbols added in v0.13.17

func NewRefillSymbols(name string) IComponent

func NewRefillSymbols2 added in v0.13.694

func NewRefillSymbols2(name string) IComponent

func NewRefillTropiCoolSPGrid added in v0.13.711

func NewRefillTropiCoolSPGrid(name string) IComponent

func NewRemoveSymbols added in v0.13.17

func NewRemoveSymbols(name string) IComponent

NewRemoveSymbols constructs a RemoveSymbols component with the given name.

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 NewRollNumber added in v0.13.197

func NewRollNumber(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 NewStringValMapping added in v0.13.743

func NewStringValMapping(name string) IComponent

func NewSumSymbolVals added in v0.13.447

func NewSumSymbolVals(name string) IComponent

func NewSymbolCollection2 added in v0.13.21

func NewSymbolCollection2(name string) IComponent

func NewSymbolExpander added in v0.13.644

func NewSymbolExpander(name string) IComponent

NewSymbolExpander constructs a new SymbolExpander component instance with the provided name.

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 NewSymbolValsSP added in v0.13.597

func NewSymbolValsSP(name string) IComponent

NewSymbolValsSP constructs a SymbolValsSP component with the provided name.

func NewTreasureChest added in v0.13.460

func NewTreasureChest(name string) IComponent

func NewTropiCoolExchange added in v0.13.782

func NewTropiCoolExchange(name string) IComponent

func NewTropiCoolSPBonus added in v0.13.782

func NewTropiCoolSPBonus(name string) IComponent

func NewWaysTrigger added in v0.12.264

func NewWaysTrigger(name string) IComponent

func NewWeightBranch added in v0.13.17

func NewWeightBranch(name string) IComponent

func NewWeightReels added in v0.12.264

func NewWeightReels(name string) IComponent

func NewWeightReels2 added in v0.13.402

func NewWeightReels2(name string) IComponent

func NewWinResultLimiter added in v0.13.578

func NewWinResultLimiter(name string) IComponent

func NewWinResultModifier added in v0.13.244

func NewWinResultModifier(name string) IComponent

func NewWinResultModifierEx added in v0.13.414

func NewWinResultModifierEx(name string) IComponent

NewWinResultModifierEx creates a new WinResultModifierEx instance with the provided name and default priority.

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

	// Clone
	Clone() IComponentData

	// GetValEx -
	GetValEx(key string, getType GetComponentValType) (int, bool)

	// GetStrVal -
	GetStrVal(key string) (string, bool)

	// 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) 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)
	// ClearPos -
	ClearPos()

	// GetLastRespinNum -
	GetLastRespinNum() int
	// GetCurRespinNum -
	GetCurRespinNum() 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)

	ChgReelsCollector(reelsData []int)

	SetSymbolCodes(symbolCodes []int)

	GetSymbolCodes() []int

	ClearSymbolCodes()

	AddSymbolCodes(symbolCodes []int)
}

type IComponentPS added in v0.13.519

type IComponentPS interface {
	// SetPublicJson
	SetPublicJson(str string) error
	// SetPrivateJson
	SetPrivateJson(str string) error
	// GetPublicJson
	GetPublicJson() string
	// GetPrivateJson
	GetPrivateJson() string
	// Clone
	Clone() IComponentPS
}

type IFeatureLevel added in v0.13.192

type IFeatureLevel interface {
	// Init -
	Init()
	// OnStepEnd -
	OnStepEnd(gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult)
	// CountLevel -
	CountLevel() int
}

func NewEmptyFeatureLevel added in v0.13.192

func NewEmptyFeatureLevel(bet int) IFeatureLevel

type IRNG added in v0.13.135

type IRNG interface {
	// Clone -
	Clone() IRNG
	// OnNewGame -
	OnNewGame(betMode int, plugin sgc7plugin.IPlugin) error
	// GetCurRNG -
	GetCurRNG(betMode int, gameProp *GameProperty, curComponent IComponent, cd IComponentData, fl IFeatureLevel) (bool, int, sgc7plugin.IPlugin, string)
	// OnChoiceBranch -
	OnChoiceBranch(betMode int, curComponent IComponent, branchName string) error
	// OnStepEnd -
	OnStepEnd(betMode int, gp *GameParams, pr *sgc7game.PlayResult, prs []*sgc7game.PlayResult) error
}

func NewBasicRNG added in v0.13.135

func NewBasicRNG() IRNG

func NewSimpleRNG added in v0.13.235

func NewSimpleRNG(iterateComponent string) IRNG

type InitTropiCoolSPGrid added in v0.13.705

type InitTropiCoolSPGrid struct {
	*BasicComponent `json:"-"`
	Config          *InitTropiCoolSPGridConfig `json:"config"`
}

func (*InitTropiCoolSPGrid) Init added in v0.13.705

func (gen *InitTropiCoolSPGrid) Init(fn string, pool *GamePropertyPool) error

Init - load from file

func (*InitTropiCoolSPGrid) InitEx added in v0.13.705

func (gen *InitTropiCoolSPGrid) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config object

func (*InitTropiCoolSPGrid) NewComponentData added in v0.13.782

func (gen *InitTropiCoolSPGrid) NewComponentData() IComponentData

func (*InitTropiCoolSPGrid) OnAsciiGame added in v0.13.705

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

OnAsciiGame - output to asciigame (no-op)

func (*InitTropiCoolSPGrid) OnPlayGame added in v0.13.705

func (gen *InitTropiCoolSPGrid) 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)

OnPlayGame - minimal implementation: does nothing but advance

type InitTropiCoolSPGridConfig added in v0.13.705

type InitTropiCoolSPGridConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	MaxNumber            int                   `yaml:"maxNumber" json:"maxNumber"`
	SPGrid               string                `yaml:"spGrid" json:"spGrid"`
	BlankSymbol          string                `yaml:"blankSymbol" json:"blankSymbol"`
	BlankSymbolCode      int                   `yaml:"-" json:"-"`
	GigaSymbols          []string              `yaml:"gigSymbols" json:"gigSymbols"`
	GigaSymbolCodes      []int                 `yaml:"-" json:"-"`
	SPSymbols            []string              `yaml:"spSymbols" json:"spSymbols"`
	SPSymbolCodes        []int                 `yaml:"-" json:"-"`
	Weight               string                `yaml:"weight" json:"weight"`
	WeightVM             *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	GigaWeight           string                `yaml:"gigaWeight" json:"gigaWeight"`
	GigaWeightVM         *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	EmptySymbol          string                `yaml:"emptySymbol" json:"emptySymbol"`
	EmptySymbolCode      int                   `yaml:"-" json:"-"`
	SpBonusSymbol        string                `yaml:"spBonusSymbol" json:"spBonusSymbol"`
	SpBonusSymbolCode    int                   `yaml:"-" json:"-"`
	SpBonusSymbolCode2   int                   `yaml:"-" json:"-"`
	MapGigaSymbolCodes   map[int][]int         `yaml:"-" json:"-"`
	MapControls          map[string][]*Award   `yaml:"-" json:"-"`
}

InitTropiCoolSPGridConfig - configuration for InitTropiCoolSPGrid

func (*InitTropiCoolSPGridConfig) SetLinkComponent added in v0.13.705

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

SetLinkComponent

type InitTropiCoolSPGridData added in v0.13.782

type InitTropiCoolSPGridData struct {
	BasicComponentData
	// contains filtered or unexported fields
}

func (*InitTropiCoolSPGridData) Clone added in v0.13.782

func (itcdpg *InitTropiCoolSPGridData) Clone() IComponentData

func (*InitTropiCoolSPGridData) OnNewGame added in v0.13.782

func (itcdpg *InitTropiCoolSPGridData) OnNewGame(gameProp *GameProperty, component IComponent)

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

func (intValMapping *IntValMapping) NewComponentData() IComponentData

NewComponentData -

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

func (*IntValMapping) ProcControllers added in v0.13.746

func (intValMapping *IntValMapping) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

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"`
	Controllers          []*Award              `yaml:"controllers" json:"controllers"` // 新的奖励系统
}

IntValMappingConfig - configuration for IntValMapping

func (*IntValMappingConfig) SetLinkComponent added in v0.13.57

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

SetLinkComponent

type IntValMappingData added in v0.13.746

type IntValMappingData struct {
	BasicComponentData
	// contains filtered or unexported fields
}

func (*IntValMappingData) BuildPBComponentData added in v0.13.746

func (svmd *IntValMappingData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*IntValMappingData) ChgConfigIntVal added in v0.13.746

func (svmd *IntValMappingData) ChgConfigIntVal(key string, off int) int

ChgConfigIntVal -

func (*IntValMappingData) Clone added in v0.13.746

func (svmd *IntValMappingData) Clone() IComponentData

Clone

func (*IntValMappingData) OnNewGame added in v0.13.746

func (svmd *IntValMappingData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type Jackpot added in v0.13.261

type Jackpot struct {
	*BasicComponent `json:"-"`
	Config          *JackpotConfig `json:"config"`
}

func (*Jackpot) GetWinMulti added in v0.13.261

func (jackpot *Jackpot) GetWinMulti(basicCD *BasicComponentData) int

func (*Jackpot) GetWins added in v0.13.261

func (jackpot *Jackpot) GetWins(basicCD *BasicComponentData) int

func (*Jackpot) Init added in v0.13.261

func (jackpot *Jackpot) Init(fn string, pool *GamePropertyPool) error

Init -

func (*Jackpot) InitEx added in v0.13.261

func (jackpot *Jackpot) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*Jackpot) NewComponentData added in v0.13.261

func (jackpot *Jackpot) NewComponentData() IComponentData

NewComponentData -

func (*Jackpot) NewStats2 added in v0.13.321

func (jackpot *Jackpot) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*Jackpot) OnAsciiGame added in v0.13.261

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

OnAsciiGame - outpur to asciigame

func (*Jackpot) OnPlayGame added in v0.13.261

func (jackpot *Jackpot) 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 (*Jackpot) OnStats2 added in v0.13.321

func (jackpot *Jackpot) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

func (*Jackpot) ProcControllers added in v0.13.763

func (jackpot *Jackpot) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type JackpotConfig added in v0.13.261

type JackpotConfig 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
	Wins                 int      `yaml:"wins" json:"wins"`               // wins
	WinMulti             int      `yaml:"winMulti" json:"winMulti"`       // winMulti,最后的中奖倍数,默认为1
	Controllers          []*Award `yaml:"controllers" json:"controllers"` // 新的奖励系统
}

JackpotConfig - configuration for Jackpot

func (*JackpotConfig) SetLinkComponent added in v0.13.261

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

SetLinkComponent

type JackpotData added in v0.13.261

type JackpotData struct {
	BasicComponentData
	Wins     int
	WinMulti int
}

func (*JackpotData) BuildPBComponentData added in v0.13.261

func (jackpotData *JackpotData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*JackpotData) Clone added in v0.13.261

func (jackpotData *JackpotData) Clone() IComponentData

Clone

func (*JackpotData) GetValEx added in v0.13.336

func (jackpotData *JackpotData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*JackpotData) OnNewGame added in v0.13.261

func (jackpotData *JackpotData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

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, icd IComponentData) (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, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

func (*LinesTrigger) ProcControllers added in v0.13.376

func (linesTrigger *LinesTrigger) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

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
	LineData                        string                        `yaml:"linedata" json:"linedata"`                                           // linedata
	JumpToComponent                 string                        `yaml:"jumpToComponent" json:"jumpToComponent"`                             // jump to
	ForceToNext                     bool                          `yaml:"forceToNext" json:"forceToNext"`                                     // 如果触发,默认跳转jump to,这里可以强制走next分支
	Awards                          []*Award                      `yaml:"awards" json:"awards"`                                               // 新的奖励系统
	TargetMask                      string                        `yaml:"targetMask" json:"targetMask"`                                       // 如果是scatter这一组判断,可以把结果传递给一个mask
	IsReverse                       bool                          `yaml:"isReverse" json:"isReverse"`                                         // 如果isReverse,表示判定为否才触发
	PiggyBankComponent              string                        `yaml:"piggyBankComponent" json:"piggyBankComponent"`                       // piggyBank component
	OutputToComponent               string                        `yaml:"outputToComponent" json:"outputToComponent"`                         // 将结果给到一个 positionCollection
	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
	SetWinSymbols                   []string                      `yaml:"setWinSymbols" json:"setWinSymbols"`
}

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
	SymbolCodes   []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) GetSymbolCodes added in v0.13.596

func (linesTriggerData *LinesTriggerData) GetSymbolCodes() []int

func (*LinesTriggerData) GetValEx added in v0.13.336

func (linesTriggerData *LinesTriggerData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*LinesTriggerData) OnNewGame added in v0.12.264

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

OnNewGame -

func (*LinesTriggerData) SetSymbolCodes added in v0.13.596

func (linesTriggerData *LinesTriggerData) SetSymbolCodes(symbolCodes []int)

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"`
	Num                  int              `yaml:"num" json:"num"`
	IgnoreFalse          bool             `yaml:"ignoreFalse" json:"ignoreFalse"`
	InitMask             []bool           `yaml:"initMask" json:"initMask"`
	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 MergePositionCollection added in v0.13.502

type MergePositionCollection struct {
	*BasicComponent `json:"-"`
	Config          *MergePositionCollectionConfig `json:"config"`
}

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

func (*MergePositionCollection) GetAllLinkComponents added in v0.13.502

func (mergePositionCollection *MergePositionCollection) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*MergePositionCollection) Init added in v0.13.502

func (mergePositionCollection *MergePositionCollection) Init(fn string, pool *GamePropertyPool) error

Init -

func (*MergePositionCollection) InitEx added in v0.13.502

func (mergePositionCollection *MergePositionCollection) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*MergePositionCollection) NewComponentData added in v0.13.502

func (mergePositionCollection *MergePositionCollection) NewComponentData() IComponentData

NewComponentData -

func (*MergePositionCollection) OnAsciiGame added in v0.13.502

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

OnAsciiGame - outpur to asciigame

func (*MergePositionCollection) OnPlayGame added in v0.13.502

func (mergePositionCollection *MergePositionCollection) 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 MergePositionCollectionConfig added in v0.13.502

type MergePositionCollectionConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	SrcSymbols           []string `yaml:"srcSymbols" json:"srcSymbols"`               // srcSymbols
	SrcSymbolCodes       []int    `yaml:"-" json:"-"`                                 // srcSymbols
	SrcComponents        []string `yaml:"srcComponents" json:"srcComponents"`         // srcComponents
	OutputToComponent    string   `yaml:"outputToComponent" json:"outputToComponent"` // outputToComponent
	IsClearOutput        bool     `yaml:"isClearOutput" json:"isClearOutput"`         // isClearOutput
	Awards               []*Award `yaml:"awards" json:"awards"`                       // 新的奖励系统
}

MergePositionCollectionConfig - configuration for MergePositionCollection feature

func (*MergePositionCollectionConfig) SetLinkComponent added in v0.13.502

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

SetLinkComponent

type MergePositionCollectionData added in v0.13.502

type MergePositionCollectionData struct {
	BasicComponentData
	Pos []int
}

func (*MergePositionCollectionData) AddPos added in v0.13.502

func (mergePositionCollectionData *MergePositionCollectionData) AddPos(x int, y int)

AddPos -

func (*MergePositionCollectionData) BuildPBComponentData added in v0.13.502

func (mergePositionCollectionData *MergePositionCollectionData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*MergePositionCollectionData) ClearPos added in v0.13.599

func (mergePositionCollectionData *MergePositionCollectionData) ClearPos()

ClearPos -

func (*MergePositionCollectionData) Clone added in v0.13.502

func (mergePositionCollectionData *MergePositionCollectionData) Clone() IComponentData

Clone

func (*MergePositionCollectionData) GetPos added in v0.13.502

func (mergePositionCollectionData *MergePositionCollectionData) GetPos() []int

GetPos -

func (*MergePositionCollectionData) HasPos added in v0.13.502

func (mergePositionCollectionData *MergePositionCollectionData) HasPos(x int, y int) bool

HasPos -

func (*MergePositionCollectionData) OnNewGame added in v0.13.502

func (mergePositionCollectionData *MergePositionCollectionData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type MergeSPGrid added in v0.13.767

type MergeSPGrid struct {
	*BasicComponent `json:"-"`
	Config          *MergeSPGridConfig `json:"config"`
}

func (*MergeSPGrid) Init added in v0.13.767

func (gen *MergeSPGrid) Init(fn string, pool *GamePropertyPool) error

Init - load from file

func (*MergeSPGrid) InitEx added in v0.13.767

func (gen *MergeSPGrid) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - init from config object

func (*MergeSPGrid) OnAsciiGame added in v0.13.767

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

OnAsciiGame - output to asciigame (no-op)

func (*MergeSPGrid) OnPlayGame added in v0.13.767

func (gen *MergeSPGrid) 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)

OnPlayGame - placeholder: does nothing but advance

func (*MergeSPGrid) ProcControllers added in v0.13.767

func (gen *MergeSPGrid) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

ProcControllers -

type MergeSPGridConfig added in v0.13.767

type MergeSPGridConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Source1              string              `yaml:"source1" json:"source1"`
	Source2              string              `yaml:"source2" json:"source2"`
	Formula              string              `yaml:"formula" json:"formula"`
	Output               string              `yaml:"output" json:"output"`
	MapControllers       map[string][]*Award `yaml:"controllers" json:"controllers"`
	// contains filtered or unexported fields
}

MergeSPGridConfig is a placeholder configuration for MergeSPGrid

func (*MergeSPGridConfig) SetLinkComponent added in v0.13.767

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

type MergeSPGridCore added in v0.13.767

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

MergeSPGridCore - MergeSPGrid核心

func NewMergeSPGridCore added in v0.13.767

func NewMergeSPGridCore(code string) (*MergeSPGridCore, error)

func (*MergeSPGridCore) CalcVal added in v0.13.767

func (cc *MergeSPGridCore) CalcVal(source []int) (int, error)

func (*MergeSPGridCore) SetScript added in v0.13.767

func (cc *MergeSPGridCore) SetScript(code string) error

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, msd *MoveSymbolData)

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

func (moveSymbol *MoveSymbol) NewComponentData() IComponentData

NewComponentData -

func (*MoveSymbol) OnAsciiGame added in v0.12.148

func (moveSymbol *MoveSymbol) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, icd 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, icd 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 MoveSymbolData added in v0.13.204

type MoveSymbolData struct {
	BasicComponentData
	Pos [][]int
}

func (*MoveSymbolData) AddPos added in v0.13.204

func (moveSymbolData *MoveSymbolData) AddPos(x int, y int)

AddPos -

func (*MoveSymbolData) AddPosEx added in v0.13.204

func (moveSymbolData *MoveSymbolData) AddPosEx(x int, y int)

AddPosEx -

func (*MoveSymbolData) BuildPBComponentData added in v0.13.204

func (moveSymbolData *MoveSymbolData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*MoveSymbolData) ClearPos added in v0.13.599

func (moveSymbolData *MoveSymbolData) ClearPos()

ClearPos -

func (*MoveSymbolData) Clone added in v0.13.204

func (moveSymbolData *MoveSymbolData) Clone() IComponentData

Clone

func (*MoveSymbolData) GetPos added in v0.13.204

func (moveSymbolData *MoveSymbolData) GetPos() []int

GetPos -

func (*MoveSymbolData) HasPos added in v0.13.204

func (moveSymbolData *MoveSymbolData) HasPos(x int, y int) bool

HasPos -

func (*MoveSymbolData) OnNewGame added in v0.13.204

func (moveSymbolData *MoveSymbolData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*MoveSymbolData) OnNewStep added in v0.13.204

func (moveSymbolData *MoveSymbolData) OnNewStep()

OnNewStep -

type MoveSymbols2 added in v0.13.464

type MoveSymbols2 struct {
	*BasicComponent `json:"-"`
	Config          *MoveSymbols2Config `json:"config"`
}

func (*MoveSymbols2) Init added in v0.13.464

func (moveSymbol2 *MoveSymbols2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*MoveSymbols2) InitEx added in v0.13.464

func (moveSymbol2 *MoveSymbols2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*MoveSymbols2) NewComponentData added in v0.13.464

func (moveSymbol2 *MoveSymbols2) NewComponentData() IComponentData

NewComponentData -

func (*MoveSymbols2) OnAsciiGame added in v0.13.464

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

OnAsciiGame - outpur to asciigame

func (*MoveSymbols2) OnPlayGame added in v0.13.464

func (moveSymbol2 *MoveSymbols2) 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 (*MoveSymbols2) ProcControllers added in v0.13.464

func (moveSymbol2 *MoveSymbols2) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type MoveSymbols2Config added in v0.13.464

type MoveSymbols2Config struct {
	BasicComponentConfig   `yaml:",inline" json:",inline"`
	Type                   MoveSymbols2Type `yaml:"-" json:"-"`
	StrType                string           `yaml:"type" json:"type"`
	SrcSymbols             []string         `yaml:"srcSymbols" json:"srcSymbols"`
	SrcSymbolCodes         []int            `yaml:"-" json:"-"`
	SrcPositionCollections []string         `json:"srcPositionCollections"`
	FillSymbol             string           `json:"fillSymbol"`
	FillSymbolCode         int              `json:"-"`
	RemoveSymbol           string           `json:"removeSymbol"`
	RemoveSymbolCode       int              `json:"-"`
	Controllers            []*Award         `yaml:"controllers" json:"controllers"`
}

MoveSymbols2Config - configuration for MoveSymbols2

func (*MoveSymbols2Config) SetLinkComponent added in v0.13.464

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

SetLinkComponent

type MoveSymbols2Data added in v0.13.464

type MoveSymbols2Data struct {
	BasicComponentData
	Pos [][]int
}

func (*MoveSymbols2Data) AddPos added in v0.13.464

func (moveSymbols2Data *MoveSymbols2Data) AddPos(x int, y int)

AddPos -

func (*MoveSymbols2Data) AddPosEx added in v0.13.464

func (moveSymbols2Data *MoveSymbols2Data) AddPosEx(x int, y int)

AddPosEx -

func (*MoveSymbols2Data) BuildPBComponentData added in v0.13.464

func (moveSymbols2Data *MoveSymbols2Data) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*MoveSymbols2Data) ClearPos added in v0.13.599

func (moveSymbols2Data *MoveSymbols2Data) ClearPos()

ClearPos -

func (*MoveSymbols2Data) Clone added in v0.13.464

func (moveSymbols2Data *MoveSymbols2Data) Clone() IComponentData

Clone

func (*MoveSymbols2Data) GetPos added in v0.13.464

func (moveSymbols2Data *MoveSymbols2Data) GetPos() []int

GetPos -

func (*MoveSymbols2Data) HasPos added in v0.13.464

func (moveSymbols2Data *MoveSymbols2Data) HasPos(x int, y int) bool

HasPos -

func (*MoveSymbols2Data) OnNewGame added in v0.13.464

func (moveSymbols2Data *MoveSymbols2Data) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*MoveSymbols2Data) OnNewStep added in v0.13.464

func (moveSymbols2Data *MoveSymbols2Data) OnNewStep()

OnNewStep -

type MoveSymbols2Type added in v0.13.464

type MoveSymbols2Type int
const (
	MS2TypeLeft  MoveSymbols2Type = 0 // left
	MS2TypeRight MoveSymbols2Type = 1 // right
)

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

func (piggyBank *PiggyBank) NewStats2(parent string) *stats2.Feature

NewStats2 -

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

func (*PiggyBank) OnStats2 added in v0.13.366

func (piggyBank *PiggyBank) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

type PiggyBankConfig added in v0.13.47

type PiggyBankConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	WinMulti             int           `yaml:"winMulti" json:"winMulti"` // winMulti,最后的中奖倍数,默认为1
	StrType              string        `yaml:"type" json:"type"`         // 如何初始化winmulti
	Type                 PiggyBankType `yaml:"-" json:"-"`               // 如何初始化winmulti
}

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) GetValEx added in v0.13.336

func (piggyBankData *PiggyBankData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*PiggyBankData) OnNewGame added in v0.13.47

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

OnNewGame -

type PiggyBankType added in v0.13.186

type PiggyBankType int
const (
	PiggyBankTypeNone                   PiggyBankType = 0
	PiggyBankTypeSumSymbolVals          PiggyBankType = 1
	PiggyBankTypeAddSumSymbolVals       PiggyBankType = 2
	PiggyBankTypeSumEmptyWithSymbolVals PiggyBankType = 3
)

type PlayerState added in v0.13.519

type PlayerState struct {
	MapBetMothodPub map[int]*BetMethodPS
	MapBetMothodPri map[int]*BetMethodPS
}

PlayerState - player state

func NewPlayerState added in v0.13.519

func NewPlayerState() *PlayerState

func (*PlayerState) Clone added in v0.13.519

func (ps *PlayerState) Clone() sgc7game.IPlayerState

func (*PlayerState) GetBetMethodPub added in v0.13.519

func (ps *PlayerState) GetBetMethodPub(betMethod int) *BetMethodPS

func (*PlayerState) GetCurGameMod added in v0.13.519

func (ps *PlayerState) GetCurGameMod() string

GetCurGameMod - get current game module

func (*PlayerState) GetPrivate added in v0.13.519

func (ps *PlayerState) GetPrivate() any

GetPrivate - get player private state

func (*PlayerState) GetPrivateJson added in v0.13.519

func (ps *PlayerState) GetPrivateJson() string

GetPrivateJson - set player private state

func (*PlayerState) GetPublic added in v0.13.519

func (ps *PlayerState) GetPublic() any

GetPublic - get player public state

func (*PlayerState) GetPublicJson added in v0.13.519

func (ps *PlayerState) GetPublicJson() string

GetPublicJson - set player public state

func (*PlayerState) OnOutput added in v0.13.586

func (ps *PlayerState) OnOutput()

func (*PlayerState) Rebuild added in v0.13.521

func (ps *PlayerState) Rebuild()

func (*PlayerState) SetCurGameMod added in v0.13.519

func (ps *PlayerState) SetCurGameMod(gamemod string)

SetCurGameMod - set current game module

func (*PlayerState) SetPrivate added in v0.13.519

func (ps *PlayerState) SetPrivate(pri any) error

SetPrivate - set player private state

func (*PlayerState) SetPrivateJson added in v0.13.519

func (ps *PlayerState) SetPrivateJson(pri string) error

SetPrivateJson - set player private state

func (*PlayerState) SetPublic added in v0.13.519

func (ps *PlayerState) SetPublic(pub any) error

SetPublic - set player public state

func (*PlayerState) SetPublicJson added in v0.13.519

func (ps *PlayerState) SetPublicJson(pub string) error

SetPublicJson - set player public state

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 PosData added in v0.13.722

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

func (*PosData) Add added in v0.13.722

func (pd *PosData) Add(x, y int)

func (*PosData) Clear added in v0.13.807

func (pd *PosData) Clear()

func (*PosData) Del added in v0.13.767

func (pd *PosData) Del(i int)

func (*PosData) Get added in v0.13.782

func (pd *PosData) Get(i int) (int, int)

func (*PosData) Has added in v0.13.722

func (pd *PosData) Has(x, y int) bool

func (*PosData) Index added in v0.13.782

func (pd *PosData) Index(x, y int) int

func (*PosData) IsEmpty added in v0.13.767

func (pd *PosData) IsEmpty() bool

func (*PosData) Len added in v0.13.767

func (pd *PosData) Len() int

func (*PosData) SetPos added in v0.13.807

func (pd *PosData) SetPos(pos []int)

type PosPool added in v0.13.722

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

func NewPosPool added in v0.13.722

func NewPosPool(size int) *PosPool

func (*PosPool) Clone added in v0.13.722

func (pp *PosPool) Clone(pd *PosData) *PosData

func (*PosPool) Get added in v0.13.722

func (pp *PosPool) Get() *PosData

func (*PosPool) Put added in v0.13.722

func (pp *PosPool) Put(pd *PosData)

func (*PosPool) Reset added in v0.13.727

func (pp *PosPool) Reset()

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) ClearData added in v0.13.502

func (positionCollection *PositionCollection) ClearData(icd IComponentData, bForceNow bool)

ClearData -

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
	IsNeedClear          bool                   `yaml:"isNeedClear" json:"isNeedClear"`           // isNeedClear
	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
	// contains filtered or unexported fields
}

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) ClearPos added in v0.13.599

func (positionCollectionData *PositionCollectionData) ClearPos()

ClearPos -

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

ChgConfigIntVal -

func (*QueueBranchData) Clone added in v0.13.170

func (queueBranchData *QueueBranchData) Clone() IComponentData

Clone

func (*QueueBranchData) GetValEx added in v0.13.336

func (queueBranchData *QueueBranchData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

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 RandomMoveSymbols added in v0.13.414

type RandomMoveSymbols struct {
	*BasicComponent `json:"-"`
	Config          *RandomMoveSymbolsConfig `json:"config"`
}

func (*RandomMoveSymbols) Init added in v0.13.414

func (randomMoveSymbols *RandomMoveSymbols) Init(fn string, pool *GamePropertyPool) error

Init -

func (*RandomMoveSymbols) InitEx added in v0.13.414

func (randomMoveSymbols *RandomMoveSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*RandomMoveSymbols) IsNeedOnStepEndStats2 added in v0.13.467

func (moveSymbol *RandomMoveSymbols) IsNeedOnStepEndStats2() bool

IsNeedOnStepEndStats2 - 除respin外,如果也有component也需要在stepEnd调用的话,这里需要返回true

func (*RandomMoveSymbols) NewComponentData added in v0.13.414

func (moveSymbol *RandomMoveSymbols) NewComponentData() IComponentData

NewComponentData -

func (*RandomMoveSymbols) NewStats2 added in v0.13.467

func (moveSymbol *RandomMoveSymbols) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*RandomMoveSymbols) OnAsciiGame added in v0.13.414

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

OnAsciiGame - outpur to asciigame

func (*RandomMoveSymbols) OnPlayGame added in v0.13.414

func (randomMoveSymbols *RandomMoveSymbols) 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 (*RandomMoveSymbols) OnStats2 added in v0.13.467

func (moveSymbol *RandomMoveSymbols) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

func (*RandomMoveSymbols) ProcControllers added in v0.13.422

func (randomMoveSymbols *RandomMoveSymbols) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type RandomMoveSymbolsConfig added in v0.13.414

type RandomMoveSymbolsConfig struct {
	BasicComponentConfig     `yaml:",inline" json:",inline"`
	Type                     RandomMoveSymbolsType `yaml:"-" json:"-"`
	StrType                  string                `yaml:"type" json:"type"`
	TargetSymbols            []string              `yaml:"targetSymbols" json:"targetSymbols"`
	TargetSymbolCodes        []int                 `yaml:"-" json:"-"`
	IgnoreSymbols            []string              `yaml:"ignoreSymbols" json:"ignoreSymbols"`
	IgnoreSymbolCodes        []int                 `yaml:"-" json:"-"`
	ReelsWeight              string                `yaml:"reelsWeight" json:"reelsWeight"`
	ReelsWeightVW2           *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	TargetPositionCollection string                `yaml:"targetPositionCollection" json:"targetPositionCollection"`
	Controllers              []*Award              `yaml:"controllers" json:"controllers"`
}

RandomMoveSymbolsConfig - configuration for RandomMoveSymbols

func (*RandomMoveSymbolsConfig) SetLinkComponent added in v0.13.414

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

SetLinkComponent

type RandomMoveSymbolsData added in v0.13.414

type RandomMoveSymbolsData struct {
	BasicComponentData
	Pos [][]int
}

func (*RandomMoveSymbolsData) AddPos added in v0.13.414

func (randomMoveSymbolsData *RandomMoveSymbolsData) AddPos(x int, y int)

AddPos -

func (*RandomMoveSymbolsData) AddPosEx added in v0.13.414

func (randomMoveSymbolsData *RandomMoveSymbolsData) AddPosEx(x int, y int)

AddPosEx -

func (*RandomMoveSymbolsData) BuildPBComponentData added in v0.13.414

func (randomMoveSymbolsData *RandomMoveSymbolsData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*RandomMoveSymbolsData) ClearPos added in v0.13.599

func (randomMoveSymbolsData *RandomMoveSymbolsData) ClearPos()

ClearPos -

func (*RandomMoveSymbolsData) Clone added in v0.13.414

func (randomMoveSymbolsData *RandomMoveSymbolsData) Clone() IComponentData

Clone

func (*RandomMoveSymbolsData) GetPos added in v0.13.414

func (randomMoveSymbolsData *RandomMoveSymbolsData) GetPos() []int

GetPos -

func (*RandomMoveSymbolsData) HasPos added in v0.13.414

func (randomMoveSymbolsData *RandomMoveSymbolsData) HasPos(x int, y int) bool

HasPos -

func (*RandomMoveSymbolsData) OnNewGame added in v0.13.414

func (randomMoveSymbolsData *RandomMoveSymbolsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*RandomMoveSymbolsData) OnNewStep added in v0.13.414

func (randomMoveSymbolsData *RandomMoveSymbolsData) OnNewStep()

OnNewStep -

type RandomMoveSymbolsType added in v0.13.414

type RandomMoveSymbolsType int
const (
	RMSTypeNormal RandomMoveSymbolsType = 0 // normal
	RMSTypeReels  RandomMoveSymbolsType = 1 // reels
)

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 RebuildReelIndex added in v0.13.178

type RebuildReelIndex struct {
	*BasicComponent `json:"-"`
	Config          *RebuildReelIndexConfig `json:"config"`
}

func (*RebuildReelIndex) Init added in v0.13.178

func (rebuildReelIndex *RebuildReelIndex) Init(fn string, pool *GamePropertyPool) error

Init -

func (*RebuildReelIndex) InitEx added in v0.13.178

func (rebuildReelIndex *RebuildReelIndex) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*RebuildReelIndex) OnAsciiGame added in v0.13.178

func (rebuildReelIndex *RebuildReelIndex) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*RebuildReelIndex) OnPlayGame added in v0.13.178

func (rebuildReelIndex *RebuildReelIndex) 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 RebuildReelIndexConfig added in v0.13.178

type RebuildReelIndexConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string               `yaml:"type" json:"type"` // type
	Type                 RebuildReelIndexType `yaml:"-" json:"-"`       // type
}

RebuildReelIndexConfig - configuration for RebuildReelIndex feature

func (*RebuildReelIndexConfig) SetLinkComponent added in v0.13.178

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

SetLinkComponent

type RebuildReelIndexType added in v0.13.178

type RebuildReelIndexType int
const (
	RebuildReelIndexTypeCircle RebuildReelIndexType = 0 // circle
	RebuildReelIndexTypeRandom RebuildReelIndexType = 1 // random
)

type RebuildSymbols added in v0.13.189

type RebuildSymbols struct {
	*BasicComponent `json:"-"`
	Config          *RebuildSymbolsConfig `json:"config"`
}

func (*RebuildSymbols) Init added in v0.13.189

func (rebuildSymbols *RebuildSymbols) Init(fn string, pool *GamePropertyPool) error

Init -

func (*RebuildSymbols) InitEx added in v0.13.189

func (rebuildSymbols *RebuildSymbols) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*RebuildSymbols) OnAsciiGame added in v0.13.189

func (rebuildSymbols *RebuildSymbols) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*RebuildSymbols) OnPlayGame added in v0.13.189

func (rebuildSymbols *RebuildSymbols) 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 RebuildSymbolsConfig added in v0.13.189

type RebuildSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string             `yaml:"type" json:"type"` // type
	Type                 RebuildSymbolsType `yaml:"-" json:"-"`       // type
	Symbols              []string           `yaml:"symbols" json:"symbols"`
	SymbolCodes          []int              `yaml:"-" json:"-"`
}

RebuildSymbolsConfig - configuration for RebuildSymbols feature

func (*RebuildSymbolsConfig) SetLinkComponent added in v0.13.189

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

SetLinkComponent

type RebuildSymbolsType added in v0.13.189

type RebuildSymbolsType int
const (
	RebuildSymbolsTypeCircle RebuildSymbolsType = 0 // circle
	RebuildSymbolsTypeRandom RebuildSymbolsType = 1 // random
)

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 ReelTrigger added in v0.13.261

type ReelTrigger struct {
	*BasicComponent `json:"-"`
	Config          *ReelTriggerConfig `json:"config"`
}

func (*ReelTrigger) GetAllLinkComponents added in v0.13.261

func (reelTrigger *ReelTrigger) GetAllLinkComponents() []string

GetAllLinkComponents - get all link components

func (*ReelTrigger) GetNextLinkComponents added in v0.13.261

func (reelTrigger *ReelTrigger) GetNextLinkComponents() []string

GetNextLinkComponents - get next link components

func (*ReelTrigger) Init added in v0.13.261

func (reelTrigger *ReelTrigger) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ReelTrigger) InitEx added in v0.13.261

func (reelTrigger *ReelTrigger) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ReelTrigger) NewComponentData added in v0.13.261

func (reelTrigger *ReelTrigger) NewComponentData() IComponentData

NewComponentData -

func (*ReelTrigger) NewStats2 added in v0.13.261

func (reelTrigger *ReelTrigger) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*ReelTrigger) OnAsciiGame added in v0.13.261

func (reelTrigger *ReelTrigger) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*ReelTrigger) OnPlayGame added in v0.13.261

func (reelTrigger *ReelTrigger) 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 (*ReelTrigger) OnStats2 added in v0.13.261

func (reelTrigger *ReelTrigger) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

type ReelTriggerConfig added in v0.13.261

type ReelTriggerConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Symbols              []string            `yaml:"symbols" json:"symbols"`                       // symbols
	SymbolCodes          []int               `yaml:"-" json:"-"`                                   // symbol codes
	StrType              string              `yaml:"type" json:"type"`                             // ReelTriggerType
	Type                 ReelTriggerType     `yaml:"-" json:"-"`                                   // ReelTriggerType
	WildSymbols          []string            `yaml:"wildSymbols" json:"wildSymbols"`               // wild etc
	WildSymbolCodes      []int               `yaml:"-" json:"-"`                                   // wild symbolCode
	MinSymbolNum         int                 `yaml:"minSymbolNum" json:"minSymbolNum"`             // minSymbolNum
	TargetMask           string              `yaml:"targetMask" json:"targetMask"`                 // 可以把结果传递给一个mask
	MapBranchs           map[int]*BranchNode `yaml:"mapBranchs" json:"mapBranchs"`                 // mapBranchs
	IsCheckEmptySymbol   bool                `yaml:"isCheckEmptySymbol" json:"isCheckEmptySymbol"` //
}

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

func (*ReelTriggerConfig) SetLinkComponent added in v0.13.261

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

SetLinkComponent

type ReelTriggerData added in v0.13.261

type ReelTriggerData struct {
	BasicComponentData
	NextComponent string
	Masks         []bool
	Number        int
	SymbolCode    int
}

func (*ReelTriggerData) BuildPBComponentData added in v0.13.261

func (reelTriggerData *ReelTriggerData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*ReelTriggerData) Clone added in v0.13.261

func (reelTriggerData *ReelTriggerData) Clone() IComponentData

Clone

func (*ReelTriggerData) GetValEx added in v0.13.490

func (reelTriggerData *ReelTriggerData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*ReelTriggerData) OnNewGame added in v0.13.261

func (reelTriggerData *ReelTriggerData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type ReelTriggerType added in v0.13.261

type ReelTriggerType int
const (
	RTTypeRow          ReelTriggerType = 0 // row
	RTTypeColumn       ReelTriggerType = 1 // column
	RTTypeRowNumber    ReelTriggerType = 2 // row number
	RTTypeColumnNumber ReelTriggerType = 3 // column number
	RTTypeFullScreen   ReelTriggerType = 4 // full screen
)

type ReelsCollector added in v0.13.530

type ReelsCollector struct {
	*BasicComponent `json:"-"`
	Config          *ReelsCollectorConfig `json:"config"`
}

func (*ReelsCollector) ChgReelsCollector added in v0.13.531

func (reelsCollector *ReelsCollector) ChgReelsCollector(icd IComponentData, ps *PlayerState, betMethod int, bet int, reelsData []int)

func (*ReelsCollector) Init added in v0.13.530

func (reelsCollector *ReelsCollector) Init(fn string, pool *GamePropertyPool) error

Init -

func (*ReelsCollector) InitEx added in v0.13.530

func (reelsCollector *ReelsCollector) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*ReelsCollector) InitPlayerState added in v0.13.530

func (reelsCollector *ReelsCollector) InitPlayerState(pool *GamePropertyPool, gameProp *GameProperty, plugin sgc7plugin.IPlugin,
	ps *PlayerState, betMethod int, bet int) error

InitPlayerState -

func (*ReelsCollector) NewComponentData added in v0.13.530

func (reelsCollector *ReelsCollector) NewComponentData() IComponentData

NewComponentData -

func (*ReelsCollector) OnAsciiGame added in v0.13.530

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

OnAsciiGame - outpur to asciigame

func (*ReelsCollector) OnPlayGame added in v0.13.530

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

playgame

func (*ReelsCollector) ProcControllers added in v0.13.530

func (reelsCollector *ReelsCollector) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type ReelsCollectorConfig added in v0.13.530

type ReelsCollectorConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrTriggerType       string                    `yaml:"triggerType" json:"triggerType"`         // triggerType
	TriggerType          ReelsCollectorTriggerType `yaml:"-" json:"-"`                             // triggerType
	MaxVal               int                       `yaml:"maxVal" json:"maxVal"`                   // maxVal
	IsPlayerState        bool                      `yaml:"IsPlayerState" json:"IsPlayerState"`     // IsPlayerState
	OutputMask           string                    `yaml:"outputMask" json:"outputMask"`           // outputMask
	MapAwards            map[string][]*Award       `yaml:"mapAwards" json:"mapAwards"`             // 新的奖励系统
	JumpToComponent      string                    `yaml:"jumpToComponent" json:"jumpToComponent"` // jump to
}

ReelsCollectorConfig - configuration for ReelsCollector

func (*ReelsCollectorConfig) SetLinkComponent added in v0.13.530

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

SetLinkComponent

type ReelsCollectorData added in v0.13.530

type ReelsCollectorData struct {
	BasicComponentData
	Collectors       []int
	LastTriggerIndex []int
	// contains filtered or unexported fields
}

func (*ReelsCollectorData) BuildPBComponentData added in v0.13.530

func (reelsCollectorData *ReelsCollectorData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*ReelsCollectorData) ChgReelsCollector added in v0.13.531

func (reelsCollectorData *ReelsCollectorData) ChgReelsCollector(reelsData []int)

func (*ReelsCollectorData) Clone added in v0.13.530

func (reelsCollectorData *ReelsCollectorData) Clone() IComponentData

Clone

func (*ReelsCollectorData) GetValEx added in v0.13.531

func (reelsCollectorData *ReelsCollectorData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*ReelsCollectorData) OnNewGame added in v0.13.530

func (reelsCollectorData *ReelsCollectorData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type ReelsCollectorPS added in v0.13.530

type ReelsCollectorPS struct {
	Collectors       []int `json:"collectors"`       // collectors
	LastTriggerIndex []int `json:"lastTriggerIndex"` // lastTriggerIndex
}

func (*ReelsCollectorPS) Clone added in v0.13.530

func (ps *ReelsCollectorPS) Clone() IComponentPS

Clone

func (*ReelsCollectorPS) GetPrivateJson added in v0.13.530

func (ps *ReelsCollectorPS) GetPrivateJson() string

GetPrivateJson

func (*ReelsCollectorPS) GetPublicJson added in v0.13.530

func (ps *ReelsCollectorPS) GetPublicJson() string

GetPublicJson

func (*ReelsCollectorPS) SetPrivateJson added in v0.13.530

func (ps *ReelsCollectorPS) SetPrivateJson(str string) error

SetPrivateJson

func (*ReelsCollectorPS) SetPublicJson added in v0.13.530

func (ps *ReelsCollectorPS) SetPublicJson(str string) error

SetPublicJson

type ReelsCollectorTriggerType added in v0.13.530

type ReelsCollectorTriggerType int
const (
	RCTTypeNormal    ReelsCollectorTriggerType = 0 // normal
	RCTTypeLeft      ReelsCollectorTriggerType = 1 // left
	RCTTypeRight     ReelsCollectorTriggerType = 2 // right
	RCTTypeLoopLeft  ReelsCollectorTriggerType = 3 // loopleft
	RCTTypeLoopRight ReelsCollectorTriggerType = 4 // loopright
)

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 RefillSymbols2 added in v0.13.694

type RefillSymbols2 struct {
	*BasicComponent `json:"-"`
	Config          *RefillSymbols2Config `json:"config"`
}

func (*RefillSymbols2) EachUsedResults added in v0.13.694

func (refillSymbols2 *RefillSymbols2) EachUsedResults(pr *sgc7game.PlayResult, pbComponentData *anypb.Any, oneach FuncOnEachUsedResult)

EachUsedResults -

func (*RefillSymbols2) Init added in v0.13.694

func (refillSymbols2 *RefillSymbols2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*RefillSymbols2) InitEx added in v0.13.694

func (refillSymbols2 *RefillSymbols2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*RefillSymbols2) NewComponentData added in v0.13.743

func (refillSymbols2 *RefillSymbols2) NewComponentData() IComponentData

NewComponentData -

func (*RefillSymbols2) OnAsciiGame added in v0.13.694

func (refillSymbols2 *RefillSymbols2) OnAsciiGame(gameProp *GameProperty, pr *sgc7game.PlayResult, lst []*sgc7game.PlayResult, mapSymbolColor *asciigame.SymbolColorMap, cd IComponentData) error

OnAsciiGame - outpur to asciigame

func (*RefillSymbols2) OnPlayGame added in v0.13.694

func (refillSymbols2 *RefillSymbols2) 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 RefillSymbols2Config added in v0.13.694

type RefillSymbols2Config struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	IsNeedProcSymbolVals bool   `yaml:"isNeedProcSymbolVals" json:"isNeedProcSymbolVals"` // 是否需要同时处理symbolVals
	EmptySymbolVal       int    `yaml:"emptySymbolVal" json:"emptySymbolVal"`             // 空的symbolVal是什么
	DefaultSymbolVal     int    `yaml:"defaultSymbolVal" json:"defaultSymbolVal"`         // 重新填充的symbolVal是什么
	OutputToComponent    string `yaml:"outputToComponent" json:"outputToComponent"`       // 输出到哪个组件
	Height               int    `yaml:"height" json:"height"`                             // 重新填充的symbolVal是什么
	MaskX                string `yaml:"maskX" json:"maskX"`                               // maskX
	MaskY                string `yaml:"maskY" json:"maskY"`                               // maskY
	CollectorPay         string `yaml:"collectorPay" json:"collectorPay"`                 // collectorPay
	CPCore               string `yaml:"cpCore" json:"cpCore"`                             // cpCore
}

RefillSymbols2Config - configuration for RefillSymbols2

func (*RefillSymbols2Config) SetLinkComponent added in v0.13.694

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

SetLinkComponent

type RefillSymbols2Data added in v0.13.743

type RefillSymbols2Data struct {
	BasicComponentData
	// contains filtered or unexported fields
}

func (*RefillSymbols2Data) BuildPBComponentData added in v0.13.743

func (rs2d *RefillSymbols2Data) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*RefillSymbols2Data) ChgConfigIntVal added in v0.13.743

func (rs2d *RefillSymbols2Data) ChgConfigIntVal(key string, off int) int

ChgConfigIntVal -

func (*RefillSymbols2Data) Clone added in v0.13.743

func (rs2d *RefillSymbols2Data) Clone() IComponentData

Clone

func (*RefillSymbols2Data) GetValEx added in v0.13.743

func (rs2d *RefillSymbols2Data) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*RefillSymbols2Data) OnNewGame added in v0.13.743

func (rs2d *RefillSymbols2Data) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type RefillSymbolsConfig added in v0.13.17

type RefillSymbolsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	IsNeedProcSymbolVals bool   `yaml:"isNeedProcSymbolVals" json:"isNeedProcSymbolVals"` // 是否需要同时处理symbolVals
	EmptySymbolVal       int    `yaml:"emptySymbolVal" json:"emptySymbolVal"`             // 空的symbolVal是什么
	DefaultSymbolVal     int    `yaml:"defaultSymbolVal" json:"defaultSymbolVal"`         // 重新填充的symbolVal是什么
	OutputToComponent    string `yaml:"outputToComponent" json:"outputToComponent"`       // 输出到哪个组件
}

RefillSymbolsConfig - configuration for RefillSymbols

func (*RefillSymbolsConfig) SetLinkComponent added in v0.13.25

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

SetLinkComponent

type RefillTropiCoolSPGrid added in v0.13.711

type RefillTropiCoolSPGrid struct {
	*BasicComponent `json:"-"`
	Config          *RefillTropiCoolSPGridConfig `json:"config"`
}

func (*RefillTropiCoolSPGrid) Init added in v0.13.711

func (gen *RefillTropiCoolSPGrid) Init(fn string, pool *GamePropertyPool) error

Init - load from file

func (*RefillTropiCoolSPGrid) InitEx added in v0.13.711

func (gen *RefillTropiCoolSPGrid) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config object

func (*RefillTropiCoolSPGrid) OnAsciiGame added in v0.13.711

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

OnAsciiGame - output to asciigame (no-op)

func (*RefillTropiCoolSPGrid) OnPlayGame added in v0.13.711

func (gen *RefillTropiCoolSPGrid) 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)

OnPlayGame - generate SPGrid and optionally apply refill (gravity to bottom)

type RefillTropiCoolSPGridConfig added in v0.13.711

type RefillTropiCoolSPGridConfig struct {
	BasicComponentConfig  `yaml:",inline" json:",inline"`
	MaxNumber             int                   `yaml:"maxNumber" json:"maxNumber"`
	SPGrid                string                `yaml:"spGrid" json:"spGrid"`
	BlankSymbol           string                `yaml:"blankSymbol" json:"blankSymbol"`
	BlankSymbolCode       int                   `yaml:"-" json:"-"`
	GigaSymbols           []string              `yaml:"gigSymbols" json:"gigSymbols"`
	GigaSymbolCodes       []int                 `yaml:"-" json:"-"`
	TargetGigaSymbolCodes map[int](map[int]int) `yaml:"-" json:"-"` // key: symbolCode, value: size->symbolCode
	SPSymbols             []string              `yaml:"spSymbols" json:"spSymbols"`
	SPSymbolCodes         []int                 `yaml:"-" json:"-"`
	Weight                string                `yaml:"weight" json:"weight"`
	WeightVM              *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	GigaWeight            string                `yaml:"gigaWeight" json:"gigaWeight"`
	GigaWeightVM          *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	EmptySymbol           string                `yaml:"emptySymbol" json:"emptySymbol"`
	EmptySymbolCode       int                   `yaml:"-" json:"-"`
	SpBonusSymbol         string                `yaml:"spBonusSymbol" json:"spBonusSymbol"`
	SpBonusSymbolCode     int                   `yaml:"-" json:"-"`
	InitTropiCoolSPGrid   string                `yaml:"initTropiCoolSPGrid" json:"initTropiCoolSPGrid"`
	MapControls           map[string][]*Award   `yaml:"-" json:"-"`
}

RefillTropiCoolSPGridConfig - configuration for RefillTropiCoolSPGrid

func (*RefillTropiCoolSPGridConfig) SetLinkComponent added in v0.13.711

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

SetLinkComponent

type RemoveSymbols added in v0.13.17

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

RemoveSymbols implements the removeSymbols component behavior. It holds a reference to its configuration and a BasicComponent instance for common component behavior.

func (*RemoveSymbols) EachUsedResults added in v0.13.17

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

EachUsedResults is required by the component interface but not used by removeSymbols; it is intentionally a no-op here.

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 reads a YAML file from disk and initializes the component configuration using InitEx. It is a convenience wrapper used when configurations are stored in files.

func (*RemoveSymbols) InitEx added in v0.13.17

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

InitEx initializes the component from a parsed configuration object. It performs symbol code resolution using the provided GamePropertyPool and prepares awards and other derived config fields.

func (*RemoveSymbols) NewComponentData added in v0.13.17

func (removeSymbols *RemoveSymbols) NewComponentData() IComponentData

NewComponentData returns a new, zeroed RemoveSymbolsData instance. The runtime will call this to allocate per-play component data.

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 outputs a textual representation of the primary scene affected by this component to aid debugging and development. It expects a *RemoveSymbolsData as component data and will safely no-op if UsedScenes is empty.

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)

OnPlayGame is the component entry point executed for a play step. It applies the configured removal behavior (basic or adjacentPay) to the target GameScene(s), processes controllers/awards and returns the next component to execute (or an ErrComponentDoNothing error when no change occurred).

func (*RemoveSymbols) ProcControllers added in v0.13.376

func (removeSymbols *RemoveSymbols) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

ProcControllers executes configured award controllers after removal is performed. It's called by OnPlayGame after the scene changes are applied.

type RemoveSymbolsConfig added in v0.13.17

type RemoveSymbolsConfig struct {
	BasicComponentConfig     `yaml:",inline" json:",inline"`
	StrType                  string            `yaml:"type" json:"type"`
	Type                     RemoveSymbolsType `yaml:"-" json:"-"`
	AddedSymbol              string            `yaml:"addedSymbol" json:"addedSymbol"`
	AddedSymbolCode          int               `yaml:"-" json:"-"`
	JumpToComponent          string            `yaml:"jumpToComponent" json:"jumpToComponent"`                   // jump to
	TargetComponents         []string          `yaml:"targetComponents" json:"targetComponents"`                 // 这些组件的中奖会需要参与remove
	SourcePositionCollection []string          `yaml:"sourcePositionCollection" json:"sourcePositionCollection"` // 源位置集合
	IgnoreSymbols            []string          `yaml:"ignoreSymbols" json:"ignoreSymbols"`                       // 忽略的symbol
	IgnoreSymbolCodes        []int             `yaml:"-" json:"-"`                                               // 忽略的symbol
	IsNeedProcSymbolVals     bool              `yaml:"isNeedProcSymbolVals" json:"isNeedProcSymbolVals"`         // 是否需要同时处理symbolVals
	EmptySymbolVal           int               `yaml:"emptySymbolVal" json:"emptySymbolVal"`                     // 空的symbolVal是什么
	OutputToComponent        string            `yaml:"outputToComponent" json:"outputToComponent"`               // outputToComponent
	GenGigaSymbols2          string            `yaml:"genGigaSymbols2" json:"genGigaSymbols2"`
	Awards                   []*Award          `yaml:"awards" json:"awards"` // 新的奖励系统
}

RemoveSymbolsConfig is the YAML/JSON configuration for a removeSymbols component. It defines targets, ignored symbols, output wiring and additional behavior flags.

func (*RemoveSymbolsConfig) SetLinkComponent added in v0.13.25

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

SetLinkComponent sets a named downstream component link. Supported link values are "next" (default next component) and "jump" (jump target).

type RemoveSymbolsData added in v0.13.17

type RemoveSymbolsData struct {
	BasicComponentData
	RemovedNum int
	AvgHeight  int // average removed symbol height; fixed-point: 100==1.0
	X          int
	Y          int
}

RemoveSymbolsData holds runtime data for a removeSymbols component. It embeds BasicComponentData and tracks how many symbols were removed in the current step and the average height of removed symbols (AvgHeight). AvgHeight is stored as an int fixed-point value where 100 represents 1.0.

func (*RemoveSymbolsData) BuildPBComponentData added in v0.13.17

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

BuildPBComponentData builds the protobuf representation of this component data for serialization or transport.

func (*RemoveSymbolsData) Clone added in v0.13.170

func (removeSymbolsData *RemoveSymbolsData) Clone() IComponentData

Clone creates a shallow copy of RemoveSymbolsData suitable for storing as independent component data on cloned branches.

func (*RemoveSymbolsData) GetValEx added in v0.13.336

func (removeSymbolsData *RemoveSymbolsData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx returns the integer value associated with the provided key for this component data. It supports "CVAvgHeight" to expose the calculated average remove height.

func (*RemoveSymbolsData) OnNewGame added in v0.13.17

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

OnNewGame is called when a new game starts and allows the component data to initialize or reset any per-game state.

type RemoveSymbolsType added in v0.13.305

type RemoveSymbolsType int

RemoveSymbolsType enumerates different removal behaviors supported by the removeSymbols component.

const (
	RSTypeBasic       RemoveSymbolsType = 0
	RSTypeAdjacentPay RemoveSymbolsType = 1
)

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"`
	IgnoreSymbols        []string `yaml:"ignoreSymbols" json:"ignoreSymbols"`
	IgnoreSymbolCodes    []int    `yaml:"-" json:"-"`
}

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) ClearData added in v0.13.593

func (respin *Respin) ClearData(icd IComponentData, bForceNow bool)

ClearData -

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, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

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"`
	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
	LastTriggerNum        int      // 剩余的触发次数,respin有2种模式,一种是直接增加免费次数,一种是累积整体触发次数
	CurTriggerNum         int      // 当前已经触发次数
	Awards                []*Award // 当前已经触发次数
	TriggerRespinNum      []int    // 配合LastTriggerNum用的respin次数,-1表示用当前的RetriggerAddRespinNum,否则就是具体值
	// contains filtered or unexported fields
}

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

ChgConfigIntVal -

func (*RespinData) Clone added in v0.13.170

func (respinData *RespinData) Clone() IComponentData

Clone

func (*RespinData) GetCurRespinNum added in v0.13.578

func (respinData *RespinData) GetCurRespinNum() int

GetCurRespinNum -

func (*RespinData) GetLastRespinNum added in v0.13.39

func (respinData *RespinData) GetLastRespinNum() int

GetLastRespinNum -

func (*RespinData) GetValEx added in v0.13.336

func (respinData *RespinData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

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) ResetRespinTimes added in v0.13.286

func (respinData *RespinData) ResetRespinTimes(num int)

ResetRespinTimes -

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 RngData added in v0.13.433

type RngData struct {
	Script string         `yaml:"script"`
	FO2    *ForceOutcome2 `yaml:"-"`
}

type RngLib added in v0.13.433

type RngLib struct {
	MapRNGs map[string]*RngData `yaml:"rngs"`
	// contains filtered or unexported fields
}

func LoadRngLib added in v0.13.433

func LoadRngLib(fn string) (*RngLib, error)

type RollNumber added in v0.13.197

type RollNumber struct {
	*BasicComponent `json:"-"`
	Config          *RollNumberConfig `json:"config"`
}

func (*RollNumber) Init added in v0.13.197

func (rollNumber *RollNumber) Init(fn string, pool *GamePropertyPool) error

Init -

func (*RollNumber) InitEx added in v0.13.197

func (rollNumber *RollNumber) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*RollNumber) NewComponentData added in v0.13.197

func (rollNumber *RollNumber) NewComponentData() IComponentData

NewComponentData -

func (*RollNumber) NewStats2 added in v0.13.391

func (rollNumber *RollNumber) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*RollNumber) OnAsciiGame added in v0.13.197

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

OnAsciiGame - outpur to asciigame

func (*RollNumber) OnPlayGame added in v0.13.197

func (rollNumber *RollNumber) 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 (*RollNumber) OnStats2 added in v0.13.391

func (rollNumber *RollNumber) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

func (*RollNumber) ProcControllers added in v0.13.376

func (rollNumber *RollNumber) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type RollNumberConfig added in v0.13.197

type RollNumberConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Weight               string                `yaml:"weight" json:"weight"`
	WeightVW             *sgc7game.ValWeights2 `json:"-"`
	Awards               []*Award              `yaml:"awards" json:"awards"`             // 新的奖励系统
	MapValAwards         map[int][]*Award      `yaml:"mapValAwards" json:"mapValAwards"` // 新的奖励系统
	ForceVal             int                   `yaml:"forceVal" json:"forceVal"`
}

RollNumberConfig - configuration for RollNumber

func (*RollNumberConfig) SetLinkComponent added in v0.13.197

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

SetLinkComponent

type RollNumberData added in v0.13.197

type RollNumberData struct {
	BasicComponentData
	Number int
}

func (*RollNumberData) BuildPBComponentData added in v0.13.197

func (rollNumberData *RollNumberData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*RollNumberData) ChgConfigIntVal added in v0.13.376

func (rollNumberData *RollNumberData) ChgConfigIntVal(key string, off int) int

ChgConfigIntVal -

func (*RollNumberData) Clone added in v0.13.197

func (rollNumberData *RollNumberData) Clone() IComponentData

Clone

func (*RollNumberData) GetOutput added in v0.13.381

func (rollNumberData *RollNumberData) GetOutput() int

GetOutput -

func (*RollNumberData) GetValEx added in v0.13.336

func (rollNumberData *RollNumberData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*RollNumberData) OnNewGame added in v0.13.197

func (rollNumberData *RollNumberData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

func (*RollNumberData) SetConfigIntVal added in v0.13.376

func (rollNumberData *RollNumberData) SetConfigIntVal(key string, val int)

SetConfigIntVal - CCVValueNum的set和chg逻辑不太一样,等于的时候不会触发任何的 controllers

type RollSymbol added in v0.13.17

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

RollSymbol is the runtime component implementation. It composes BasicComponent for common behavior and holds a typed Config pointer.

func (*RollSymbol) Init added in v0.13.17

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

Init loads the component configuration from a YAML file and calls InitEx with the parsed configuration. The filename should be the path to a YAML file describing RollSymbolConfig.

func (*RollSymbol) InitEx added in v0.13.17

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

InitEx initializes the RollSymbol from an already-parsed config object (typically produced by parsing YAML/JSON). It validates the cfg type, loads weight resources, and performs any additional configuration initialization.

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 outputs the component runtime result to the ASCII game printer (useful for debugging / CLI visualization). It prints the list of generated symbol names using the default paytable mapping.

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)

OnPlayGame is the core execution method invoked when the component should produce symbol rolls for a single play. It populates RollSymbolData.SymbolCodes and optionally registers generated symbols into a target collection for other components to consume.

type RollSymbolConfig added in v0.13.17

type RollSymbolConfig struct {
	// BasicComponentConfig contains common config fields such as Name
	// and link information used by BasicComponent logic.
	BasicComponentConfig `yaml:",inline" json:",inline"`

	// SymbolNum is the default number of symbols to roll/generate.
	SymbolNum int `yaml:"symbolNum" json:"symbolNum"`

	// SymbolNumComponent optionally points to another component whose
	// output overrides SymbolNum at runtime.
	SymbolNumComponent string `json:"symbolNumComponent"`

	// Weight identifies the symbol weight resource used to randomly
	// choose symbols (referencing a ValWeights2 configuration).
	Weight string `yaml:"weight" json:"weight"`
	// WeightVW is the loaded weight data (populated in InitEx).
	WeightVW *sgc7game.ValWeights2 `json:"-"`

	// SrcSymbolCollection allows limiting weights to symbols present
	// in a given collection at runtime.
	SrcSymbolCollection string `yaml:"srcSymbolCollection" json:"srcSymbolCollection"`

	// IgnoreSymbolCollection lists symbols to exclude from the weight
	// selection.
	IgnoreSymbolCollection string `yaml:"ignoreSymbolCollection" json:"ignoreSymbolCollection"`

	// TargetSymbolCollection, if set, receives the generated symbols
	// so other components can use them.
	TargetSymbolCollection string `yaml:"targetSymbolCollection" json:"targetSymbolCollection"`
}

RollSymbolConfig defines the static configuration for a RollSymbol component. Fields are populated from YAML/JSON configuration and consumed during InitEx and OnPlayGame.

func (*RollSymbolConfig) SetLinkComponent added in v0.13.39

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

SetLinkComponent SetLinkComponent sets linked component names (currently only "next" is supported and is stored in DefaultNextComponent).

type RollSymbolData added in v0.13.17

type RollSymbolData struct {
	BasicComponentData
	// SymbolCodes is the sequence of symbol integer codes produced
	// by the component during OnPlayGame.
	SymbolCodes []int
}

RollSymbolData holds the runtime data for a RollSymbol component. It embeds BasicComponentData to inherit common component state and includes the list of generated SymbolCodes for the current play.

func (*RollSymbolData) BuildPBComponentData added in v0.13.17

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

BuildPBComponentData converts runtime data into the protobuf representation used for serialization or inter-service communication.

func (*RollSymbolData) Clone added in v0.13.170

func (rollSymbolData *RollSymbolData) Clone() IComponentData

Clone creates a deep copy of RollSymbolData. It is used when the component system needs a fresh copy of component data (for example between parallel plays or for snapshotting state).

func (*RollSymbolData) GetValEx added in v0.13.336

func (rollSymbolData *RollSymbolData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx returns extended integer values for this component data identified by key. RollSymbol currently does not expose any extended values, so it returns false.

func (*RollSymbolData) OnNewGame added in v0.13.17

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

OnNewGame resets or initializes runtime data when a new game starts. It forwards to the embedded BasicComponentData.OnNewGame implementation.

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 SPGridStack added in v0.13.706

type SPGridStack struct {
	Width  int
	Height int
	Stack  *SceneStack
}

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, icd IComponentData) (bool, []*sgc7game.Result)

CanTriggerWithScene -

func (*ScatterTrigger) GetAllLinkComponents added in v0.13.39

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

GetAllLinkComponents - get all link components

func (*ScatterTrigger) GetHeight added in v0.13.344

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

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, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

func (*ScatterTrigger) ProcControllers added in v0.13.376

func (scatterTrigger *ScatterTrigger) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

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 时生效
	MaxNum                          int                           `yaml:"maxNum" json:"maxNum"`                         // 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
	Height                          int                           `yaml:"Height" json:"Height"`                         // Height
	MaxHeight                       int                           `yaml:"MaxHeight" json:"MaxHeight"`                   // MaxHeight
	IsReversalHeight                bool                          `yaml:"isReversalHeight" json:"isReversalHeight"`     // isReversalHeight
	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"`                         // 新的奖励系统
	TargetMask                      string                        `yaml:"targetMask" json:"targetMask"`                 // 如果是scatter这一组判断,可以把结果传递给一个mask
	OutputToComponent               string                        `yaml:"outputToComponent" json:"outputToComponent"`   // 将结果给到一个 positionCollection
	ReelsCollector                  string                        `yaml:"reelsCollector" json:"reelsCollector"`
	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
	MapAwards                       map[int][]*Award              `yaml:"mapAwards" json:"mapAwards"`                                         // 新的奖励系统
	SetWinSymbols                   []string                      `yaml:"setWinSymbols" json:"setWinSymbols"`
}

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
	SymbolCodes   []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) GetSymbolCodes added in v0.13.596

func (scatterTriggerData *ScatterTriggerData) GetSymbolCodes() []int

func (*ScatterTriggerData) GetValEx added in v0.13.336

func (scatterTriggerData *ScatterTriggerData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*ScatterTriggerData) OnNewGame added in v0.12.264

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

OnNewGame -

func (*ScatterTriggerData) SetSymbolCodes added in v0.13.596

func (scatterTriggerData *ScatterTriggerData) SetSymbolCodes(symbolCodes []int)

type SceneStack added in v0.12.272

type SceneStack struct {
	Scenes       []*SceneStackData
	IsOtherScene bool
}

SceneStack holds a slice of SceneStackData and a flag indicating whether this stack is used for "other scenes" (IsOtherScene=true) or the main scenes. Many helper methods may push/pop or restore scenes from cached PlayResult values when the stack is temporarily empty.

func NewSceneStack added in v0.12.272

func NewSceneStack(isOtherScene bool) *SceneStack

NewSceneStack constructs a SceneStack. Pass isOtherScene=true to create a stack that operates on OtherScenes (used for auxiliary scene types).

func (*SceneStack) GetPreTopScene added in v0.13.419

func (stack *SceneStack) GetPreTopScene(curpr *sgc7game.PlayResult, prs []*sgc7game.PlayResult) *SceneStackData

GetPreTopScene returns the scene just below the top. If the stack has at least two entries, it returns the second-from-top element. If the stack has exactly one entry and prs is provided, it inserts a pre-scene from the last PlayResult (with the same side-effects as GetTopScene) so the pre-top becomes available. Returns nil if no pre-top scene can be determined.

func (*SceneStack) GetPreTopSceneEx added in v0.13.419

func (stack *SceneStack) GetPreTopSceneEx(curpr *sgc7game.PlayResult, prs []*sgc7game.PlayResult) *sgc7game.GameScene

GetPreTopSceneEx is like GetPreTopScene but returns the GameScene instance directly.

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

GetTargetScene3 searches the stack from top to bottom for the first component whose name appears in the configured target lists in BasicComponentConfig (TargetScenes3 or TargetOtherScenes3 depending on IsOtherScene). If none match, it falls back to the current top scene (restoring from prs if needed) and returns that scene's GameScene.

func (*SceneStack) GetTopSPGridEx added in v0.13.711

func (stack *SceneStack) GetTopSPGridEx(spgrid string, 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

GetTopScene returns the top SceneStackData. If the stack is empty, it attempts to restore a scene from the last entry in prs and pushes that scene onto the stack. In that restoration path, it also appends the restored scene into curpr.Scenes or curpr.OtherScenes (side-effect). Returns nil if neither the stack nor prs provides a scene.

func (*SceneStack) GetTopSceneEx added in v0.13.419

func (stack *SceneStack) GetTopSceneEx(curpr *sgc7game.PlayResult, prs []*sgc7game.PlayResult) *sgc7game.GameScene

GetTopSceneEx is like GetTopScene but returns the GameScene instance directly. It shares the same restoration side-effects when the stack is empty.

func (*SceneStack) Has added in v0.12.272

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

Has reports whether a scene with the given component name exists in the stack. Comparison is by exact string equality of the Component field.

func (*SceneStack) InsertPreScene added in v0.13.419

func (stack *SceneStack) InsertPreScene(scene string, gs *sgc7game.GameScene)

InsertPreScene inserts a SceneStackData just before the current top of the stack. If the stack has N elements, the new element will be placed at index N-1 (i.e., immediately below the top). Note: calling this when the stack is empty will cause an index error; callers should ensure the stack length if necessary.

func (*SceneStack) Pop added in v0.12.272

func (stack *SceneStack) Pop() *SceneStackData

Pop removes and returns the top SceneStackData. Returns nil if the stack is empty.

func (*SceneStack) PopTo added in v0.12.272

func (stack *SceneStack) PopTo(scene string)

PopTo truncates the stack so that the top becomes the first occurrence of the provided component name (searching from the top down). If the component is not found, the stack remains unchanged.

func (*SceneStack) Push added in v0.12.272

func (stack *SceneStack) Push(scene string, gs *sgc7game.GameScene)

Push pushes a new SceneStackData onto the stack. 'scene' is the component name associated with the GameScene 'gs'.

func (*SceneStack) TruncateTo added in v0.13.663

func (stack *SceneStack) TruncateTo(num int)

TruncateTo reduces the stack to at most 'num' entries. If num <= 0 the stack is cleared. If num >= current length, no-op.

type SceneStackData added in v0.12.272

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

SceneStackData pairs a component name (or placeholder) with a GameScene instance. Component is the logical owner/identifier of the scene; Scene holds the concrete scene data.

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 SimpleRNG added in v0.13.235

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

func (*SimpleRNG) Clone added in v0.13.235

func (rng *SimpleRNG) Clone() IRNG

func (*SimpleRNG) GetCurRNG added in v0.13.235

func (rng *SimpleRNG) GetCurRNG(curBetMode int, gameProp *GameProperty, curComponent IComponent, cd IComponentData, fl IFeatureLevel) (bool, int, sgc7plugin.IPlugin, string)

GetCurRNG -

func (*SimpleRNG) IsIterateEnding added in v0.13.235

func (rng *SimpleRNG) IsIterateEnding() bool

func (*SimpleRNG) IsNeedIterate added in v0.13.235

func (rng *SimpleRNG) IsNeedIterate() bool

func (*SimpleRNG) OnChoiceBranch added in v0.13.277

func (rng *SimpleRNG) OnChoiceBranch(curBetMode int, curComponent IComponent, branchName string) error

OnChoiceBranch -

func (*SimpleRNG) OnNewGame added in v0.13.235

func (rng *SimpleRNG) OnNewGame(curBetMode int, plugin sgc7plugin.IPlugin) error

OnNewGame -

func (*SimpleRNG) OnStepEnd added in v0.13.322

func (rng *SimpleRNG) OnStepEnd(curBetMode int, gp *GameParams, pr *sgc7game.PlayResult, prs []*sgc7game.PlayResult) error

OnStepEnd -

type StringValMapping added in v0.13.743

type StringValMapping struct {
	*BasicComponent `json:"-"`
	Config          *StringValMappingConfig `json:"config"`
}

func (*StringValMapping) Init added in v0.13.743

func (svm *StringValMapping) Init(fn string, pool *GamePropertyPool) error

Init - read yaml configuration file

func (*StringValMapping) InitEx added in v0.13.743

func (svm *StringValMapping) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - init with parsed config

func (*StringValMapping) NewComponentData added in v0.13.743

func (svm *StringValMapping) NewComponentData() IComponentData

NewComponentData -

func (*StringValMapping) OnAsciiGame added in v0.13.743

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

OnAsciiGame - show info

func (*StringValMapping) OnPlayGame added in v0.13.743

func (svm *StringValMapping) 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)

OnPlayGame - placeholder: maps input int -> string and set StrOutput

func (*StringValMapping) ProcControllers added in v0.13.743

func (svm *StringValMapping) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type StringValMappingConfig added in v0.13.743

type StringValMappingConfig 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"`
	Controllers          []*Award              `yaml:"controllers" json:"controllers"` // 新的奖励系统
}

StringValMappingConfig placeholder for mapping int -> string

func (*StringValMappingConfig) SetLinkComponent added in v0.13.743

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

SetLinkComponent - set only "next" support

type StringValMappingData added in v0.13.743

type StringValMappingData struct {
	BasicComponentData
	// contains filtered or unexported fields
}

func (*StringValMappingData) BuildPBComponentData added in v0.13.743

func (svmd *StringValMappingData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*StringValMappingData) ChgConfigIntVal added in v0.13.743

func (svmd *StringValMappingData) ChgConfigIntVal(key string, off int) int

ChgConfigIntVal -

func (*StringValMappingData) Clone added in v0.13.743

func (svmd *StringValMappingData) Clone() IComponentData

Clone

func (*StringValMappingData) OnNewGame added in v0.13.743

func (svmd *StringValMappingData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type SumSymbolVals added in v0.13.447

type SumSymbolVals struct {
	*BasicComponent `json:"-"`
	Config          *SumSymbolValsConfig `json:"config"`
}

SumSymbolVals is a component that sums symbol values from a scene according to a configured predicate. The result is stored in SumSymbolValsData.Number and can be used by downstream components.

func (*SumSymbolVals) Init added in v0.13.447

func (sumSymbolVals *SumSymbolVals) Init(fn string, pool *GamePropertyPool) error

Init loads configuration from a YAML file and delegates to InitEx.

func (*SumSymbolVals) InitEx added in v0.13.447

func (sumSymbolVals *SumSymbolVals) InitEx(cfg any, pool *GamePropertyPool) error

InitEx initializes the component from an already-unmarshaled config object. This method performs type assertion and sets up internal fields such as parsed Type and initializes any Awards.

func (*SumSymbolVals) NewComponentData added in v0.13.451

func (sumSymbolVals *SumSymbolVals) NewComponentData() IComponentData

NewComponentData -

func (*SumSymbolVals) OnAsciiGame added in v0.13.447

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

OnAsciiGame - outpur to asciigame

func (*SumSymbolVals) OnPlayGame added in v0.13.447

func (sumSymbolVals *SumSymbolVals) 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 (*SumSymbolVals) ProcControllers added in v0.13.482

func (sumSymbolVals *SumSymbolVals) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

ProcControllers triggers any configured awards/controllers after the component has evaluated. It delegates to gameProp.procAwards if awards are present in configuration.

type SumSymbolValsConfig added in v0.13.447

type SumSymbolValsConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string            `yaml:"type" json:"type"`
	Type                 SumSymbolValsType `yaml:"-" json:"-"`
	Value                int               `yaml:"value" json:"value"`
	Min                  int               `yaml:"min" json:"min"`
	Max                  int               `yaml:"max" json:"max"`
	SourceComponent      string            `yaml:"sourceComponent" json:"sourceComponent"`
	Awards               []*Award          `yaml:"awards" json:"awards"` // 新的奖励系统
}

SumSymbolValsConfig is the YAML/JSON configuration structure for a SumSymbolVals component. It includes the comparison type (StrType), numeric parameters (Value, Min, Max), the source component name to read positions from, and optional awards to trigger when evaluated.

func (*SumSymbolValsConfig) SetLinkComponent added in v0.13.447

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

SetLinkComponent implements BasicComponentConfig's link wiring helper. Currently SumSymbolVals supports linking the "next" component which sets DefaultNextComponent used by the framework.

type SumSymbolValsData added in v0.13.447

type SumSymbolValsData struct {
	BasicComponentData
	Number int
}

SumSymbolValsData holds runtime data for a SumSymbolVals component. It embeds BasicComponentData and stores the computed Number (the sum).

func (*SumSymbolValsData) BuildPBComponentData added in v0.13.447

func (sumSymbolValsData *SumSymbolValsData) BuildPBComponentData() proto.Message

BuildPBComponentData converts the component data into its protobuf representation for serialization across the system.

func (*SumSymbolValsData) Clone added in v0.13.447

func (sumSymbolValsData *SumSymbolValsData) Clone() IComponentData

Clone creates a deep copy of SumSymbolValsData for use in new play result contexts. This is required by the component framework to keep component data isolated between plays.

func (*SumSymbolValsData) GetOutput added in v0.13.447

func (rollNumberData *SumSymbolValsData) GetOutput() int

GetOutput returns the numeric output value for ascii or other renderers.

func (*SumSymbolValsData) GetValEx added in v0.13.447

func (sumSymbolValsData *SumSymbolValsData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx returns named integer outputs exposed by this component's data. Supported keys are CVNumber and CVOutputInt, both returning the computed Number (sum) value. The boolean indicates whether the key was handled.

func (*SumSymbolValsData) OnNewGame added in v0.13.447

func (sumSymbolValsData *SumSymbolValsData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame implements the IComponentData lifecycle hook. It forwards to BasicComponentData.OnNewGame to initialize embedded fields.

type SumSymbolValsType added in v0.13.447

type SumSymbolValsType int

SumSymbolValsType represents the comparison type used when deciding whether a symbol value should be counted in the sum. It covers equality, inequality and range membership forms.

const (
	SSVTypeNone       SumSymbolValsType = 0 // none
	SSVTypeEqu        SumSymbolValsType = 1 // ==
	SSVTypeGreaterEqu SumSymbolValsType = 2 // >=
	SSVTypeLessEqu    SumSymbolValsType = 3 // <=
	SSVTypeGreater    SumSymbolValsType = 4 // >
	SSVTypeLess       SumSymbolValsType = 5 // <
	SSVTypeInAreaLR   SumSymbolValsType = 6 // In [min, max]
	SSVTypeInAreaR    SumSymbolValsType = 7 // In (min, max]
	SSVTypeInAreaL    SumSymbolValsType = 8 // In [min, max)
	SSVTypeInArea     SumSymbolValsType = 9 // In (min, max)
)

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, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

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) AddSymbolCodes added in v0.13.735

func (symbolCollection2Data *SymbolCollection2Data) AddSymbolCodes(symbolCodes []int)

func (*SymbolCollection2Data) BuildPBComponentData added in v0.13.21

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

BuildPBComponentData

func (*SymbolCollection2Data) ClearSymbolCodes added in v0.13.735

func (symbolCollection2Data *SymbolCollection2Data) ClearSymbolCodes()

func (*SymbolCollection2Data) Clone added in v0.13.170

func (symbolCollection2Data *SymbolCollection2Data) Clone() IComponentData

Clone

func (*SymbolCollection2Data) GetSymbolCodes added in v0.13.732

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

GetSymbolCodes -

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 -

func (*SymbolCollection2Data) SetSymbolCodes added in v0.13.735

func (symbolCollection2Data *SymbolCollection2Data) SetSymbolCodes(symbolCodes []int)

type SymbolExpander added in v0.13.644

type SymbolExpander struct {
	*BasicComponent `json:"-"`
	Config          *SymbolExpanderConfig `json:"config"`
}

SymbolExpander is a lowcode component that expands specific symbols along a column (reel) in a scene. When expansion happens it may trigger configured controllers (MapAwards) and optionally jump to another component.

func (*SymbolExpander) Init added in v0.13.644

func (se *SymbolExpander) Init(fn string, pool *GamePropertyPool) error

Init loads YAML configuration from a file and delegates to InitEx. The configuration file is expected to match SymbolExpanderConfig.

func (*SymbolExpander) InitEx added in v0.13.644

func (se *SymbolExpander) InitEx(cfg any, pool *GamePropertyPool) error

InitEx initializes the SymbolExpander from an already-unmarshaled config object. It performs the following steps:

  • asserts cfg is a *SymbolExpanderConfig
  • validates the provided GamePropertyPool and paytables
  • converts Symbol/IgnoreSymbol names to internal integer codes
  • initializes award controllers if present

Returns an error when configuration or pool data is invalid.

func (*SymbolExpander) OnAsciiGame added in v0.13.644

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

OnAsciiGame outputs an ASCII representation of the scene after the expander runs. Only the first used scene in component data is printed. This is primarily a debugging helper and will silently return if the provided component data is of an unexpected type.

func (*SymbolExpander) OnPlayGame added in v0.13.644

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

OnPlayGame performs the expansion logic on the target scene.

Behavior summary:

  • finds the target scene via GetTargetScene3
  • for each column (axis) checks if the column contains any expandable symbol codes (SymbolCodes)
  • determines the first row (starty) from top that is neither expandable nor ignored; from that row downwards replaces symbols with the expandable symbol code (sc)
  • clones the scene lazily (only when a change is required)
  • records which symbol cores were expanded and triggers controllers
  • adds the new scene to PlayResult and returns the next component to run

func (*SymbolExpander) ProcControllers added in v0.13.644

func (se *SymbolExpander) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, pr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

ProcControllers executes controllers configured for the provided string value (strVal). It looks up awards in the component's MapAwards and calls gameProp.procAwards to apply them.

type SymbolExpanderConfig added in v0.13.644

type SymbolExpanderConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	Symbols              []string            `yaml:"symbols" json:"symbols"`
	SymbolCodes          []int               `yaml:"-" json:"-"`
	IgnoreSymbols        []string            `yaml:"ignoreSymbols" json:"ignoreSymbols"`
	IgnoreSymbolCodes    []int               `yaml:"-" json:"-"`
	JumpToComponent      string              `yaml:"jumpToComponent" json:"jumpToComponent"` // jump to
	MapAwards            map[string][]*Award `yaml:"controllers" json:"controllers"`
}

SymbolExpanderConfig holds configuration for the SymbolExpander component.

Fields populated from YAML/JSON:

  • Symbols: list of symbol names that should be treated as "expandable".
  • IgnoreSymbols: list of symbol names that should be ignored when deciding expansion boundaries. Typically a superset of Symbols is acceptable.

Internal fields (SymbolCodes, IgnoreSymbolCodes) are filled during InitEx by mapping symbol names to integer codes from the game's paytables.

func (*SymbolExpanderConfig) SetLinkComponent added in v0.13.644

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

SetLinkComponent SetLinkComponent implements BasicComponentConfig style linking for SymbolExpanderConfig. Supported links are:

  • "next": set DefaultNextComponent
  • "jump": set JumpToComponent

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

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来判断是否可以中奖
	STTypeCountScatterReels  SymbolTriggerType = 10 // scatter中奖判断,且一轴上只算1个scatter,不读paytable
	STTypeAdjacentPay        SymbolTriggerType = 11 // adjacentPay,且读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 (svw *SymbolValWins) GetWinMulti(basicCD *BasicComponentData) int

GetWinMulti returns the effective multiplier to apply to coin values. It first consults runtime overrides in BasicComponentData, and falls back to the configured WinMulti.

func (*SymbolValWins) Init

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

Init reads YAML config from file and initializes the component. It unmarshals into SymbolValWinsConfig and delegates to InitEx.

func (*SymbolValWins) InitEx added in v0.12.33

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

InitEx initializes the component from an already-parsed config object. It resolves symbol names to codes using the provided GamePropertyPool and performs basic validation.

func (*SymbolValWins) NewComponentData added in v0.12.250

func (svw *SymbolValWins) NewComponentData() IComponentData

NewComponentData - NewComponentData creates a fresh SymbolValWinsData instance for use by the runtime when a new player/session/component instance is created.

func (*SymbolValWins) NewStats2 added in v0.13.103

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

NewStats2 - NewStats2 builds a stats2.Feature that describes which metrics this component will emit. It returns a feature that reports wins and an integer value (used for win multipliers).

func (*SymbolValWins) OnAsciiGame

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

OnAsciiGame - outpur to asciigame

func (*SymbolValWins) OnPlayGame

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

OnPlayGame executes the component logic for a single play step. Behavior summary:

  • locate the target scene (gs) and other scene (os)
  • depending on Type (normal/collector/reelcollector) determine multiplier and collector positions
  • scan the other scene for coin values (optionally filtered by coin symbols)
  • if any values found, create RTCoins results (one per multiplier) with appropriate Pos, CoinWin and CashWin and add them to PlayResult

It returns the next component name and an error (ErrComponentDoNothing if nothing was produced).

func (*SymbolValWins) OnStats2 added in v0.13.103

func (svw *SymbolValWins) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

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             `yaml:"-" json:"-"`               //
	StrType              string            `yaml:"type" json:"type"`
	Type                 SymbolValWinsType `yaml:"-" json:"-"`
	CoinSymbols          []string          `yaml:"coinSymbols" json:"coinSymbols"` // coin symbols
	CoinSymbolCodes      []int             `yaml:"-" json:"-"`                     // coin symbols
}

SymbolValWinsConfig describes the YAML/JSON configuration for a SymbolValWins component. It embeds BasicComponentConfig and adds fields to select symbol sets, coin symbols and behavior type.

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 is the count of symbol positions that contributed value
	SymbolNum int
	// Wins is the total coin value accumulated by this component
	Wins int
}

SymbolValWinsData stores runtime state for a SymbolValWins component. It extends BasicComponentData and records the number of collected symbols and the total coin wins produced by the component during a step/session.

func (*SymbolValWinsData) BuildPBComponentData added in v0.12.250

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

BuildPBComponentData serializes runtime data into the protobuf message used for debugging or telemetry. The returned message is of type sgc7pb.SymbolValWinsData and includes base component data as well as SymbolNum and Wins.

func (*SymbolValWinsData) Clone added in v0.13.170

func (symbolValWinsData *SymbolValWinsData) Clone() IComponentData

Clone produces a deep-ish copy of the component data. It clones the embedded BasicComponentData and copies primitive fields.

func (*SymbolValWinsData) GetValEx added in v0.13.336

func (symbolValWinsData *SymbolValWinsData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx returns extra integer values from the component data by key. Supported keys:

  • SVWDVSymbolNum -> number of contributing symbols
  • SVWDVWins -> total coin wins produced
  • CVResultNum, CVWinResultNum -> number of used results

func (*SymbolValWinsData) OnNewGame added in v0.12.250

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

OnNewGame is called when a new game session starts. It forwards to BasicComponentData.OnNewGame to initialize base fields.

type SymbolValWinsType added in v0.13.89

type SymbolValWinsType int

SymbolValWinsType enumerates the variant types for SymbolValWins behavior. It controls how collector symbols are interpreted when computing wins.

type SymbolValsSP added in v0.13.597

type SymbolValsSP struct {
	*BasicComponent `json:"-"`
	Config          *SymbolValsSPConfig `json:"config"`
}

SymbolValsSP is a component that inspects the main GameScene and a corresponding OtherScene to implement "multi" and "collect" mechanics. It produces modified scenes/other-scenes and records positional information in SymbolValsSPData.

func (*SymbolValsSP) Init added in v0.13.597

func (symbolValsSP *SymbolValsSP) Init(fn string, pool *GamePropertyPool) error

Init - Init reads a YAML file at fn and unmarshals it into the component configuration then delegates to InitEx.

func (*SymbolValsSP) InitEx added in v0.13.597

func (symbolValsSP *SymbolValsSP) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - InitEx initializes the component from an already-unmarshaled config object. It resolves symbol names to symbol codes using pool.DefaultPaytables and validates required fields.

func (*SymbolValsSP) NewComponentData added in v0.13.597

func (symbolValsSP *SymbolValsSP) NewComponentData() IComponentData

NewComponentData returns a fresh SymbolValsSPData instance for use in a new play. This satisfies the component factory contract.

func (*SymbolValsSP) OnAsciiGame added in v0.13.597

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

OnAsciiGame outputs the scene and other-scene modified by this component to the ASCII game output for debugging/visualization. It uses indices recorded in SymbolValsSPData. This method is best effort and returns nil when there is nothing to output.

func (*SymbolValsSP) OnPlayGame added in v0.13.597

func (symbolValsSP *SymbolValsSP) 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 OnPlayGame is the main entry point invoked during a play. It expects icd to be a *SymbolValsSPData. It reads the current Scene and OtherScene from gameProp stacks, runs procNormal, triggers configured controllers and finalizes the step. If no multi or collect is triggered, it will return ErrComponentDoNothing.

func (*SymbolValsSP) ProcControllers added in v0.13.597

func (symbolValsSP *SymbolValsSP) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

ProcControllers executes award controllers registered under the provided label (strVal). This allows configuration to trigger custom award logic on <trigger>/<multi>/<collect> events.

type SymbolValsSPCollectType added in v0.13.600

type SymbolValsSPCollectType int

SymbolValsSPCollectType defines the collect behavior used when collect symbols are present. Sequence means only the first collect position is used; normal will use all collect positions.

const (
	SVSPCollectTypeNormal   SymbolValsSPCollectType = 0 // normal
	SVSPCollectTypeSequence SymbolValsSPCollectType = 1 // sequence
)

type SymbolValsSPConfig added in v0.13.597

type SymbolValsSPConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string           `yaml:"type" json:"type"`
	Type                 SymbolValsSPType `yaml:"-" json:"-"`
	// CoinSymbols are the symbols considered "coin" in the OtherScene.
	CoinSymbols     []string `yaml:"coinSymbols" json:"coinSymbols"`
	CoinSymbolCodes []int    `yaml:"-" json:"-"`
	// MultiSymbols are symbols that produce multiplier effects using
	// values from OtherScene.
	MultiSymbols          []string              `yaml:"multiSymbols" json:"multiSymbols"`
	MultiSymbolCodes      []int                 `yaml:"-" json:"-"`
	StrMultiType          string                `yaml:"multiType" json:"multiType"`
	MultiType             SymbolValsSPMultiType `yaml:"-" json:"-"`
	MultiTargetSymbol     string                `yaml:"multiTargetSymbol" json:"multiTargetSymbol"`
	MultiTargetSymbolCode int                   `yaml:"-" json:"-"`
	// CollectSymbols are symbols that will collect coin values into
	// a target position when present.
	CollectSymbols          []string                `yaml:"collectSymbols" json:"collectSymbols"`
	CollectSymbolCodes      []int                   `yaml:"-" json:"-"`
	CollectTargetSymbol     string                  `yaml:"collectTargetSymbol" json:"collectTargetSymbol"`
	CollectTargetSymbolCode int                     `yaml:"-" json:"-"`
	CollectCoinSymbol       string                  `yaml:"collectCoinSymbol" json:"collectCoinSymbol"`
	CollectCoinSymbolCode   int                     `yaml:"-" json:"-"`
	CollectMultiSymbol      string                  `yaml:"collectMultiSymbol" json:"collectMultiSymbol"`
	CollectMultiSymbolCode  int                     `yaml:"-" json:"-"`
	StrCollectType          string                  `yaml:"collectType" json:"collectType"`
	CollectType             SymbolValsSPCollectType `yaml:"-" json:"-"`
	// MapAwards maps controller labels to award lists executed on triggers
	// like <trigger>, <multi>, <collect>.
	MapAwards map[string][]*Award `yaml:"controllers" json:"controllers"`
}

SymbolValsSPConfig - configuration for SymbolValsSP SymbolValsSPConfig is the YAML/JSON-backed configuration for the SymbolValsSP component. Human friendly fields (strings, symbol names) are provided and later resolved to integer symbol codes during InitEx (stored in fields with Code suffix).

func (*SymbolValsSPConfig) SetLinkComponent added in v0.13.597

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

SetLinkComponent SetLinkComponent sets named link components. Currently supports "next" to set the default next component name in the chain.

type SymbolValsSPData added in v0.13.597

type SymbolValsSPData struct {
	BasicComponentData
	// Pos stores positions in the form [x,y, x,y, -1, x,y,...]. -1 is a
	// separator inserted by newLine when a logical group changes (for
	// example between multi and collect results).
	Pos []int
	// UsedScenes and UsedOtherScenes store indices into PlayResult Scenes
	// and OtherScenes that were added during processing. They are used
	// by OnAsciiGame for display. -1 separators may appear in these slices.
	UsedScenes           []int // 使用的场景, -1分隔
	MultiSymbolNum       int   // number of multi symbols detected
	MultiCoinSymbolNum   int   // number of coin symbols affected by multi
	Multi                int   // computed multiplier value
	CollectSymbolNum     int   // number of collect symbols detected
	CollectCoinSymbolNum int   // number of coin symbols collected
	CollectCoin          int   // total coin amount collected
}

SymbolValsSPData holds per-play state for the SymbolValsSP component. It tracks positions (Pos), scenes used, and counters produced by the multi and collect processing so later components or output can access the produced values.

func (*SymbolValsSPData) AddPos added in v0.13.597

func (symbolValsSPData *SymbolValsSPData) AddPos(x int, y int)

AddPos -

func (*SymbolValsSPData) AddPosEx added in v0.13.597

func (symbolValsSPData *SymbolValsSPData) AddPosEx(x int, y int)

AddPosEx -

func (*SymbolValsSPData) BuildPBComponentData added in v0.13.597

func (symbolValsSPData *SymbolValsSPData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*SymbolValsSPData) ClearPos added in v0.13.599

func (symbolValsSPData *SymbolValsSPData) ClearPos()

ClearPos -

func (*SymbolValsSPData) Clone added in v0.13.597

func (symbolValsSPData *SymbolValsSPData) Clone() IComponentData

Clone

func (*SymbolValsSPData) GetPos added in v0.13.597

func (symbolValsSPData *SymbolValsSPData) GetPos() []int

GetPos -

func (*SymbolValsSPData) HasPos added in v0.13.597

func (symbolValsSPData *SymbolValsSPData) HasPos(x int, y int) bool

HasPos -

func (*SymbolValsSPData) OnNewGame added in v0.13.597

func (symbolValsSPData *SymbolValsSPData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame - OnNewGame resets per-game state by delegating to BasicComponentData.OnNewGame.

type SymbolValsSPMultiType added in v0.13.597

type SymbolValsSPMultiType int

SymbolValsSPMultiType defines how the multi (multiplier) logic should be processed. Values affect procMulti.

const (
	SVSPMultiTypeNormal SymbolValsSPMultiType = 0 // normal
	SVSPMultiTypeRound  SymbolValsSPMultiType = 1 // round
)

type SymbolValsSPType added in v0.13.597

type SymbolValsSPType int

SymbolValsSPType defines the runtime variant of the SymbolValsSP component. Currently only a normal type is supported. This type is used to switch behavior in OnPlayGame.

const (
	SVSPTypeNormal SymbolValsSPType = 0 // normal
)

type SymbolViewer added in v0.13.650

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

SymbolViewer is a helper for mapping symbol code -> presentation data.

Note: an alias "SymbolsViewer" is provided below for backwards compatibility with code that references the old exported name.

type SymbolViewerData

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

SymbolViewerData holds presentation data for a symbol.

type SymbolsViewer

type SymbolsViewer = SymbolViewer

SymbolsViewer is an alias for SymbolViewer to keep compatibility with existing callers that expect the older name.

func LoadSymbolsViewer

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

LoadSymbolsViewer loads a symbols viewer from an Excel file. Required column:

  • code (int)

Optional columns:

  • symbol, output, color

The header matching is case-insensitive and trimmed.

func NewSymbolViewerFromPaytables added in v0.12.36

func NewSymbolViewerFromPaytables(paytables *sgc7game.PayTables) *SymbolsViewer

NewSymbolViewerFromPaytables builds a SymbolViewer from game PayTables. It uses the symbol string as the default Output and assigns a default color when none is provided.

type TreasureChest added in v0.13.460

type TreasureChest struct {
	*BasicComponent `json:"-"`
	Config          *TreasureChestConfig `json:"config"`
}

func (*TreasureChest) Init added in v0.13.460

func (treasureChest *TreasureChest) Init(fn string, pool *GamePropertyPool) error

Init -

func (*TreasureChest) InitEx added in v0.13.460

func (treasureChest *TreasureChest) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*TreasureChest) NewComponentData added in v0.13.460

func (treasureChest *TreasureChest) NewComponentData() IComponentData

NewComponentData -

func (*TreasureChest) NewStats2 added in v0.13.460

func (treasureChest *TreasureChest) NewStats2(parent string) *stats2.Feature

NewStats2 -

func (*TreasureChest) OnAsciiGame added in v0.13.460

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

OnAsciiGame - outpur to asciigame

func (*TreasureChest) OnPlayGame added in v0.13.460

func (treasureChest *TreasureChest) 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 (*TreasureChest) OnStats2 added in v0.13.460

func (treasureChest *TreasureChest) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

func (*TreasureChest) ProcControllers added in v0.13.468

func (treasureChest *TreasureChest) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type TreasureChestConfig added in v0.13.460

type TreasureChestConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string                `yaml:"type" json:"type"`
	Type                 TreasureChestType     `yaml:"-" json:"-"`
	StrWeight            string                `yaml:"weight" json:"weight"` // weight
	Weight               *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	FragmentNum          int                   `yaml:"fragmentNum" json:"fragmentNum"` // fragmentNum
	OpenNum              int                   `yaml:"openNum" json:"openNum"`
	TotalNum             int                   `yaml:"totalNum" json:"totalNum"`
	MapBranchs           map[int]string        `yaml:"mapBranchs" json:"mapBranchs"`
	MapControllers       map[int][]*Award      `yaml:"mapControllers" json:"mapControllers"`
	Controllers          []*Award              `yaml:"controllers" json:"controllers"`
}

TreasureChestConfig - configuration for TreasureChest

func (*TreasureChestConfig) SetLinkComponent added in v0.13.460

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

SetLinkComponent

type TreasureChestData added in v0.13.460

type TreasureChestData struct {
	BasicComponentData
	Selected []int
}

func (*TreasureChestData) BuildPBComponentData added in v0.13.460

func (treasureChestData *TreasureChestData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*TreasureChestData) Clone added in v0.13.460

func (treasureChestData *TreasureChestData) Clone() IComponentData

Clone

func (*TreasureChestData) GetValEx added in v0.13.475

func (treasureChestData *TreasureChestData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*TreasureChestData) OnNewGame added in v0.13.460

func (treasureChestData *TreasureChestData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type TreasureChestType added in v0.13.460

type TreasureChestType int
const (
	TreasureChestTypeFragmentCollection TreasureChestType = 0
	TreasureChestTypeSumValue           TreasureChestType = 1
)

type TropiCoolExchange added in v0.13.782

type TropiCoolExchange struct {
	*BasicComponent `json:"-"`
	Config          *TropiCoolExchangeConfig `json:"config"`
}

func (*TropiCoolExchange) Init added in v0.13.782

func (gen *TropiCoolExchange) Init(fn string, pool *GamePropertyPool) error

Init - load from file

func (*TropiCoolExchange) InitEx added in v0.13.782

func (gen *TropiCoolExchange) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config object

func (*TropiCoolExchange) NewComponentData added in v0.13.782

func (gen *TropiCoolExchange) NewComponentData() IComponentData

NewComponentData - return base component data

func (*TropiCoolExchange) OnAsciiGame added in v0.13.782

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

OnAsciiGame - output to asciigame (no-op)

func (*TropiCoolExchange) OnPlayGame added in v0.13.782

func (gen *TropiCoolExchange) 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)

OnPlayGame - placeholder: no-op component

type TropiCoolExchangeConfig added in v0.13.782

type TropiCoolExchangeConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	RowSymbol            string                `yaml:"rowSymbol" json:"rowSymbol"`
	RowSymbolCode        int                   `yaml:"-" json:"-"`
	ColSymbol            string                `yaml:"colSymbol" json:"colSymbol"`
	ColSymbolCode        int                   `yaml:"-" json:"-"`
	GenGigaSymbols2      string                `yaml:"genGigaSymbols2" json:"genGigaSymbols2"`
	Weight               string                `yaml:"weight" json:"weight"`
	WeightVW             *sgc7game.ValWeights2 `yaml:"-" json:"-"`
	SymbolCodes          []int                 `yaml:"-" json:"-"`
	WildSymbol           string                `yaml:"wildSymbol" json:"wildSymbol"`
	WildSymbolCode       int                   `yaml:"-" json:"-"`
}

TropiCoolExchangeConfig - placeholder configuration for TropiCoolExchange

func (*TropiCoolExchangeConfig) SetLinkComponent added in v0.13.782

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

SetLinkComponent

type TropiCoolSPBonus added in v0.13.782

type TropiCoolSPBonus struct {
	*BasicComponent `json:"-"`
	Config          *TropiCoolSPBonusConfig `json:"config"`
}

func (*TropiCoolSPBonus) Init added in v0.13.782

func (gen *TropiCoolSPBonus) Init(fn string, pool *GamePropertyPool) error

Init - load from file

func (*TropiCoolSPBonus) InitEx added in v0.13.782

func (gen *TropiCoolSPBonus) InitEx(cfg any, pool *GamePropertyPool) error

InitEx - initialize from config object

func (*TropiCoolSPBonus) NewComponentData added in v0.13.782

func (gen *TropiCoolSPBonus) NewComponentData() IComponentData

NewComponentData - return base component data

func (*TropiCoolSPBonus) OnAsciiGame added in v0.13.782

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

OnAsciiGame - no-op

func (*TropiCoolSPBonus) OnPlayGame added in v0.13.782

func (gen *TropiCoolSPBonus) 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)

OnPlayGame - placeholder: do nothing

type TropiCoolSPBonusConfig added in v0.13.782

type TropiCoolSPBonusConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	SpBonusSymbol        string   `yaml:"spBonusSymbol" json:"spBonusSymbol"`
	SpBonusSymbolCode    int      `yaml:"-" json:"-"`
	SpBonusSymbolCode2   int      `yaml:"-" json:"-"`
	SpSymbols            []string `yaml:"spSymbols" json:"spSymbols"`
	SpSymbolCodes        []int    `yaml:"-" json:"-"`
	GenGigaSymbols2      string   `yaml:"genGigaSymbols2" json:"genGigaSymbols2"`
	HoldSymbols          []string `yaml:"holdSymbols" json:"holdSymbols"`
	HoldSymbolCodes      []int    `yaml:"-" json:"-"`
}

TropiCoolSPBonusConfig - placeholder configuration

func (*TropiCoolSPBonusConfig) SetLinkComponent added in v0.13.782

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

SetLinkComponent

type TropiCoolSPBonusData added in v0.13.782

type TropiCoolSPBonusData struct {
	BasicComponentData
	// contains filtered or unexported fields
}

func (*TropiCoolSPBonusData) BuildPBComponentData added in v0.13.782

func (cd *TropiCoolSPBonusData) BuildPBComponentData() proto.Message

BuildPBComponentData - build protobuf data

func (*TropiCoolSPBonusData) Clone added in v0.13.782

Clone - shallow clone

func (*TropiCoolSPBonusData) OnNewGame added in v0.13.782

func (cd *TropiCoolSPBonusData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame - reset state

type TropiCoolSPData added in v0.13.782

type TropiCoolSPData struct {
	SymbolCode    int
	CurSymbolCode int
	Height        int
	X             int
	Y             int
}

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, icd IComponentData) (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, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

func (*WaysTrigger) ProcControllers added in v0.13.502

func (waysTrigger *WaysTrigger) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

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"`                                               // 新的奖励系统
	TargetMask                      string                        `yaml:"targetMask" json:"targetMask"`                                       // 如果是scatter这一组判断,可以把结果传递给一个mask
	IsReverse                       bool                          `yaml:"isReverse" json:"isReverse"`                                         // 如果isReverse,表示判定为否才触发
	PiggyBankComponent              string                        `yaml:"piggyBankComponent" json:"piggyBankComponent"`                       // piggyBank component
	OutputToComponent               string                        `yaml:"outputToComponent" json:"outputToComponent"`                         // 将结果给到一个 positionCollection
	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
	SetWinSymbols                   []string                      `yaml:"setWinSymbols" json:"setWinSymbols"`
	GenGigaSymbols2                 string                        `yaml:"genGigaSymbols2" json:"genGigaSymbols2"`
	RowMask                         string                        `yaml:"rowMask" json:"rowMask"`
	SpGrid                          string                        `yaml:"spGrid" json:"spGrid"`
	IsWildColMultiAdd               bool                          `yaml:"isWildColMultiAdd" json:"isWildColMultiAdd"`
}

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
	SymbolCodes   []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) GetSymbolCodes added in v0.13.596

func (waysTriggerData *WaysTriggerData) GetSymbolCodes() []int

func (*WaysTriggerData) GetValEx added in v0.13.336

func (waysTriggerData *WaysTriggerData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*WaysTriggerData) OnNewGame added in v0.12.264

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

OnNewGame -

func (*WaysTriggerData) SetSymbolCodes added in v0.13.596

func (waysTriggerData *WaysTriggerData) SetSymbolCodes(symbolCodes []int)

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 returns all branch keys configured for this component. The returned slice is not guaranteed to be in any particular order.

func (*WeightBranch) GetNextLinkComponents added in v0.13.99

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

GetNextLinkComponents returns all next component names referenced by branches. Results may include empty strings for branches without a configured jump.

func (*WeightBranch) Init added in v0.13.17

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

Init initializes the WeightBranch from a YAML file specified by fn. It loads the configuration and delegates to InitEx.

func (*WeightBranch) InitEx added in v0.13.17

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

InitEx initializes the WeightBranch from an already-parsed configuration object. It validates the configuration and loads the referenced weight table into Config.WeightVW.

func (*WeightBranch) NewComponentData added in v0.13.73

func (weightBranch *WeightBranch) NewComponentData() IComponentData

NewComponentData creates a new empty WeightBranchData for runtime use.

func (*WeightBranch) NewStats2 added in v0.13.407

func (weightBranch *WeightBranch) NewStats2(parent string) *stats2.Feature

NewStats2 returns a new stats feature describing this component's statistics.

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 renders debugging/ascii output for this component. It returns an error when icd is not the expected type.

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)

OnPlayGame processes a play through this component. It selects a branch based on configuration, player selection, or forced branch, executes controllers and determines the next component to jump to.

func (*WeightBranch) OnStats2 added in v0.13.407

func (weightBranch *WeightBranch) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2 collects runtime stats for this component into the provided cache.

func (*WeightBranch) ProcControllers added in v0.13.376

func (weightBranch *WeightBranch) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

ProcControllers executes branch-linked controller awards for the given string value.

type WeightBranchConfig added in v0.13.17

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

WeightBranchConfig is the configuration for a WeightBranch component. It specifies the weight table name, optional forced branch, mapping of branches to target components and other behavior such as ForceTriggerOnce.

func (*WeightBranchConfig) SetLinkComponent added in v0.13.70

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

SetLinkComponent SetLinkComponent links a branch key (or "next") to a component name. Use "next" to set the default next component; otherwise the link is treated as a branch value and stored in MapBranchs.

type WeightBranchData added in v0.13.17

type WeightBranchData struct {
	BasicComponentData
	Value          string
	WeightVW       *sgc7game.ValWeights2
	IgnoreBranches []string
}

WeightBranchData represents runtime state for a WeightBranch component. It embeds BasicComponentData and stores the currently selected branch value, an optional per-instance ValWeights2 (WeightVW) and a list of branches to ignore when ForceTriggerOnce is configured.

func (*WeightBranchData) BuildPBComponentData added in v0.13.17

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

BuildPBComponentData builds the protobuf representation of this component data.

func (*WeightBranchData) ChgConfigIntVal added in v0.13.376

func (weightBranchData *WeightBranchData) ChgConfigIntVal(key string, off int) int

ChgConfigIntVal changes an integer config by offset and returns the new value. When CCVClearForceTriggerOnceCache is changed it clears per-data ignore list.

func (*WeightBranchData) Clone added in v0.13.170

func (weightBranchData *WeightBranchData) Clone() IComponentData

Clone returns a copy of the WeightBranchData suitable for per-play storage.

func (*WeightBranchData) GetStrVal added in v0.13.273

func (weightBranchData *WeightBranchData) GetStrVal(key string) (string, bool)

GetStrVal returns a string configuration or runtime value by key. Supports CSVValue which maps to the currently selected branch Value.

func (*WeightBranchData) GetValEx added in v0.13.336

func (weightBranchData *WeightBranchData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx returns an integer configuration or runtime value by key. Currently not used by WeightBranch and returns (0,false).

func (*WeightBranchData) OnNewGame added in v0.13.17

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

OnNewGame resets per-game state for the component data. It is called when a new game/play begins so cached per-data state is cleared.

func (*WeightBranchData) SetConfigIntVal added in v0.13.376

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

SetConfigIntVal applies an integer configuration change to the component data. Special handling: when CCVClearForceTriggerOnceCache is set it clears per-data caches.

func (*WeightBranchData) SetConfigVal added in v0.13.344

func (weightBranchData *WeightBranchData) SetConfigVal(key string, val string)

SetConfigVal applies a string configuration change to the component data. When the weight configuration is changed it clears any cached per-data WeightVW.

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

func (*WeightReels) ProcControllers added in v0.13.382

func (weightReels *WeightReels) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type WeightReels2 added in v0.13.402

type WeightReels2 struct {
	*BasicComponent `json:"-"`
	Config          *WeightReels2Config `json:"config"`
}

func (*WeightReels2) Init added in v0.13.402

func (weightReels2 *WeightReels2) Init(fn string, pool *GamePropertyPool) error

Init -

func (*WeightReels2) InitEx added in v0.13.402

func (weightReels2 *WeightReels2) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*WeightReels2) NewComponentData added in v0.13.402

func (weightReels2 *WeightReels2) NewComponentData() IComponentData

NewComponentData -

func (*WeightReels2) OnAsciiGame added in v0.13.402

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

OnAsciiGame - outpur to asciigame

func (*WeightReels2) OnPlayGame added in v0.13.402

func (weightReels2 *WeightReels2) 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 (*WeightReels2) ProcControllers added in v0.13.402

func (weightReels2 *WeightReels2) ProcControllers(gameProp *GameProperty, plugin sgc7plugin.IPlugin, curpr *sgc7game.PlayResult, gp *GameParams, val int, strVal string)

OnProcControllers -

type WeightReels2Config added in v0.13.402

type WeightReels2Config struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	ReelSetsWeight       string                `yaml:"reelSetWeight" json:"reelSetWeight"`
	ReelSetsWeightVW     *sgc7game.ValWeights2 `json:"-"`
	IsExpandReel         bool                  `yaml:"isExpandReel" json:"isExpandReel"`
	MapAwards            map[string][]*Award   `yaml:"mapAwards" json:"mapAwards"` // 新的奖励系统
}

BasicReelsConfig - configuration for WeightReels

func (*WeightReels2Config) SetLinkComponent added in v0.13.402

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

SetLinkComponent

type WeightReels2Data added in v0.13.402

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

func (*WeightReels2Data) BuildPBComponentData added in v0.13.402

func (weightReels2Data *WeightReels2Data) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*WeightReels2Data) Clone added in v0.13.402

func (weightReels2Data *WeightReels2Data) Clone() IComponentData

Clone

func (*WeightReels2Data) GetValEx added in v0.13.402

func (weightReels2Data *WeightReels2Data) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*WeightReels2Data) OnNewGame added in v0.13.402

func (weightReels2Data *WeightReels2Data) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

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"`
	Awards               []*Award              `yaml:"awards" json:"awards"` // 新的奖励系统
}

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) GetValEx added in v0.13.336

func (weightReelsData *WeightReelsData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*WeightReelsData) OnNewGame added in v0.12.264

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

OnNewGame -

type WeightResults added in v0.13.235

type WeightResults struct {
	Results []*sgc7game.PlayResult
	Weight  int
}

func SpinWithSeed added in v0.13.235

func SpinWithSeed(game *Game, ips sgc7game.IPlayerState, seed int, stake *sgc7game.Stake) ([]*WeightResults, error)

type WinResultLimiter added in v0.13.578

type WinResultLimiter struct {
	*BasicComponent `json:"-"`
	Config          *WinResultLimiterConfig `json:"config"`
}

WinResultLimiter is a component that limits win results according to configured rules.

func (*WinResultLimiter) Init added in v0.13.578

func (w *WinResultLimiter) Init(fn string, pool *GamePropertyPool) error

Init loads a YAML configuration file and initializes the component. Init reads the file from fn and unmarshals it into a WinResultLimiterConfig before calling InitEx.

func (*WinResultLimiter) InitEx added in v0.13.578

func (winResultLimiter *WinResultLimiter) InitEx(cfg any, pool *GamePropertyPool) error

InitEx initializes the component from a parsed configuration object. InitEx validates the cfg type and sets internal fields required for operation.

func (*WinResultLimiter) NewComponentData added in v0.13.578

func (winResultModifier *WinResultLimiter) NewComponentData() IComponentData

NewComponentData creates and returns a fresh WinResultLimiterData instance.

func (*WinResultLimiter) OnAsciiGame added in v0.13.578

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

OnAsciiGame outputs component information for ASCII game mode. OnAsciiGame prints the ending wins to stdout for legacy ASCII output.

func (*WinResultLimiter) OnPlayGame added in v0.13.578

func (winResultLimiter *WinResultLimiter) 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)

OnPlayGame is the runtime entry used during play to apply limiter logic to a PlayResult. OnPlayGame dispatches to the configured limiter behavior for the current step.

type WinResultLimiterConfig added in v0.13.578

type WinResultLimiterConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string               `yaml:"type" json:"type"`                   // type
	Type                 WinResultLimiterType `yaml:"-" json:"-"`                         // type
	SrcComponents        []string             `yaml:"srcComponents" json:"srcComponents"` // srcComponents
}

WinResultLimiterConfig is the configuration for the WinResultLimiter component. It is parsed from YAML/JSON and controls limiter behavior.

func (*WinResultLimiterConfig) SetLinkComponent added in v0.13.578

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

SetLinkComponent sets a link between components such as the "next" component. If link is "next", the DefaultNextComponent field is updated.

type WinResultLimiterData added in v0.13.578

type WinResultLimiterData struct {
	BasicComponentData
	Wins int
}

WinResultLimiterData holds runtime data for the WinResultLimiter component. It embeds BasicComponentData and tracks the total wins calculated by the limiter.

func (*WinResultLimiterData) BuildPBComponentData added in v0.13.578

func (winResultLimiterData *WinResultLimiterData) BuildPBComponentData() proto.Message

BuildPBComponentData builds a protobuf message representing the component data.

func (*WinResultLimiterData) Clone added in v0.13.578

func (winResultLimiterData *WinResultLimiterData) Clone() IComponentData

Clone creates a deep copy of the component data and returns the clone.

func (*WinResultLimiterData) GetValEx added in v0.13.578

func (winResultLimiterData *WinResultLimiterData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx returns named values exposed by this component data. Supported keys: CVWins -> returns the accumulated wins for the limiter.

func (*WinResultLimiterData) OnNewGame added in v0.13.578

func (winResultLimiterData *WinResultLimiterData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame calls BasicComponentData.OnNewGame to initialize component data at the start of a new game.

type WinResultLimiterType added in v0.13.578

type WinResultLimiterType int
const (
	WRLTypeMaxOnLine WinResultLimiterType = 0
)

type WinResultModifier added in v0.13.244

type WinResultModifier struct {
	*BasicComponent `json:"-"`
	Config          *WinResultModifierConfig `json:"config"`
}

func (*WinResultModifier) GetWinMulti added in v0.13.244

func (winResultModifier *WinResultModifier) GetWinMulti(basicCD *BasicComponentData) int

func (*WinResultModifier) Init added in v0.13.244

func (winResultModifier *WinResultModifier) Init(fn string, pool *GamePropertyPool) error

Init -

func (*WinResultModifier) InitEx added in v0.13.244

func (winResultModifier *WinResultModifier) InitEx(cfg any, pool *GamePropertyPool) error

InitEx -

func (*WinResultModifier) NewComponentData added in v0.13.244

func (winResultModifier *WinResultModifier) NewComponentData() IComponentData

NewComponentData -

func (*WinResultModifier) OnAsciiGame added in v0.13.244

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

OnAsciiGame - outpur to asciigame

func (*WinResultModifier) OnPlayGame added in v0.13.244

func (winResultModifier *WinResultModifier) 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 WinResultModifierConfig added in v0.13.244

type WinResultModifierConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string                `yaml:"type" json:"type"`                         // type
	Type                 WinResultModifierType `yaml:"-" json:"-"`                               // type
	SourceComponents     []string              `yaml:"sourceComponents" json:"sourceComponents"` // target components
	WinMulti             int                   `yaml:"winMulti" json:"winMulti"`                 // winMulti,最后的中奖倍数,默认为1
	WinDivisor           int                   `yaml:"winDivisor" json:"winDivisor"`             // winDivisor
	TargetSymbols        []string              `yaml:"targetSymbols" json:"targetSymbols"`       // targetSymbols
	TargetSymbolCodes    []int                 `yaml:"-" json:"-"`                               // target SymbolCodes
}

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

func (*WinResultModifierConfig) SetLinkComponent added in v0.13.244

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

SetLinkComponent

type WinResultModifierData added in v0.13.244

type WinResultModifierData struct {
	BasicComponentData
	Wins     int
	WinMulti int
}

func (*WinResultModifierData) BuildPBComponentData added in v0.13.244

func (winResultModifierData *WinResultModifierData) BuildPBComponentData() proto.Message

BuildPBComponentData

func (*WinResultModifierData) Clone added in v0.13.244

func (winResultModifierData *WinResultModifierData) Clone() IComponentData

Clone

func (*WinResultModifierData) GetValEx added in v0.13.336

func (winResultModifierData *WinResultModifierData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*WinResultModifierData) OnNewGame added in v0.13.244

func (winResultModifierData *WinResultModifierData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame -

type WinResultModifierEx added in v0.13.414

type WinResultModifierEx struct {
	*BasicComponent `json:"-"`
	Config          *WinResultModifierExConfig `json:"config"`
}

WinResultModifierEx is a component that modifies win results based on configured symbol mappings and multiplier logic.

It embeds BasicComponent and holds a typed configuration pointer.

func (*WinResultModifierEx) Init added in v0.13.414

func (winResultModifierEx *WinResultModifierEx) Init(fn string, pool *GamePropertyPool) error

Init loads YAML configuration from the given filename and initializes the component. It is a convenience wrapper around InitEx that reads the file content and unmarshals it into the component config structure.

func (*WinResultModifierEx) InitEx added in v0.13.414

func (winResultModifierEx *WinResultModifierEx) InitEx(cfg any, pool *GamePropertyPool) error

InitEx initializes the component from an already-unmarshaled configuration object (typically *WinResultModifierExConfig). It validates configuration values and resolves symbol codes from the paytable pool.

func (*WinResultModifierEx) NewComponentData added in v0.13.414

func (winResultModifierEx *WinResultModifierEx) NewComponentData() IComponentData

NewComponentData creates a fresh instance of WinResultModifierExData used to track per-game and per-step state for this component.

func (*WinResultModifierEx) OnAsciiGame added in v0.13.414

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

OnAsciiGame outputs component debug information to the asciigame system.

OnAsciiGame is intended for human-readable debugging of component behavior and prints the current multiplier and accumulated wins.

func (*WinResultModifierEx) OnPlayGame added in v0.13.414

func (winResultModifierEx *WinResultModifierEx) 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)

OnPlayGame applies the configured win-modification logic to the current PlayResult. It inspects results produced by configured source components and adjusts CoinWin, CashWin and OtherMul according to the mapping and modifier type.

OnPlayGame returns the name of the next component (or empty) and an error indicating whether any modification was applied. If no modification took place it returns ErrComponentDoNothing.

type WinResultModifierExConfig added in v0.13.414

type WinResultModifierExConfig struct {
	BasicComponentConfig `yaml:",inline" json:",inline"`
	StrType              string                `yaml:"type" json:"type"`                         // type
	Type                 WinResultModifierType `yaml:"-" json:"-"`                               // type
	SourceComponents     []string              `yaml:"sourceComponents" json:"sourceComponents"` // target components
	MapTargetSymbols     map[string]int        `yaml:"mapTargetSymbols" json:"mapTargetSymbols"` // mapTargetSymbols
	MapTargetSymbolCodes map[int]int           `yaml:"-" json:"-"`                               // MapTargetSymbolCodes
}

WinResultModifierExConfig - configuration for WinResultModifierEx

WinResultModifierExConfig describes how a WinResultModifierEx component is configured via YAML/JSON. It includes the component base config, the type string, source components that will be inspected, and a mapping from target symbol names to multiplier values.

func (*WinResultModifierExConfig) SetLinkComponent added in v0.13.414

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

SetLinkComponent SetLinkComponent sets link-based connections for the component.

The function supports the "next" link which sets the default next component name. This mirrors the behavior used by other components and is called by the builder when wiring components together.

type WinResultModifierExData added in v0.13.414

type WinResultModifierExData struct {
	BasicComponentData
	Wins     int
	WinMulti int
}

WinResultModifierExData holds runtime state for a WinResultModifierEx component.

It embeds BasicComponentData and tracks accumulated wins and the applied win multiplier for the current step.

func (*WinResultModifierExData) BuildPBComponentData added in v0.13.414

func (winResultModifierDataEx *WinResultModifierExData) BuildPBComponentData() proto.Message

BuildPBComponentData converts the component data into its protobuf representation used for telemetry or RPC.

BuildPBComponentData returns a proto.Message representing the current WinResultModifierExData.

func (*WinResultModifierExData) Clone added in v0.13.414

func (winResultModifierDataEx *WinResultModifierExData) Clone() IComponentData

Clone creates a deep copy of WinResultModifierExData and returns it as the IComponentData interface.

Clone is used when component data must be duplicated (for example, when creating snapshots or copying state between game contexts).

func (*WinResultModifierExData) GetValEx added in v0.13.414

func (winResultModifierDataEx *WinResultModifierExData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx retrieves a named integer value from the component data.

For WinResultModifierExData the supported key is "CVWins" which returns the accumulated wins. The function returns the value and a boolean indicating whether the key was found.

func (*WinResultModifierExData) OnNewGame added in v0.13.414

func (winResultModifierDataEx *WinResultModifierExData) OnNewGame(gameProp *GameProperty, component IComponent)

OnNewGame initializes per-game state for WinResultModifierExData.

OnNewGame forwards to BasicComponentData.OnNewGame and performs any WinResultModifierEx-specific initialization required at the start of a new game.

type WinResultModifierType added in v0.13.244

type WinResultModifierType int
const (
	WRMTypeExistSymbol       WinResultModifierType = 0
	WRMTypeAddSymbolMulti    WinResultModifierType = 1
	WRMTypeMulSymbolMulti    WinResultModifierType = 2
	WRMTypeSymbolMultiOnWays WinResultModifierType = 3
	WRMTypeDivide            WinResultModifierType = 4
	WRMTypeMultiply          WinResultModifierType = 5
)

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

func (winResultMulti *WinResultMulti) NewStats2(parent string) *stats2.Feature

NewStats2 -

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

func (*WinResultMulti) OnStats2 added in v0.13.391

func (winResultMulti *WinResultMulti) OnStats2(icd IComponentData, s2 *stats2.Cache, gameProp *GameProperty, gp *GameParams, pr *sgc7game.PlayResult, isOnStepEnd bool)

OnStats2

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

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) GetValEx added in v0.13.336

func (winResultMultiData *WinResultMultiData) GetValEx(key string, getType GetComponentValType) (int, bool)

GetValEx -

func (*WinResultMultiData) OnNewGame added in v0.13.8

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

OnNewGame -

Source Files

Jump to

Keyboard shortcuts

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