Versions in this module Expand all Collapse all v1 v1.0.0 Aug 22, 2026 Changes in this version + const MaxPriority + const MinPriority + type BinaryExpr struct + Left Expr + Op BoolOp + Right Expr + type BoolOp int + const OpAnd + const OpOr + type CompareCond struct + Line int + Op CompareOp + Operand uint32 + Watch string + type CompareOp int + const OpEq + const OpGe + const OpGt + const OpLe + const OpLt + const OpNe + type CompareWatchCond struct + Left string + Line int + Op CompareOp + Right string + type Const struct + Line int + Name string + Value uint32 + type Def struct + Expr Expr + Line int + Name string + type DefRef struct + Line int + Name string + Negate bool + type Effect struct + DurationMs int + Kind EffectKind + Percent int + Steps []Step + Strong float64 + Weak float64 + type EffectKind int + const EffectAmplify + const EffectDampen + const EffectHold + const EffectPattern + const EffectPulse + type Endian int + const EndianBig + const EndianDefault + const EndianLittle + type Engine struct + func NewEngine(rs *Ruleset, sys System, players int) (*Engine, error) + func (en *Engine) Evaluate(mem Reader, now time.Time) []MotorState + func (en *Engine) Metadata() Metadata + func (en *Engine) Reset() + type Event struct + Cond Expr + DurationMs int + Held bool + HeldFrames int + Line int + Name string + Trigger PrevCond + type Expr interface + type Metadata struct + Game string + GameID string + Revision int + System string + type MotorState struct + Player int + Strong float64 + Weak float64 + type PrevCond struct + Line int + Op PrevOp + Operand uint32 + Qual PrevQual + Watch string + type PrevOp int + const OpChanged + const OpDecreased + const OpIncreased + const OpUnchanged + type PrevQual int + const QualAtLeast + const QualAtMost + const QualBy + const QualFrom + const QualNone + const QualTo + type Reader interface + ReadMemory func(addr uint32, buf []byte) uint32 + type Region struct + Name string + Size uint32 + Start uint32 + type Rule struct + Clip bool + ClipMs int + CooldownMs int + Effect Effect + Level bool + Line int + On Expr + Player int + PlayerAll bool + Priority int + Scale *Scale + While Expr + type Ruleset struct + Consts []Const + Defs []Def + Events []Event + Metadata Metadata + Rules []Rule + Watches []Watch + func Parse(src []byte) (*Ruleset, error) + type Scale struct + MagMax uint32 + MagMaxNeg bool + MagMin uint32 + MagMinNeg bool + MulMax float64 + MulMin float64 + Watch string + type SetCond struct + Line int + Negate bool + Set []uint32 + Watch string + type Step struct + DurationMs int + Strong float64 + Weak float64 + type System struct + BigEndian bool + Regions []Region + type Watch struct + Abs bool + Address uint32 + BCD bool + Count int + Endian Endian + FieldOffset uint32 + FieldPtr bool + HasKey bool + HasMask bool + KeyOffset uint32 + KeyValue uint32 + Line int + Mask uint32 + Name string + Offset uint32 + Pointer bool + Signed bool + Stride uint32 + Width int