Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
// GlobalHour.js
(function () {
  /* global adventurejs A */

  /**
   * @ajspath adventurejs.Atom.Asset.GlobalAsset.GlobalConcept.GlobalHour
   * @augments adventurejs.Asset
   * @class adventurejs.GlobalHour
   * @ajsconstruct MyGame.createAsset({ "class":"GlobalHour", "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 "wait x hours".
   * @classdesc
   * <p>
   * <strong>GlobalHour</strong> is a special subclass of
   * {@link adventurejs.GlobalConcept|GlobalConcept}
   * used to handle player input such as 'wait 1 hour'.
   * Authors should not have to construct or modify this Asset.
   * </p>
   **/

  class GlobalHour extends adventurejs.GlobalConcept {
    constructor(name, game_name) {
      super(name, game_name);
      this.class = "GlobalHour";

      this.name = "hour";
      this.article = "an";
      this.definite_article = "an";
      this.is.time = true;

      this.is.abstract = true;
      this.is.intangible = true;
      this.is.information = true;

      this.descriptions.look = "It's an hour.";
      this.noun = "hour";
      this.plural = "hours";
      this.singlePluralPairs = [["hour", "hours"]];
    }
  }
  adventurejs.GlobalHour = GlobalHour;
})();