Documentation ¶
Index ¶
- Variables
- 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) 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) 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) *Chain
- func (b *Builder) InteractNPCWithCheck(npc npc.ID, isCompletedFn func(d game.Data) bool, additionalSteps ...step.Step) *Chain
- func (b *Builder) InteractObject(name object.Name, isCompletedFn func(game.Data) bool, ...) *Chain
- func (b *Builder) InteractObjectByID(id data.UnitID, isCompletedFn func(game.Data) bool, ...) *Chain
- 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, opts ...step.MoveToStepOption) *Chain
- func (b *Builder) MoveToCoords(to data.Position, opts ...step.MoveToStepOption) *Chain
- func (b *Builder) OpenTPIfLeader() *StepChainAction
- 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() *Chain
- func (b *Builder) ReviveMerc() *Chain
- func (b *Builder) Stash(forceStash bool) *Chain
- func (b *Builder) SwitchStashTab(tab int) *Chain
- 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 ¶
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 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) 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) 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) MoveToArea ¶ added in v0.3.0
func (*Builder) MoveToCoords ¶ added in v0.3.0
func (*Builder) OpenTPIfLeader ¶ added in v0.4.0
func (b *Builder) OpenTPIfLeader() *StepChainAction
func (*Builder) RecoverCorpse ¶
func (b *Builder) RecoverCorpse() *StepChainAction
func (*Builder) ResetStats ¶ added in v0.3.0
func (*Builder) ReturnTown ¶
func (*Builder) ReviveMerc ¶
func (*Builder) SwitchStashTab ¶ added in v0.4.0
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
}
type Character ¶
type Character interface { BuffSkills(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
Source Files ¶
- action.go
- action_builder.go
- action_chain.go
- action_step_chain.go
- buff.go
- character.go
- chicken.go
- clear_area.go
- clear_level.go
- cube_recipes.go
- gambling.go
- heal.go
- horadric_cube.go
- identify.go
- interaction.go
- item.go
- item_pickup.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
Click to show internal directories.
Click to hide internal directories.