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

  /**
   * @ajspath adventurejs.Atom.Asset.GlobalAsset.GlobalNothing
   * @augments adventurejs.GlobalAsset
   * @class adventurejs.GlobalNothing
   * @ajsconstruct MyGame.createAsset({ "class":"GlobalNothing", "name":"foo", [...] })
   * @ajsconstructedby adventurejs.Game#createAsset
   * @ajsinternal
   * @ajsnavheading LibraryAssets
   * @param {String} game_name The name of the top level game object.
   * @param {String} name A name for the object, to be serialized and used as ID.
   * @summary Special class to handle the word 'nothing'.
   * @todo This isn't complete, is it?
   * @classdesc
   * <p>
   * <strong>GlobalNothing</strong> is a subclass of
   * {@link adventurejs.GlobalAsset|GlobalAsset} used to
   * catch player input such as 'take nothing'. Authors
   * should not have to construct or modify this Asset.
   * </p>
   **/
  class GlobalNothing extends adventurejs.GlobalAsset {
    constructor(name, game_name) {
      super(name, game_name);
      this.class = "GlobalNothing";

      this.descriptions.look = "It's nothing.";
      this.noun = "nothing";
      this.plural = "nothings";
      this.singlePluralPairs = [["nothing", "nothings"]];
    }
  }

  adventurejs.GlobalNothing = GlobalNothing;
})();