enemy

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 13 Imported by: 5

Documentation

Overview

Package enemy implements an enemey target

Index

Constants

View Source
const MaxTeamSize = 4

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

func (e *Enemy) Attack(atk *combat.AttackEvent, evt glog.Event) (float64, bool)

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

func (t *Enemy) GroupTagDamageMult(tag combat.ICDTag, grp combat.ICDGroup, char int) float64

func (*Enemy) QueueEnemyTask

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

func (*Enemy) ResetDamageCounterAfterDelay

func (t *Enemy) ResetDamageCounterAfterDelay(tag combat.ICDTag, grp combat.ICDGroup, char int)

func (*Enemy) ResetTagCounterAfterDelay

func (t *Enemy) ResetTagCounterAfterDelay(tag combat.ICDTag, grp combat.ICDGroup, char 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

func (*Enemy) WillApplyEle

func (t *Enemy) WillApplyEle(tag combat.ICDTag, grp combat.ICDGroup, char int) bool

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