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

  /**
   * @augments {adventurejs.Verb}
   * @class xyzzy
   * @ajsnode game.dictionary.verbs.xyzzy
   * @ajsconstruct MyGame.createVerb({ "name": "xyzzy", [...] });
   * @ajsconstructedby adventurejs.Dictionary#createVerb
   * @hideconstructor
   * @ajsinstanceof Verb
   * @ajsnavheading UtilityVerbs
   * @summary Verb that performs an arbitrary action.
   * @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; xyzzy</span>
   * A hollow voice says 'fool'.
   * </pre>
   * <p>
   * If you don't know what it means, ask an old gamer. You'll make their day.
   * </p>
   */
  A.Preverbs.xyzzy = {
    name: "xyzzy",
    prettyname: "xyzzy",
    synonyms: [],
    verb_prep_noun: [],
    verb_prep_prep_noun: [],
    verb_noun_prep_noun: [],

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

    do: function () {
      var input = this.game.getInput();
      console.log("verbs.do");
      var msg = "Clever xyzzy response! ";
      if (msg) this.game.print(msg, input.output_class);
      return true;
    },
  };
})();