health

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrChicken = errors.New("chicken")
View Source
var ErrDied = errors.New("you died :(")
View Source
var ErrMercChicken = errors.New("mercenary chicken")

Functions

This section is empty.

Types

type BeltManager

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

func NewBeltManager

func NewBeltManager(logger *zap.Logger) BeltManager

func (BeltManager) DrinkPotion

func (pm BeltManager) DrinkPotion(d data.Data, potionType data.PotionType, merc bool) bool

func (BeltManager) GetMissingCount

func (pm BeltManager) GetMissingCount(d data.Data, potionType data.PotionType) int

func (BeltManager) ShouldBuyPotions

func (pm BeltManager) ShouldBuyPotions(d data.Data) bool

ShouldBuyPotions will return true if more than 25% of belt is empty (ignoring rejuv)

type Manager

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

Manager responsibility is to keep our character and mercenary alive, monitoring life and giving potions when needed

func NewHealthManager

func NewHealthManager(logger *zap.Logger, beltManager BeltManager, gm *helper.GameManager) Manager

func (*Manager) HandleHealthAndMana

func (hm *Manager) HandleHealthAndMana(d data.Data) error

Jump to

Keyboard shortcuts

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