Documentation ¶
Index ¶
- Variables
- type Action
- type Builder
- func (b *Builder) Buff() *StepChainAction
- func (b *Builder) BuffIfRequired(d data.Data) *StepChainAction
- func (b *Builder) BuyAtVendor(vendor npc.ID, items ...VendorItemRequest) *Chain
- func (b *Builder) ClearArea(openChests bool, filter data.MonsterFilter) *Chain
- func (b *Builder) ClearAreaAroundPlayer(distance int) Action
- func (b *Builder) CubeAddItems(items ...data.Item) *Chain
- func (b *Builder) CubeTransmute() *Chain
- func (b *Builder) DiscoverWaypoint() *Chain
- func (b *Builder) EnsureSkillBindings() *StepChainAction
- func (b *Builder) EnsureSkillPoints() *StepChainAction
- func (b *Builder) EnsureStatPoints() *StepChainAction
- func (b *Builder) Gamble() *Chain
- func (b *Builder) GetCompletedQuests(act int) []bool
- func (b *Builder) Heal() *Chain
- func (b *Builder) HireMerc() *Chain
- func (b *Builder) IdentifyAll(skipIdentify bool) *Chain
- func (b *Builder) InRunReturnTownRoutine() []Action
- func (b *Builder) InteractNPC(npc npc.ID, additionalSteps ...step.Step) *Chain
- func (b *Builder) InteractNPCWithCheck(npc npc.ID, isCompletedFn func(d data.Data) bool, additionalSteps ...step.Step) *Chain
- func (b *Builder) InteractObject(name object.Name, isCompletedFn func(data.Data) bool, ...) *Chain
- func (b *Builder) IsRebuffRequired(d data.Data) bool
- func (b *Builder) ItemPickup(waitForDrop bool, maxDistance int) *Chain
- func (b *Builder) MoveTo(toFunc func(d data.Data) (data.Position, bool), opts ...step.MoveToStepOption) *Chain
- func (b *Builder) MoveToArea(dst area.Area, opts ...step.MoveToStepOption) *Chain
- func (b *Builder) MoveToCoords(to data.Position, opts ...step.MoveToStepOption) *Chain
- func (b *Builder) PreRun(firstRun bool) []Action
- func (b *Builder) RecoverCorpse() *StepChainAction
- func (b *Builder) Repair() *Chain
- func (b *Builder) ResetStats() *Chain
- func (b *Builder) ReturnTown() *StepChainAction
- func (b *Builder) ReviveMerc() *Chain
- func (b *Builder) Stash(forceStash bool) *Chain
- func (b *Builder) UsePortalInTown() *Chain
- func (b *Builder) VendorRefill(forceRefill, sellJunk bool) *Chain
- func (b *Builder) Wait(duration time.Duration) *StepChainAction
- func (b *Builder) WayPoint(a area.Area) *Chain
- type Chain
- type Character
- type LevelingCharacter
- type Option
- type StepChainAction
- type VendorItemRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCanBeSkipped = errors.New("error occurred, but this action is not critical and game can continue")
View Source
var ErrLogAndContinue = errors.New("error occurred, but marking action as completed")
View Source
var ErrNoMoreSteps = errors.New("action finished, no more steps remaining")
View Source
var ErrNoRecover = errors.New("unrecoverable error occurred, game can not continue")
View Source
var ErrWillBeRetried = errors.New("error occurred, but it will be retried")
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(logger *zap.Logger, sm town.ShopManager, bm health.BeltManager, gr *reader.GameReader, ch Character, tf *ui.TemplateFinder) *Builder
func (*Builder) Buff ¶ added in v0.3.0
func (b *Builder) Buff() *StepChainAction
func (*Builder) BuffIfRequired ¶ added in v0.3.0
func (b *Builder) BuffIfRequired(d data.Data) *StepChainAction
func (*Builder) BuyAtVendor ¶ added in v0.3.0
func (b *Builder) BuyAtVendor(vendor npc.ID, items ...VendorItemRequest) *Chain
func (*Builder) ClearArea ¶
func (b *Builder) ClearArea(openChests bool, filter data.MonsterFilter) *Chain
func (*Builder) ClearAreaAroundPlayer ¶
func (*Builder) CubeAddItems ¶ added in v0.3.0
func (*Builder) CubeTransmute ¶ added in v0.3.0
func (*Builder) DiscoverWaypoint ¶ added in v0.2.0
func (*Builder) EnsureSkillBindings ¶ added in v0.3.0
func (b *Builder) EnsureSkillBindings() *StepChainAction
func (*Builder) EnsureSkillPoints ¶ added in v0.2.0
func (b *Builder) EnsureSkillPoints() *StepChainAction
func (*Builder) EnsureStatPoints ¶ added in v0.2.0
func (b *Builder) EnsureStatPoints() *StepChainAction
func (*Builder) GetCompletedQuests ¶ added in v0.3.0
func (*Builder) IdentifyAll ¶
func (*Builder) InRunReturnTownRoutine ¶ added in v0.3.0
func (*Builder) InteractNPC ¶ added in v0.3.0
func (*Builder) InteractNPCWithCheck ¶ added in v0.3.0
func (*Builder) InteractObject ¶ added in v0.3.0
func (*Builder) IsRebuffRequired ¶ added in v0.3.0
func (*Builder) MoveToArea ¶ added in v0.3.0
func (*Builder) MoveToCoords ¶ added in v0.3.0
func (*Builder) RecoverCorpse ¶
func (b *Builder) RecoverCorpse() *StepChainAction
func (*Builder) ResetStats ¶ added in v0.3.0
func (*Builder) ReturnTown ¶
func (b *Builder) ReturnTown() *StepChainAction
func (*Builder) ReviveMerc ¶
func (*Builder) UsePortalInTown ¶ added in v0.3.0
func (*Builder) VendorRefill ¶
type Chain ¶ added in v0.2.0
type Chain struct {
// contains filtered or unexported fields
}
type Character ¶
type Character interface { BuffSkills() map[skill.Skill]string KillCountess() Action KillAndariel() Action KillSummoner() Action KillDuriel() Action KillMephisto() Action KillPindle(skipOnImmunities []stat.Resist) Action KillNihlathak() Action KillCouncil() Action KillDiablo() Action KillIzual() Action KillBaal() Action KillMonsterSequence( monsterSelector func(d data.Data) (data.UnitID, bool), skipOnImmunities []stat.Resist, opts ...step.AttackOption, ) Action }
type LevelingCharacter ¶ added in v0.2.0
type LevelingCharacter interface { Character // StatPoints Stats will be assigned in the order they are returned by this function. StatPoints(data.Data) map[stat.ID]int SkillPoints(data.Data) []skill.Skill GetKeyBindings(data.Data) map[skill.Skill]string ShouldResetSkills(data.Data) bool KillAncients() Action GetSkillTree() skill.Tree }
type Option ¶
type Option func(action *basicAction)
func CanBeSkipped ¶
func CanBeSkipped() Option
func IgnoreErrors ¶ added in v0.2.0
func IgnoreErrors() Option
IgnoreErrors will ignore the errors and mark the action as succeeded
func RepeatUntilNoSteps ¶ added in v0.3.0
func RepeatUntilNoSteps() Option
func Resettable ¶
func Resettable() Option
type StepChainAction ¶ added in v0.3.0
func NewStepChain ¶ added in v0.3.0
Source Files ¶
- action.go
- action_builder.go
- action_chain.go
- action_step_chain.go
- buff.go
- character.go
- clear_area.go
- clear_level.go
- gambling.go
- heal.go
- horadric_cube.go
- identify.go
- interaction.go
- item_pickup.go
- leveling_tools.go
- move.go
- pre_run.go
- recover_corpse.go
- repair.go
- revive_merc.go
- stash.go
- tp_actions.go
- vendor.go
- wait.go
- waypoint.go
- waypoint_discover.go
Click to show internal directories.
Click to hide internal directories.