# Effect Commands


# Has Effect

  • Method: player.hasEffect(effect)
  • Arguments:
    • { Effect} effect. (Optional: false)
  • Return: boolean
  • Usage:
import { Effect } from '@rpgjs/server'

const bool = player.hasEffect(Effect.CAN_NOT_SKILL)

# Get Effects

  • Property: player.effects
  • Type: Array< Effect>
  • Optional: false
  • Usage:

Retrieves a array of effects assigned to the player, state effects and effects of weapons and armors equipped with the player's own weapons.

console.log(player.effects)

# Set Effects

  • Property: player.effects
  • Type: Array< Effect>
  • Optional: false
  • Usage:

Assigns effects to the player. If you give a array, it does not change the effects of the player's states and armor/weapons equipped.

import { Effect } from '@rpgjs/server'

player.effects = [Effect.CAN_NOT_SKILL]