reactable

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 13 Imported by: 6

Documentation

Index

Constants

View Source
const (
	BloomMultiplier      = 2
	BurgeonMultiplier    = 3
	HyperbloomMultiplier = 3
)
View Source
const DendroCoreDelay = 20
View Source
const ZeroDur combat.Durability = 0.00000000001

Variables

View Source
var ModifierString = []string{
	"",
	"electro",
	"pyro",
	"cryo",
	"hydro",
	"dendro (fuel)",
	"",
	"dendro",
	"quicken",
	"frozen",
	"anemo",
	"geo",
	"burning",
	"",
}

Functions

func NewBloomAttack added in v1.2.0

func NewBloomAttack(char *character.CharWrapper, src combat.Target) combat.AttackInfo

func NewBurgeonAttack added in v1.2.0

func NewBurgeonAttack(char *character.CharWrapper, src combat.Target) combat.AttackInfo

func NewHyperbloomAttack added in v1.2.0

func NewHyperbloomAttack(char *character.CharWrapper, src combat.Target) combat.AttackInfo

Types

type CrystallizeShield

type CrystallizeShield struct {
	*shield.Tmpl
	// contains filtered or unexported fields
}

func NewCrystallizeShield

func NewCrystallizeShield(typ attributes.Element, src int, lvl int, em float64, expiry int) *CrystallizeShield

func (*CrystallizeShield) OnDamage

func (c *CrystallizeShield) OnDamage(dmg float64, ele attributes.Element, bonus float64) (float64, bool)

type DendroCore added in v1.2.0

type DendroCore struct {
	*gadget.Gadget
	// contains filtered or unexported fields
}

func NewDendroCore added in v1.2.0

func NewDendroCore(c *core.Core, pos combat.Positional, a *combat.AttackEvent) *DendroCore

func (*DendroCore) ApplyDamage added in v1.2.0

func (s *DendroCore) ApplyDamage(*combat.AttackEvent, float64)

func (*DendroCore) Attack added in v1.2.0

func (s *DendroCore) Attack(atk *combat.AttackEvent, evt glog.Event) (float64, bool)

func (*DendroCore) Tick added in v1.2.0

func (s *DendroCore) Tick()

type Enemy added in v1.2.0

type Enemy interface {
	QueueEnemyTask(f func(), delay int)
}

type Reactable

type Reactable struct {
	Durability [EndReactableModifier]combat.Durability
	DecayRate  [EndReactableModifier]combat.Durability
	// contains filtered or unexported fields
}

func (*Reactable) ActiveAuraString

func (r *Reactable) ActiveAuraString() []string

func (*Reactable) AttachOrRefill added in v1.2.0

func (r *Reactable) AttachOrRefill(a *combat.AttackEvent) bool

AttachOrRefill is called after the damage event if the attack has not reacted with anything and will either create a new modifier if non exist, or update according to the rules of each modifier

func (*Reactable) AuraContains

func (r *Reactable) AuraContains(e ...attributes.Element) bool

AuraCountains returns true if any element e is active on the target

func (*Reactable) AuraCount added in v1.2.0

func (r *Reactable) AuraCount() int

func (*Reactable) Init

func (r *Reactable) Init(self combat.Target, c *core.Core) *Reactable

func (*Reactable) React

func (r *Reactable) React(a *combat.AttackEvent)

func (*Reactable) ShatterCheck

func (r *Reactable) ShatterCheck(a *combat.AttackEvent)

func (*Reactable) Tick

func (r *Reactable) Tick()

type ReactableModifier added in v1.2.0

type ReactableModifier int
const (
	ModifierInvalid ReactableModifier = iota
	ModifierElectro
	ModifierPyro
	ModifierCryo
	ModifierHydro
	ModifierBurningFuel
	ModifierSpecialDecayDelim
	ModifierDendro
	ModifierQuicken
	ModifierFrozen
	ModifierAnemo
	ModifierGeo
	ModifierBurning
	EndReactableModifier
)

func (ReactableModifier) Element added in v1.2.0

func (r ReactableModifier) Element() attributes.Element

func (ReactableModifier) MarshalJSON added in v1.2.2

func (r ReactableModifier) MarshalJSON() ([]byte, error)

func (ReactableModifier) String added in v1.2.0

func (r ReactableModifier) String() string

func (*ReactableModifier) UnmarshalJSON added in v1.2.2

func (r *ReactableModifier) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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