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

  /**
   * @ajspath AdventureJS.Atom.Asset.Matter.Tangible.Thing.Handtool.Shovel
   * @augments AdventureJS.Assets.Handtool
   * @class AdventureJS.Assets.Shovel
   * @ajsconstruct MyGame.createAsset({ "class":"Shovel", "name":"foo", [...] })
   * @ajsconstructedby AdventureJS.Game#createAsset
   * @ajsnavheading ToolClasses
   * @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 Lockpicks can be used to pick locks.
   * @classdesc
   * <p>
   * <strong>Shovel</strong> is a subclass of
   * {@link AdventureJS.Assets.Handtool|Handtool} that
   * can be used to dig or hit.
   * </p>
   * <pre class="display"><code class="language-javascript">MyGame.createAsset({
   *   class: "Shovel",
   *   name: "trench shovel",
   *   place: { in: "Garden Shed" },
   * });
   * </code></pre>
   **/
  class Shovel extends AdventureJS.Assets.Handtool {
    constructor(name, game_name, context_id = "", id = "") {
      super(name, game_name, context_id, id);
      this.class = "Shovel";
      this.singularPluralPairs = [["shovel", "shovels"]];
      this.setIOVs(["dig", "hit"]);
    }
  }

  AdventureJS.Assets.Shovel = Shovel;
})();