default_ai

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultAI

func NewDefaultAI(abilities []TargetAbility) core.AIFactory

Types

type DefaultAI

type DefaultAI struct {
	Target *core.Target

	Abilities []TargetAbility
}

Default implementation of TargetAI which takes a list of abilities as input in order of priority.

func (*DefaultAI) ExecuteCustomRotation

func (ai *DefaultAI) ExecuteCustomRotation(sim *core.Simulation)

func (*DefaultAI) Initialize

func (ai *DefaultAI) Initialize(target *core.Target, config *proto.Target)

func (*DefaultAI) Reset

func (ai *DefaultAI) Reset(sim *core.Simulation)

type TargetAbility

type TargetAbility struct {
	// Puts ability on CD at the start of each iteration.
	InitialCD time.Duration

	// Probability (0-1) that this ability will be used when available.
	ChanceToUse float64

	// Factory function for creating the spell. Can use this or supply Spell
	// directly.
	MakeSpell func(*core.Target) *core.Spell

	Spell *core.Spell
}

Jump to

Keyboard shortcuts

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