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

  /**
   * @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.Edible
   * @augments adventurejs.Thing
   * @class adventurejs.Edible
   * @ajsconstruct MyGame.createAsset({ "class":"Edible", "name":"foo", [...] })
   * @ajsconstructedby adventurejs.Game#createAsset
   * @ajsnavheading MiscAssetClasses
   * @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 Trick or treat, give me something good to eat.
   * @classdesc
   * <p>
   * <strong>Edible</strong> can be eaten.
   * </p>
   **/
  class Edible extends adventurejs.Thing {
    constructor(name, game_name) {
      super(name, game_name);
      this.class = "Edible";

      this.setDOVs(["eat", "take", "give", "put"]);
    }
  }

  adventurejs.Edible = Edible;
})();