// Hole.js
(function () {
/*global adventurejs A*/
"use strict";
/**
* @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.Aperture.Hole
* @augments adventurejs.Aperture
* @class adventurejs.Hole
* @ajsconstruct MyGame.createAsset({ "class":"Hole", "name":"foo", [...] })
* @ajsconstructedby adventurejs.Game#createAsset
* @ajsnavheading DoorExitClasses
* @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 Big enough to climb through.
* @tutorial CreateExit
* @classdesc
* <p>
* <strong>Hole</strong> is a subclass of
* {@link adventurejs.Aperture|Aperture}. Holes are open
* by default and don't need to be locked or unlocked, though
* they can be sealed with a lid as in the subclass
* {@link adventurejs.Manhole|Manhole}.
* Holes are singular, meaning they only exist in one Room.
* To allow two-way travel between Rooms, you must have two
* Holes, each with its <a href="#linked_asset">linked_asset</a>
* property set to the other Hole. Following is an example
* with two Holes + Exits.
* </p>
* <h3 class="example">Example:</h3>
* <pre class="display"><code class="language-javascript">MyGame.createAsset({
* "class":"Exit",
* "direction":"down",
* "place":{ in: "Dungeon" },
* "destination":"Oubliette",
* "aperture":"dark hole"
* });
* MyGame.createAsset({
* "class":"Hole",
* "name":"dark hole",
* "direction":"down",
* "place":{ in: "Cave" },
* "linked_asset":"bright hole"
* });
* MyGame.createAsset({
* "class":"Exit",
* "direction":"up",
* "place":{ in: "Oubliette" },
* "destination":"Dungeon",
* "aperture":"bright hole"
* });
* MyGame.createAsset({
* "class":"Hole",
* "name":"bright hole",
* "place":{ in: "Oubliette" },
* "direction":"up",
* "linked_asset":"dark hole"
* });
* </code></pre>
**/
class Hole extends adventurejs.Aperture {
constructor(name, game_name) {
super(name, game_name);
this.class = "Hole";
this.noun = "hole";
this.plural = "holes";
this.singlePluralPairs = [["hole", "holes"]];
//this.adjectives = "";
}
}
adventurejs.Hole = Hole;
})();