Class PlayerShapeshiftEvent<RoomType>

Emitted when a player (who is a shapeshifter) shapeshifts into another player.

Type Parameters

Hierarchy

  • RevertableEvent
    • PlayerShapeshiftEvent

Implements

Properties

eventName: "player.shapeshift"
doAnimation: boolean

Whether or not to show an animation of the player shapeshifting.

duration: number

The duration, in seconds, for how long the player is shapeshifted for.

eventName: "player.shapeshift"
message: undefined | ProtectPlayerMessage

The message that this event originated from.

player: PlayerData<RoomType>

The player that this event is for.

reverted: boolean
room: RoomType

The room or client that the event came from.

target: PlayerData<RoomType>

The target that the player shapeshifted into.

Accessors

  • get alteredDoAnimation(): boolean
  • Whether or not to show an animation of the player shapeshifting instead, if altered.

    Returns boolean

  • get alteredTarget(): PlayerData<RoomType>
  • The player that the player will shapeshift into instead, if altered.

    Returns PlayerData<RoomType>

Constructors

  • Type Parameters

    Parameters

    • room: RoomType
    • player: PlayerData<RoomType>
    • message: undefined | ProtectPlayerMessage
    • target: PlayerData<RoomType>

      The target that the player shapeshifted into.

    • duration: number

      The duration, in seconds, for how long the player is shapeshifted for.

    • doAnimation: boolean

      Whether or not to show an animation of the player shapeshifting.

    Returns PlayerShapeshiftEvent<RoomType>

Methods

  • Returns void

  • Change whether or not an animation will show the player shapeshifting.

    Parameters

    • doAnimation: boolean

      Whether or not to do show an animation of the player shape shifting.

    Returns void

  • Change the player that the player will shapeshift into.

    Parameters

    • target: PlayerData<RoomType>

      The player to shapeshift into instead.

    Returns void

Generated using TypeDoc