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

  /**
   * @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.WritingImplement.Chalk
   * @augments adventurejs.WritingImplement
   * @class adventurejs.Chalk
   * @ajsconstruct MyGame.createAsset({ "class":"Chalk", "name":"foo", [...] })
   * @ajsconstructedby adventurejs.Game#createAsset
   * @ajsnavheading WritingClasses
   * @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 A writing implement.
   * @classdesc
   * <p>
   * <strong>Chalk</strong> is a subclass of
   * {@link adventurejs.WritingImplement|WritingImplement}.
   * Chalk and other WritingImplements have
   * <code class="property">iov.write.enabled</code>
   * property set to true, which allows a player to write on things
   * with <code class="property">asset.dov.write.enabled</code>
   * set to true, such as {@link adventurejs.Paper|Paper}.
   * </p>
   * <p>
   * All that distinguishes Chalk from other WritingImplements
   * is that ...
   *
   * </p>
   * <h3 class="examples">Example:</h3>
   * <pre class="display"><code class="language-javascript">MyGame.createAsset({
   *   class: "Chalk",
   *   name: "stick of chalk",
   *   adjectives: [ "white" ],
   *   article: "a",
   *   place: { on: "table" },
   *   descriptions: { look: "It's an ordinary stick of white chalk. ", },
   * });
   * MyGame.createAsset({
   *   class: "Blackboard",
   *   name: "blackboard",
   *   descriptions: { look: "It's a large blackboard. ", },
   *   place: { in: "Schoolroom" },
   * });
   * </code></pre>
   * <p>
   * The above example uses
   * <code class="property">with_classes</code>
   * to limit what a
   * player can write on without having to write custom
   * failure code for every object. To learn more, see
   * <a href="/doc/Tangibles_Aspects.html">How to Use Aspects</a>.
   * </p>
   **/
  class Chalk extends adventurejs.WritingImplement {
    constructor(name, game_name) {
      super(name, game_name);
      this.class = "Chalk";

      this.noun = "chalk";
      this.plural = "chalk";
      this.singlePluralPairs = [["chalk", "chalk"]];
      this.group = ["writing implements"];
    }
  }
  adventurejs.Chalk = Chalk;
})();