Class Quest

Create a Quest.

Constructors

  • Parameters

    • id: string

      The unique id of the Quest.

    • _title: string | RawMessage

      Title of the QuestBook.

    • _body: string | RawMessage

      Body of the QuestBook.

    • options: QuestOptions

      Options of the quest.

    Returns Quest

Properties

_body: string | RawMessage

Body of the QuestBook.

_title: string | RawMessage

Title of the QuestBook.

form: MessageFormData = ...
id: string

The unique id of the Quest.

options: QuestOptions

Options of the quest.

Accessors

  • get body(): string | RawMessage
  • Returns string | RawMessage

  • set body(content): void
  • Parameters

    • content: string | RawMessage

    Returns void

  • get title(): string | RawMessage
  • Returns string | RawMessage

  • set title(content): void
  • Parameters

    • content: string | RawMessage

    Returns void

Methods

  • Let a player complete the quest and give award.

    Parameters

    • player: Player

    Returns void

  • Show form to a player.

    Parameters

    • player: Player
    • OptionalbackTo: QuestBook

      The screen player should return to after closing the form.

    Returns void

  • Check if a player has completed this quest.

    Parameters

    • player: Player

    Returns boolean

  • Registry the prop.

    Returns void

    Use Register.questRegistry() to registry the prop