reactable

package
v0.0.0-...-84dbd67 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

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

Variables

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

Functions

func NewHyperbloomAttack

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

Types

type CrystallizeShard

type CrystallizeShard struct {
	*gadget.Gadget
	// earliest that a shard can be picked up after spawn
	EarliestPickup int
	// captures the shield because em snapshots
	Shield *CrystallizeShield
	// contains filtered or unexported fields
}

func NewCrystallizeShard

func NewCrystallizeShard(c *core.Core, shp geometry.Shape, shd *CrystallizeShield) *CrystallizeShard

func (*CrystallizeShard) AddShieldKillShard

func (cs *CrystallizeShard) AddShieldKillShard() bool

func (*CrystallizeShard) Attack

func (*CrystallizeShard) CalcTempDirection

func (cs *CrystallizeShard) CalcTempDirection(trg geometry.Point) geometry.Point

func (*CrystallizeShard) HandleAttack

func (cs *CrystallizeShard) HandleAttack(atk *combat.AttackEvent) float64

func (*CrystallizeShard) SetDirection

func (cs *CrystallizeShard) SetDirection(trg geometry.Point)

func (*CrystallizeShard) SetDirectionToClosestEnemy

func (cs *CrystallizeShard) SetDirectionToClosestEnemy()

type CrystallizeShield

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

func NewCrystallizeShield

func NewCrystallizeShield(index int, typ attributes.Element, src, 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

type DendroCore struct {
	*gadget.Gadget

	CharIndex int
	// contains filtered or unexported fields
}

func NewDendroCore

func NewDendroCore(c *core.Core, shp geometry.Shape, a *combat.AttackEvent) *DendroCore

func (*DendroCore) Attack

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

func (*DendroCore) CalcTempDirection

func (s *DendroCore) CalcTempDirection(trg geometry.Point) geometry.Point

func (*DendroCore) HandleAttack

func (s *DendroCore) HandleAttack(atk *combat.AttackEvent) float64

func (*DendroCore) SetDirection

func (s *DendroCore) SetDirection(trg geometry.Point)

func (*DendroCore) SetDirectionToClosestEnemy

func (s *DendroCore) SetDirectionToClosestEnemy()

func (*DendroCore) Tick

func (s *DendroCore) Tick()

type Enemy

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

type Modifier

type Modifier int
const (
	Invalid Modifier = iota
	Electro
	Pyro
	Cryo
	Hydro
	BurningFuel
	SpecialDecayDelim
	Dendro
	Quicken
	Frozen
	Anemo
	Geo
	Burning
	EndModifier
)

func (Modifier) Element

func (r Modifier) Element() attributes.Element

func (Modifier) MarshalJSON

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

func (Modifier) String

func (r Modifier) String() string

func (*Modifier) UnmarshalJSON

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

type Reactable

type Reactable struct {
	Durability [EndModifier]reactions.Durability
	DecayRate  [EndModifier]reactions.Durability

	// freeze specific
	FreezeResist float64
	// contains filtered or unexported fields
}

func (*Reactable) ActiveAuraString

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

func (*Reactable) AttachOrRefill

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

func (r *Reactable) AuraCount() int

func (*Reactable) Init

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

func (*Reactable) IsBurning

func (r *Reactable) IsBurning() bool

func (*Reactable) PoiseDMGCheck

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

func (*Reactable) React

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

func (*Reactable) ShatterCheck

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

func (*Reactable) Tick

func (r *Reactable) Tick()

func (*Reactable) TryAddEC

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

func (*Reactable) TryAggravate

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

func (*Reactable) TryBloom

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

func (*Reactable) TryBurning

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

func (*Reactable) TryCrystallizeCryo

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

func (*Reactable) TryCrystallizeElectro

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

func (*Reactable) TryCrystallizeFrozen

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

func (*Reactable) TryCrystallizeHydro

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

func (*Reactable) TryCrystallizePyro

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

func (*Reactable) TryFreeze

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

func (*Reactable) TryFrozenSuperconduct

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

func (*Reactable) TryMelt

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

func (*Reactable) TryOverload

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

func (*Reactable) TryQuicken

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

func (*Reactable) TrySpread

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

func (*Reactable) TrySuperconduct

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

func (*Reactable) TrySwirlCryo

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

func (*Reactable) TrySwirlElectro

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

func (*Reactable) TrySwirlFrozen

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

func (*Reactable) TrySwirlHydro

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

func (*Reactable) TrySwirlPyro

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

func (*Reactable) TryVaporize

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

Jump to

Keyboard shortcuts

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