Documentation ¶
Index ¶
- Variables
- func ResetBuffTime(supervisor string)
- type AbortReason
- type Action
- type Builder
- func (b *Builder) Buff() *StepChainAction
- func (b *Builder) BuffIfRequired(d game.Data) *StepChainAction
- func (b *Builder) BuyAtVendor(vendor npc.ID, items ...VendorItemRequest) *Chain
- func (b *Builder) CheckKeyBindings(d game.Data) []skill.ID
- func (b *Builder) ChickenOnMonsters(distance int, monsterIds []npc.ID) *Chain
- func (b *Builder) ClearArea(openChests bool, filter data.MonsterFilter) *Chain
- func (b *Builder) ClearAreaAroundPlayer(distance int, filter data.MonsterFilter) Action
- func (b *Builder) CubeAddItems(items ...data.Item) *Chain
- func (b *Builder) CubeRecipes() *Chain
- func (b *Builder) CubeTransmute() *Chain
- func (b *Builder) DiscoverWaypoint() *Chain
- func (b *Builder) DropMouseItem() *Chain
- func (b *Builder) EachLoopHook(d game.Data) (actions []Action)
- func (b *Builder) EnsureSkillBindings() *StepChainAction
- func (b *Builder) EnsureSkillPoints() *StepChainAction
- func (b *Builder) EnsureStatPoints() *StepChainAction
- func (b *Builder) Gamble() *Chain
- 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) *StepChainAction
- func (b *Builder) InteractNPCWithCheck(npc npc.ID, isCompletedFn func(d game.Data) bool, additionalSteps ...step.Step) *StepChainAction
- func (b *Builder) InteractObject(name object.Name, isCompletedFn func(game.Data) bool, ...) *StepChainAction
- func (b *Builder) InteractObjectByID(id data.UnitID, isCompletedFn func(game.Data) bool, ...) *StepChainAction
- func (b *Builder) IsMonsterSealElite(monster data.Monster) bool
- func (b *Builder) IsRebuffRequired(d game.Data) bool
- func (b *Builder) ItemPickup(waitForDrop bool, maxDistance int) *Chain
- func (b *Builder) MoveTo(toFunc func(d game.Data) (data.Position, bool), opts ...step.MoveToStepOption) *Chain
- func (b *Builder) MoveToArea(dst area.ID) *Chain
- func (b *Builder) MoveToCoords(to data.Position, opts ...step.MoveToStepOption) *Chain
- func (b *Builder) MoveToCoordsWithMinDistance(to data.Position, minDistance int, opts ...step.MoveToStepOption) *Chain
- func (b *Builder) NewGameHook() []Action
- func (b *Builder) OpenTPIfLeader() *StepChainAction
- func (b *Builder) PostRunHook(isLastRun bool) (actions []Action)
- func (b *Builder) PreRun(firstRun bool) []Action
- func (b *Builder) PreRunHook(firstRun bool) []Action
- func (b *Builder) RecoverCorpse() *StepChainAction
- func (b *Builder) Repair() *Chain
- func (b *Builder) RepairRequired() bool
- func (b *Builder) ResetStats() *Chain
- func (b *Builder) ReturnTown() *Chain
- func (b *Builder) ReviveMerc() *Chain
- func (b *Builder) Stash(forceStash bool) *Chain
- func (b *Builder) SwitchStashTab(tab int) *Chain
- func (b *Builder) SwitchToLegacyMode() *StepChainAction
- func (b *Builder) UpdateQuestLog() *StepChainAction
- func (b *Builder) UsePortalFrom(owner string) *Chain
- func (b *Builder) UsePortalInTown() *Chain
- func (b *Builder) UseSkillIfBind(id skill.ID) *Chain
- func (b *Builder) VendorRefill(forceRefill, sellJunk bool) *Chain
- func (b *Builder) Wait(duration time.Duration) *StepChainAction
- func (b *Builder) WaitForAllMembersWhenLeveling() *Chain
- func (b *Builder) WayPoint(a area.ID) *Chain
- type Chain
- type Character
- type CubeRecipe
- type LevelingCharacter
- type Option
- type StepChainAction
- type VendorItemRequest
Constants ¶
This section is empty.
Variables ¶
var ErrCanBeSkipped = errors.New("error occurred, but this action is not critical and game can continue")
var ErrLogAndContinue = errors.New("error occurred, but marking action as completed")
var ErrNoMoreSteps = errors.New("action finished, no more steps remaining")
var ErrNoRecover = errors.New("unrecoverable error occurred, game can not continue")
var ErrWillBeRetried = errors.New("error occurred, but it will be retried")
Functions ¶
func ResetBuffTime ¶ added in v0.5.0
func ResetBuffTime(supervisor string)
Types ¶
type AbortReason ¶ added in v0.4.0
type AbortReason string
const (
ReasonChicken AbortReason = "chicken occurred"
)
type Builder ¶
func NewBuilder ¶
func NewBuilder(container container.Container, sm town.ShopManager, bm health.BeltManager, ch Character) *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 game.Data) *StepChainAction
func (*Builder) BuyAtVendor ¶ added in v0.3.0
func (b *Builder) BuyAtVendor(vendor npc.ID, items ...VendorItemRequest) *Chain
func (*Builder) CheckKeyBindings ¶ added in v0.5.0
func (*Builder) ChickenOnMonsters ¶ added in v0.4.0
func (*Builder) ClearArea ¶
func (b *Builder) ClearArea(openChests bool, filter data.MonsterFilter) *Chain
func (*Builder) ClearAreaAroundPlayer ¶
func (b *Builder) ClearAreaAroundPlayer(distance int, filter data.MonsterFilter) Action
func (*Builder) CubeAddItems ¶ added in v0.3.0
func (*Builder) CubeRecipes ¶ added in v0.4.0
func (*Builder) CubeTransmute ¶ added in v0.3.0
func (*Builder) DiscoverWaypoint ¶ added in v0.2.0
func (*Builder) DropMouseItem ¶ added in v0.5.0
func (*Builder) EachLoopHook ¶ added in v0.5.0
EachLoopHook is executed every loop iteration before the main actions are executed. If you return any actions here, they will be executed before the main actions. This is useful to execute actions that are high priority and should be executed before the main actions, since will interrupt the main actions. For example, buffing, healing, going back to town to buy pots, revive merc...
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) 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) InteractObjectByID ¶ added in v0.4.0
func (*Builder) IsMonsterSealElite ¶ added in v0.4.0
func (*Builder) IsRebuffRequired ¶ added in v0.3.0
func (*Builder) MoveToCoords ¶ added in v0.3.0
func (*Builder) MoveToCoordsWithMinDistance ¶ added in v0.5.0
func (*Builder) NewGameHook ¶ added in v0.5.0
NewGameHook is executed when a new game is created. Actions returned here will be executed when a new game is created before the main actions.
func (*Builder) OpenTPIfLeader ¶ added in v0.4.0
func (b *Builder) OpenTPIfLeader() *StepChainAction
func (*Builder) PostRunHook ¶ added in v0.5.0
PostRunHook is executed after the main actions are executed. Actions returned here will be executed after the main actions for each run.
func (*Builder) PreRunHook ¶ added in v0.5.0
PreRunHook is executed before the main actions are executed. Actions returned here will be executed before the main actions for each run.
func (*Builder) RecoverCorpse ¶
func (b *Builder) RecoverCorpse() *StepChainAction
func (*Builder) RepairRequired ¶ added in v0.5.0
func (*Builder) ResetStats ¶ added in v0.3.0
func (*Builder) ReturnTown ¶
func (*Builder) ReviveMerc ¶
func (*Builder) SwitchStashTab ¶ added in v0.4.0
func (*Builder) SwitchToLegacyMode ¶ added in v0.5.0
func (b *Builder) SwitchToLegacyMode() *StepChainAction
func (*Builder) UpdateQuestLog ¶ added in v0.4.0
func (b *Builder) UpdateQuestLog() *StepChainAction
func (*Builder) UsePortalFrom ¶ added in v0.4.0
func (*Builder) UsePortalInTown ¶ added in v0.3.0
func (*Builder) UseSkillIfBind ¶ added in v0.4.0
func (*Builder) VendorRefill ¶
func (*Builder) Wait ¶ added in v0.3.0
func (b *Builder) Wait(duration time.Duration) *StepChainAction
func (*Builder) WaitForAllMembersWhenLeveling ¶ added in v0.4.0
type Chain ¶ added in v0.2.0
type Chain struct {
// contains filtered or unexported fields
}
func (*Chain) IsFinished ¶ added in v0.5.0
func (b *Chain) IsFinished() bool
type Character ¶
type Character interface { CheckKeyBindings(game.Data) []skill.ID BuffSkills(game.Data) []skill.ID PreCTABuffSkills(game.Data) []skill.ID 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 game.Data) (data.UnitID, bool), skipOnImmunities []stat.Resist, opts ...step.AttackOption, ) Action }
type CubeRecipe ¶ added in v0.4.0
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(game.Data) map[stat.ID]int SkillPoints(game.Data) []skill.ID SkillsToBind(game.Data) (skill.ID, []skill.ID) ShouldResetSkills(game.Data) bool KillAncients() Action }
type Option ¶
type Option func(action *basicAction)
func AbortOtherActionsIfNil ¶ added in v0.4.0
func AbortOtherActionsIfNil(reason AbortReason) Option
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
func (*StepChainAction) IsFinished ¶ added in v0.5.0
func (b *StepChainAction) IsFinished() bool
Source Files ¶
- action.go
- action_builder.go
- action_chain.go
- action_step_chain.go
- buff.go
- character.go
- check_bindings.go
- chicken.go
- clear_area.go
- clear_level.go
- cube_recipes.go
- gambling.go
- heal.go
- hooks.go
- horadric_cube.go
- identify.go
- interaction.go
- item.go
- item_pickup.go
- legacy_mode.go
- leveling_tools.go
- move.go
- pre_run.go
- recover_corpse.go
- repair.go
- revive_merc.go
- stash.go
- tools.go
- tp_actions.go
- vendor.go
- wait.go
- waypoint.go
- waypoint_discover.go