step

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttackOption

type AttackOption func(step *AttackStep)

func Distance

func Distance(minimum, maximum int) AttackOption

func EnsureAura

func EnsureAura(keyBinding string) AttackOption

type AttackStep

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

func PrimaryAttack

func PrimaryAttack(target data.UnitID, numOfAttacks int, opts ...AttackOption) *AttackStep

func SecondaryAttack

func SecondaryAttack(keyBinding string, id data.UnitID, numOfAttacks int, opts ...AttackOption) *AttackStep

func (*AttackStep) LastRun

func (bs *AttackStep) LastRun() time.Time

func (*AttackStep) Reset

func (bs *AttackStep) Reset()

func (*AttackStep) Run

func (p *AttackStep) Run(d data.Data) error

func (*AttackStep) Status

func (p *AttackStep) Status(d data.Data) Status

type InteractNPCStep

type InteractNPCStep struct {
	NPC npc.ID
	// contains filtered or unexported fields
}

func InteractNPC

func InteractNPC(npc npc.ID) *InteractNPCStep

func (*InteractNPCStep) Run

func (i *InteractNPCStep) Run(d data.Data) error

func (*InteractNPCStep) Status

func (i *InteractNPCStep) Status(d data.Data) Status

type InteractObjectStep

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

func InteractObject

func InteractObject(name object.Name, isCompleted func(data.Data) bool) *InteractObjectStep

func (*InteractObjectStep) Run

func (i *InteractObjectStep) Run(d data.Data) error

func (*InteractObjectStep) Status

func (i *InteractObjectStep) Status(d data.Data) Status

type KeySequenceStep

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

func KeySequence

func KeySequence(keysToPress ...string) *KeySequenceStep

func (*KeySequenceStep) LastRun

func (bs *KeySequenceStep) LastRun() time.Time

func (*KeySequenceStep) Reset

func (bs *KeySequenceStep) Reset()

func (*KeySequenceStep) Run

func (o *KeySequenceStep) Run(_ data.Data) error

func (*KeySequenceStep) Status

func (o *KeySequenceStep) Status(_ data.Data) Status

type MoveToAreaStep

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

func MoveToLevel

func MoveToLevel(area area.Area) *MoveToAreaStep

func (*MoveToAreaStep) Run

func (m *MoveToAreaStep) Run(d data.Data) error

func (*MoveToAreaStep) Status

func (m *MoveToAreaStep) Status(d data.Data) Status

type MoveToStep

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

func MoveTo

func MoveTo(toX, toY int, teleport bool, opts ...MoveToStepOption) *MoveToStep

func (*MoveToStep) Run

func (m *MoveToStep) Run(d data.Data) error

func (*MoveToStep) Status

func (m *MoveToStep) Status(d data.Data) Status

type MoveToStepOption

type MoveToStepOption func(step *MoveToStep)

func ClosestWalkable

func ClosestWalkable() MoveToStepOption

func StopAtDistance

func StopAtDistance(distance int) MoveToStepOption

func WithTimeout

func WithTimeout(timeout time.Duration) MoveToStepOption

type OpenPortalStep

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

func OpenPortal

func OpenPortal() *OpenPortalStep

func (*OpenPortalStep) LastRun

func (bs *OpenPortalStep) LastRun() time.Time

func (*OpenPortalStep) Reset

func (bs *OpenPortalStep) Reset()

func (*OpenPortalStep) Run

func (s *OpenPortalStep) Run(_ data.Data) error

func (*OpenPortalStep) Status

func (s *OpenPortalStep) Status(d data.Data) Status

type PickupItemStep

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

func PickupItem

func PickupItem(logger *zap.Logger, item data.Item) *PickupItemStep

func (*PickupItemStep) LastRun

func (bs *PickupItemStep) LastRun() time.Time

func (*PickupItemStep) Reset

func (bs *PickupItemStep) Reset()

func (*PickupItemStep) Run

func (p *PickupItemStep) Run(d data.Data) error

func (*PickupItemStep) Status

func (p *PickupItemStep) Status(d data.Data) Status

type Status

type Status string
const (
	StatusNotStarted Status = "NotStarted"
	StatusInProgress Status = "InProgress"
	StatusCompleted  Status = "Completed"
)

type Step

type Step interface {
	Status(data.Data) Status
	Run(data.Data) error
	Reset()
	LastRun() time.Time
}

type SwapWeaponStep

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

func SwapWeapon

func SwapWeapon() *SwapWeaponStep

func (*SwapWeaponStep) LastRun

func (bs *SwapWeaponStep) LastRun() time.Time

func (*SwapWeaponStep) Reset

func (bs *SwapWeaponStep) Reset()

func (*SwapWeaponStep) Run

func (s *SwapWeaponStep) Run(d data.Data) error

func (*SwapWeaponStep) Status

func (s *SwapWeaponStep) Status(d data.Data) Status

type SyncActionStep

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

func SyncStep

func SyncStep(action func(data.Data) error) *SyncActionStep

func SyncStepWithCheck

func SyncStepWithCheck(action func(data.Data) error, statusChecker func(data.Data) Status) *SyncActionStep

func (*SyncActionStep) LastRun

func (bs *SyncActionStep) LastRun() time.Time

func (*SyncActionStep) Reset

func (bs *SyncActionStep) Reset()

func (*SyncActionStep) Run

func (s *SyncActionStep) Run(d data.Data) error

func (*SyncActionStep) Status

func (s *SyncActionStep) Status(d data.Data) Status

Jump to

Keyboard shortcuts

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