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

  /**
   * @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.Container.LiquidContainer.Pitcher
   * @augments adventurejs.LiquidContainer
   * @class adventurejs.Pitcher
   * @ajsconstruct MyGame.createAsset({ "class":"Pitcher", "name":"foo", [...] })
   * @ajsconstructedby adventurejs.Game#createAsset
   * @ajsnavheading KitchenClasses
   * @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 My partner will high-dive into this ordinary glass o' water.
   * @classdesc
   * <p>
   * <strong>Pitcher</strong> is a subclass of
   * {@link adventurejs.LiquidContainer|LiquidContainer}.
   * Player can drink from it, pour from it, pour into it.
   * Authors can set a maximum volume / current volume
   * for Pitcher.
   * </p>
   * <h3 class="examples">Example:</h3>
   * <pre class="display"><code class="language-javascript">MyGame.createAsset({
   *   class: "Pitcher",
   *   name: "crystal pitcher",
   *   descriptions: { look: "It's a crystal pitcher. It goes with the set of drinking glasses. ", },
   *   appearance: { opacity = 0.1 },
   *   in: {
   *     vessel: {
   *       maxvolume: 5000,
   *       volume: 2500,
   *       substance_id: "water",
   *     },
   *   },
   * });
   * </code></pre>
   **/
  class Pitcher extends adventurejs.LiquidContainer {
    constructor(name, game_name) {
      super(name, game_name);
      this.class = "Pitcher";

      this.noun = "pitcher";
      this.plural = "pitchers";
      this.singlePluralPairs = [["pitcher", "pitcher"]];
      this.adjectives = [];

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

      // this.appearance.opacity = 0.1;
      this.aspects.in.vessel.maxvolume = 5000;
    }
  }
  adventurejs.Pitcher = Pitcher;
})();