Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// hover.js

(function () {
  /*global adventurejs A*/
  "use strict";

  /**
   * @augments {adventurejs.Verb}
   * @class hover
   * @ajsnode game.dictionary.verbs.hover
   * @ajsconstruct MyGame.createVerb({ "name": "hover", [...] });
   * @ajsconstructedby adventurejs.Dictionary#createVerb
   * @hideconstructor
   * @ajsinstanceof Verb
   * @ajsnavheading LocomotionVerbs
   * @summary Verb meaning hover over an asset, or travel in specified direction.
   * @tutorial Scripting_VerbSubscriptions
   * @tutorial Verbs_VerbAnatomy
   * @tutorial Verbs_VerbProcess
   * @tutorial Verbs_ModifyVerbs
   * @tutorial Verbs_WriteVerbs
   * @classdesc
   * <pre class="display border outline">
   * <span class="input">&gt; hover over glassy field</span>
   * You scoot your little hoverboard over the rapidly cooling lava,
   * coughing through the billowing steam clouds and flushed from
   * the rising heat.
   * </pre>
   * Hover extends core verb <a href="go.html">go</a>.
   * It checks whether "hover" is contextually available
   * before forwarding to "go" for further handling.
   * @ajsverbreactions
   * @ajsverbphases doBeforeTry, doAfterTry, doBeforeSuccess, doAfterSuccess
   */
  A.Preverbs.hover = {
    name: "hover",
    prettyname: "hover",
    past_tense: "hovered",
    synonyms: ["hover"],
    type: { locomotion: true, travel: true },
    extends: { go: true },

    player_must_be: {
      not_constrained: true,
      not_on_floor: true,
      not_nested_elsewhere: true,
      able_to_hover: true,
    },

    /**
     * @ajsverbstructures
     * @memberof hover
     */
    accepts_structures: [
      "verb",
      "verb noun",
      "verb preposition",
      "verb preposition noun",
      "verb noun preposition noun",
    ],

    /**
     * @memberof hover
     * @ajsverbphrase
     * phrase1:
     * {
     *   accepts_noun:true,
     *   noun_must_be:
     *   {
     *     known: true,
     *     tangible: true,
     *     present: true,
     *     visible: true,
     *     reachable: true,
     *   },
     *   accepts_preposition: true,
     * },
     */
    phrase1: {
      accepts_noun: true,
      noun_must_be: {
        known: true,
        tangible: true,
        present: true,
        visible: true,
        reachable: true,
      },
      accepts_preposition: true,
    },

    /**
     * @memberof hover
     * @ajsverbphrase
     * phrase2:
     * {
     *   accepts_noun:true,
     *   noun_must_be:
     *   {
     *     known: true,
     *     tangible: true,
     *     present: true,
     *     visible: true,
     *     reachable: true,
     *   },
     *   accepts_preposition: true,
     * },
     */
    phrase2: {
      accepts_noun: true,
      noun_must_be: {
        known: true,
        tangible: true,
        present: true,
        visible: true,
        reachable: true,
      },
      accepts_preposition: true,
    },

    /**
     * @memberof hover
     * @ajsverbparams
     * with_params: {},
     */
    with_params: {},

    do: function () {
      return this.game.dictionary.doVerb("go");
    },
  }; // END hover
})();