Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
// NounPrefers.js
(function () {
  /* global AdventureJS A */

  /**
   * @class AdventureJS.Dictionary.NounPrefers
   * @ajsinternal
   * @ajsnavheading DictionaryClasses
   * @summary Dictionary class, used as a property of a verb phrase, that sets conditions that are preferred in cases of disambigutation.
   * @classdesc
   * <p>
   * <strong>NounPrefers</strong> is a special class
   * used while parsing {@link AdventureJS.Parser.Input|Input}
   * to specify general conditions that are preferred in cases
   * of disambiguation. This is a narrower set of preferences
   * than those in NounPrefers, that when game.parser.handleSentence
   * receives multiple qualified assets.
   * Exclusion is handled by
   * {@link AdventureJS.Parser#handleSentence|Parser.handleSentence}.
   * This is an internal class
   * that authors should not need to construct, though there are
   * methods to allow authors to customize these settings
   * per Verb. See
   * <a href="/doc/AdvancedVerbs_ModifyVerbs.html">Modify Verbs</a>
   * for more info.
   * </p>
   */
  class NounPrefers {
    constructor() {
      /**
       * If true, on finding ambiguous assets, Verb will prefer
       * assets that are present in the current {@link AdventureJS.Assets.Room|Room}
       * @var {Boolean} AdventureJS.Dictionary.NounPrefers#present
       * @default false
       */
      this.present = false;

      /**
       * If true, on finding ambiguous assets, Verb will prefer
       * assets that are outside of the current {@link AdventureJS.Assets.Room|Room}
       * @var {Boolean} AdventureJS.Dictionary.NounPrefers#absent
       * @default false
       */
      this.absent = false;

      /**
       * If true, on finding ambiguous assets, Verb will prefer
       * assets that are carried by player.
       * @var {Boolean} AdventureJS.Dictionary.NounPrefers#carried
       * @default false
       */
      this.carried = false;

      /**
       * If true, on finding ambiguous assets, Verb will prefer
       * assets that are not carried by player.
       * @var {Boolean} AdventureJS.Dictionary.NounPrefers#uncarried
       * @default false
       */
      this.uncarried = false;

      /**
       * If true, on finding ambiguous assets, Verb will prefer
       * assets that are dispensers of fungibles rather than fungibles.
       * @var {Boolean} AdventureJS.Dictionary.NounPrefers#dispenser
       * @default false
       */
      this.dispenser = false;

      /**
       * If true, on finding ambiguous assets, Verb will prefer
       * assets that are fungibles rather than dispensers of fungibles.
       * @var {Boolean} AdventureJS.Dictionary.NounPrefers#fungible
       * @default false
       */
      this.fungible = false;
    }
  }

  AdventureJS.Dictionary.NounPrefers = NounPrefers;
})();