Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// fore.js
// OK 09 2023
(function () {
  /*global adventurejs A*/
  "use strict";

  /**
   * @augments {adventurejs.Verb}
   * @class fore
   * @ajsnode game.dictionary.verbs.fore
   * @ajsconstruct MyGame.createVerb({ "name": "fore", [...] });
   * @ajsconstructedby adventurejs.Dictionary#createVerb
   * @hideconstructor
   * @ajsinstanceof Verb
   * @ajsnavheading DirectionVerbs
   * @summary Verb meaning travel to fore 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; fore</span>
   * You travel fore to the prow of the boat, where you are crushed
   * by a caboose-sized chunk of ice that rolls off the looming iceberg.
   * </pre>
   * <p>
   * Direction verb: go <strong>fore</strong>.
   * To learn about {@link adventurejs.Exit|Exits},
   * see <a href="/doc/GetStarted_CreateAnExit.html">Create an Exit</a>.
   * </p>
   * @ajsverbphases doBeforeTry, doAfterTry, doBeforeSuccess, doAfterSuccess
   */
  A.Preverbs.fore = {
    name: "fore",
    is_direction: true,
    is_spatial_direction: true,
    synonyms: ["fore", "forward", "bow"],
    type: { direction: true },

    /**
     * @ajsverbstructures
     * @memberof fore
     */
    accepts_structures: ["verb"],

    doSuccess: function () {
      var input = this.game.getInput();
      this.game.tryTravel(this.name);
      return true;
    },
  };
})();