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

  /**
   * @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.OpticalDevice.Binoculars
   * @class adventurejs.Binoculars
   * @augments adventurejs.OpticalDevice
   * @ajsconstruct MyGame.createAsset({ "class":"Binoculars", "name":"foo", [...] })
   * @ajsconstructedby adventurejs.Game#createAsset
   * @ajsnavheading OpticalClasses
   * @param {String} name A name for the object, to be serialized and used as ID.
   * @param {String} game_name The name of the top level game object.
   * @summary Curse this blasted balcony seat.
   * @tutorial Tangibles_AboutTangibles
   * @classdesc
   * <p>
   * <strong>Binoculars</strong> is a subclass of
   * {@link adventurejs.OpticalDevice|OpticalDevice},
   * which can be looked through or with via
   * <code>iov.look</code>.
   * </p>
   * <p>
   * Authors might find the distinction between
   * "look through" and "look with" unnecessary, in which case it's
   * possible to combine these verbs or disable one or the other.
   * To learn more, see
   * <a href="/doc/Verbs_ModifyVerbs.html">Modify Verbs</a>
   * </p>
   * <h3 class="examples">Example:</h3>
   * <pre class="display"><code class="language-javascript">MyGame.createAsset({
   *   class: "Binoculars",
   *   name: "binoculars",
   *   descriptions: { look: "I call them my 'birdnoculars'. Because they're for birding. Heh. ", },
   *   place: { in: "desk drawer" },
   * });
   * </code></pre>
   **/
  class Binoculars extends adventurejs.OpticalDevice {
    constructor(name, game_name) {
      super(name, game_name);
      this.class = "Binoculars";

      this.singlePluralPairs = [["binoculars", "binoculars"]];
      this.must.be_in_hands_to_look_through = true;
    }
  }
  adventurejs.Binoculars = Binoculars;
})();