enemy

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 19 Imported by: 1

Documentation

Overview

Package enemy implements an enemey target

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 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 added in v1.6.0

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 added in v1.2.0

func (e *Enemy) HP() float64

func (*Enemy) HandleAttack added in v1.3.0

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

func (*Enemy) Kill added in v1.6.0

func (e *Enemy) Kill()

func (*Enemy) MaxHP added in v1.2.0

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 added in v1.6.0

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

func (*Enemy) SetDirectionToClosestEnemy added in v1.6.0

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 EnemyProfile

type EnemyProfile struct {
	Level                 int                            `json:"level"`
	HP                    float64                        `json:"-"`
	Resist                map[attributes.Element]float64 `json:"-"`
	Pos                   core.Coord                     `json:"-"`
	ParticleDropThreshold float64                        `json:"-"` // drop particle every x dmg dealt
	ParticleDropCount     float64                        `json:"-"`
	ParticleElement       attributes.Element             `json:"-"`
	FreezeResist          float64                        `json:"-"`
}

func (*EnemyProfile) Clone

func (e *EnemyProfile) Clone() EnemyProfile

Jump to

Keyboard shortcuts

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