enemy

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 15 Imported by: 5

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 DefMod

type DefMod struct {
	Value float64
	Dur   int
	modifier.Base
}

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 DefMod)

func (*Enemy) AddResistMod

func (e *Enemy) AddResistMod(mod 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) DefAdj

func (t *Enemy) DefAdj(ai *combat.AttackInfo, evt glog.Event) float64

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 (t *Enemy) HP() float64

func (*Enemy) HandleAttack added in v1.3.0

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

func (*Enemy) MaxHP added in v1.2.0

func (t *Enemy) MaxHP() float64

func (*Enemy) QueueEnemyTask

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

func (*Enemy) Resist

func (e *Enemy) Resist(ai *combat.AttackInfo, evt glog.Event) float64

TODO: this needs to purge if done?

func (*Enemy) ResistModIsActive

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

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() combat.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:"-"`
}

func (*EnemyProfile) Clone

func (e *EnemyProfile) Clone() EnemyProfile

type ResistMod

type ResistMod struct {
	Ele   attributes.Element
	Value float64
	modifier.Base
}

type Status

type Status struct {
	modifier.Base
}

Jump to

Keyboard shortcuts

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