enemy

package
v0.0.0-...-69059c8 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package enemy implements an enemey target

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureTarget

func ConfigureTarget(profile *info.EnemyProfile, name string, params TargetParams) error

Types

type Enemy

type Enemy struct {
	*target.Target
	*reactable.Reactable

	Level int
	// contains filtered or unexported fields
}

func New

func New(core *core.Core, p info.EnemyProfile) *Enemy

func (*Enemy) AddDefMod

func (e *Enemy) AddDefMod(mod combat.DefMod)

func (*Enemy) AddResistMod

func (e *Enemy) AddResistMod(mod combat.ResistMod)

func (*Enemy) AddStatus

func (e *Enemy) AddStatus(key string, dur int, hitlag bool)

Add.

func (*Enemy) ApplyHitlag

func (e *Enemy) ApplyHitlag(factor, dur float64)

func (*Enemy) CalcTempDirection

func (e *Enemy) CalcTempDirection(trg geometry.Point) geometry.Point

func (*Enemy) DefModIsActive

func (e *Enemy) DefModIsActive(key string) bool

func (*Enemy) DeleteDefMod

func (e *Enemy) DeleteDefMod(key string)

func (*Enemy) DeleteResistMod

func (e *Enemy) DeleteResistMod(key string)

func (*Enemy) DeleteStatus

func (e *Enemy) DeleteStatus(key string)

func (*Enemy) HP

func (e *Enemy) HP() float64

func (*Enemy) HandleAttack

func (e *Enemy) HandleAttack(atk *combat.AttackEvent) float64

func (*Enemy) Kill

func (e *Enemy) Kill()

func (*Enemy) MaxHP

func (e *Enemy) MaxHP() float64

func (*Enemy) QueueEnemyTask

func (e *Enemy) QueueEnemyTask(f func(), delay int)

func (*Enemy) ResistModIsActive

func (e *Enemy) ResistModIsActive(key string) bool

func (*Enemy) SetDirection

func (e *Enemy) SetDirection(trg geometry.Point)

func (*Enemy) SetDirectionToClosestEnemy

func (e *Enemy) SetDirectionToClosestEnemy()

func (*Enemy) StatusExpiry

func (e *Enemy) StatusExpiry(key string) int

func (*Enemy) StatusIsActive

func (e *Enemy) StatusIsActive(key string) bool

func (*Enemy) Tick

func (e *Enemy) Tick()

func (*Enemy) Type

func (e *Enemy) Type() targets.TargettableType

type TargetParams

type TargetParams struct {
	HpMultiplier float64
	Particles    bool
}

Jump to

Keyboard shortcuts

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