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

  /**
   * @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.BladedWeapon.Axe
   * @augments adventurejs.BladedWeapon
   * @class adventurejs.Axe
   * @ajsconstruct MyGame.createAsset({ "class":"Axe", "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>Axe</strong> is a subclass of
   * {@link adventurejs.BladedWeapon|BladedWeapon} that
   * can be used to stab or hit.
   * </p>
   * <pre class="display"><code class="language-javascript">MyGame.createAsset({
   *   class: "Axe",
   *   name: "chopping axe",
   *   place: { in: "Weapons Locker" },
   * });
   * </code></pre>
   **/
  class Axe extends adventurejs.BladedWeapon {
    constructor(name, game_name) {
      super(name, game_name);
      this.class = "Axe";
      this.singlePluralPairs = [["axe", "axes"]];
      this.setIOVs(["kill", "hit"]); // stab, chop
    }
  }

  adventurejs.Axe = Axe;
})();