Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StatusEffect

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected Readonly entity

entity: Entity

Readonly event

event: IEventEmitter<this, IStatusEffectEvents> = new EventEmitter<this, E>(this)

Readonly type

Methods

add

  • Parameters

    Returns this

Protected createParticles

  • createParticles(__namedParameters?: [number, undefined | IRGB]): void
  • Creates particle events from the 2-value tuple provided.

    Particle tuple parameters:

    Parameters

    • Default value __namedParameters: [number, undefined | IRGB] = [0]

    Returns void

Protected damageEntity

  • damageEntity(damage: number, deathMessage: Message, blood?: undefined | false | true): undefined | number
  • Parameters

    • damage: number
    • deathMessage: Message
    • Optional blood: undefined | false | true

    Returns undefined | number

deregister

  • deregister(): void
  • Emits the "deregister" event on this entity.

    final

    This method isn't meant to be overridden. If you need to run code on deregistration, subscribe to the "deregister" event.

    Returns void

getBadness

getDescription

  • Returns Translation

Protected getEffectRate

  • getEffectRate(): number
  • Returns number

getHighlight

  • Returns IHighlight | undefined

getIcon

getLevel

  • getLevel(): number
  • Returns the "level" of this status effect. Higher levels mean greater effects. A level of 0 means no effect. The default implementation of this method returns 1 if the effect is active, and 0 if it is not.

    Returns number

getOptions

getParticles

  • Gets the particle events for the given

    Parameters

    Returns [] | undefined

    A 2-value tuple describing the particle effect, or undefined if there should be no particles.

    Particle tuple parameters:

getRenderer

getTranslation

  • Returns Translation

isActive

  • isActive(): boolean
  • Returns boolean

Protected onPassed

  • onPassed(): void
  • Event handler for when the status effect passes.

    Returns void

Protected onTick

  • onTick(): void
  • Event handler for every tick that the human has the status effect.

    Returns void

refresh

  • refresh(): void
  • Returns void

register

  • register(): void
  • Returns void

remove

  • Parameters

    Returns this

Protected shouldPass

  • shouldPass(): boolean
  • Whether the status effect should pass (be removed from the human).

    Returns boolean

toggle

  • Parameters

    Returns this

Static getDefaultRenderer

Static update

  • Parameters

    Returns void

Generated using TypeDoc