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

  /**
   * @augments {adventurejs.Verb}
   * @class south
   * @ajsnode game.dictionary.verbs.south
   * @ajsconstruct MyGame.createVerb({ "name": "south", [...] });
   * @ajsconstructedby adventurejs.Dictionary#createVerb
   * @hideconstructor
   * @ajsinstanceof Verb
   * @ajsnavheading DirectionVerbs
   * @summary Verb meaning travel to south 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; south</span>
   * You tiptoe south through the field of sleeping Emperor Penguins...
   * alas, you crush one of their eggs, and they crush you in return.
   * </pre>
   * <p>
   * Direction verb: go <strong>south</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.south = {
    name: "south",
    is_direction: true,
    is_compass_direction: true,
    synonyms: ["south", "s", "southward"],
    adjectives: ["southern", "southerly", "southernly"],
    article: "the",
    type: { direction: true },

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

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