Skip to main content

Effect Commands

Apply and inspect player effects.

Members

effects

Gets all currently active effects on the player from multiple sources:
  • Direct effects assigned to the player
  • Effects from active states (buffs/debuffs)
  • Effects from equipped weapons and armor The returned array contains unique effects without duplicates.
  • Source: packages/server/src/Player/EffectManager.ts
  • Kind: property
  • Defined in: IEffectManager

Signature

Returns

Array of all active effects on the player

hasEffect

Check if the player has a specific effect Determines whether the player currently has the specified effect active. This includes effects from states, equipment, and temporary conditions. The effect system provides a flexible way to apply various gameplay restrictions and enhancements to the player.
  • Source: packages/server/src/Player/EffectManager.ts
  • Kind: method
  • Defined in: IEffectManager

Signature

Parameters

  • effect: string

Returns

true if the player has the effect, false otherwise

Examples

WithEffectManager

Effect Manager Mixin Provides effect management capabilities to any class. This mixin handles player effects including restrictions, buffs, and debuffs. Effects can come from various sources like states, equipment, and temporary conditions.
  • Source: packages/server/src/Player/EffectManager.ts
  • Kind: function

Signature

Parameters

  • Base: TBase

Returns

Extended class with effect management methods

Examples