Adventure.js Docs Downloads
Score: 0 Moves: 0

Exit: global_exit

Instance of: adventurejs.Exit

Defined in: adventure/assets/tangibles/exits/GlobalExitExit.js, line 9

How to: UseBuiltInScenery

Runtime node: game.world.global_exit

global_exit is an instance of Exit. GlobalExits provide a way to return an error message when a player tries to travel in a direction that has no Exit. Messages can be customized by Room, by Zone, or for the entire Game. GlobalExit objects are enabled by default, but can be disabled or customized, as in the examples below.

Example:

Here's an example of how to set GlobalExit descriptions per Room. Though global Assets are, in fact, global, the descriptions you set for them in a Room are local to that Room, so that each Room can set different descriptions. Room settings take precedence over Zone settings or global settings.

MyGame.createAsset({
  class: "Room",
  name: "Middleditch",
  exits: 
  {
    north: "Northditch",
    south: "Southditch",
  }
  room_scenery: 
  {
    global_east: { enabled: true, description: "The walls of the ditch block passage. ", },
    global_west: { enabled: true, description: "You can't climb the steep ditch walls. ", },
  }
});

Here's an example of how to set GlobalExit descriptions per Zone. Zones can be shared by multiple Rooms. Room settings take precedence over Zone settings, and Zone settings take precedence over global settings.

MyGame.createAsset({
  class: "Zone", 
  name: "Outside Moria",
  zone_scenery: 
  {
    global_north: { 
      enabled: true, 
      description: "Passage to the north is blocked by a vertical cliff face. ",
    },
    global_south: { 
      enabled: true, 
      description: "The waters to the south are unpassable due to the watcher in the water. ",
    },
  },
});
MyGame.createAsset({
  class: "Room",
  name: "Thin Sandy Shore",
  zone: "Outside Moria",
  descriptions: { 
    look: "You feel eyes upon you as you traverse this thin sandy shore 
    between the cliff face and the murky lake. ", 
  },
  exits: {
    west: "Western edge of shore",
    east: "Eastern edge of shore"
  },
});

Here's an example of how to set GlobalExit descriptions for anywhere in the game. These will be presented in every Room, unless overridden by Zone or Room settings.

MyGame.setGlobalDescriptions({
  global_up: { enabled: true, description: "Until you learn to fly, there's no way up. ", },
  global_down: { enabled: true, description: "You smoosh your face against the ground. ", },
});

To learn more, see How to Use Built-in Scenery.

Private Constructor:

MyGame.createGlobalExits({ "name": "global_exit", [...] });

global_exit is a predefined instance of Exit that gets constructed automatically at runtime. It is defined in the library as a generic object, and then passed to Game#createGlobalExits for construction, validation, and initialization. Because this is predefined, authors should not need to create new instances. For information on modifying global Exits, see How to Use Built-in Scenery.

GlobalExit are instances of adventurejs.Exit (and not a unique global class). Global assets can be referenced from anywhere in the game world and exist primarily to catch player inputs that refer to things that might be present, but aren't. For example, if a player enters "examine east exit" in a room which hasn't got one.

Authors can modify global_exit via their game files through the use of adventurejs.Game#setGlobalDescriptions.

Inherited Overrides
IndexMethodsProperties

Index

Methods:

Properties:

Methods Collapse all  |  Expand all

$is(property, asset)

Defined in: adventure/assets/tangible/$is.js, line 6

Inherited from: adventurejs.Tangible#$is

Todos: Leaving open the possibility for other params.

Parameters:

  • property String
  • asset Object
$is() is a convenience method for authors that provides an easy way to test for various conditions.
  • assetA.$is("in", assetB)
    accepts any preposition, asking, is this asset in that aspect of that asset?
  • assetA.$is("nested in", assetB)
    nested in, specific to character classes, asking, is this asset nested in that asset?
  • assetA.$is("closed")
    asking, is this asset closed?
  • assetA.$is("locked")
    asking, is this asset locked?
  • assetA.$is("plugged")
    asking, is this asset plugged?
  • assetA.$is("sealed")
    asking, is this asset sealed?
  • assetA.$is("held", assetB)
    asking, is this asset held by that asset, as in a bannister held by player?
  • assetA.$is("holding", assetB)
    asking, is this asset holding that asset, as in player holding a rope?
  • assetA.$is("worn")
    asking, is this asset being worn?
  • assetA.$is("zipped")
    asking, is this asset zipped?
  • assetA.$is("open")
    asking, is this asset open?
  • assetA.$is("unlocked")
    asking, is this asset unlocked?
  • assetA.$is("unplugged")
    asking, is this asset unplugged?
  • assetA.$is("unsealed")
    asking, is this asset unsealed?
$moveTo(aspect, asset)

Defined in: adventure/assets/tangible/$moveTo.js, line 6

Inherited from: adventurejs.Tangible#$moveTo

Parameters:

  • aspect String
  • asset Object
$moveTo is an author shortcut that is similar to moveTo but which bypasses onMoveThatToThis, avoiding the consequences of any verb event hooks.
addAssetAt() → {Array}

Defined in: adventure/assets/tangible/addAssetAt.js, line 6

Inherited from: adventurejs.Tangible#addAssetAt

Add specified asset id to the contents of specified aspect on this asset. Returns contents if aspect exists, or null.

Returns:

Array
addWordsToLookup(allTheWords, typeOfWord)

Defined in: adventure/asset/addWordsToLookup.js, line 6

Inherited from: adventurejs.Asset#addWordsToLookup

Parameters:

  • allTheWords Array
  • typeOfWord String
addWordsToLookup() takes words associated with this asset and adds them to the global lookup table.
aliases()

Defined in: adventure/Asset.js, line 951

Inherited from: adventurejs.Asset#aliases

aliases() is a collection of method names that are meant for authors to use. Since they don't exist on all classes, we set up these aliases so that, if authors call them on classes they're not applicable to, they will politely return null instead of throwing a "not a function" error.
areAnscestorsClosed() → {Boolean}

Defined in: adventure/assets/tangible/areAnscestorsClosed.js, line 6

Inherited from: adventurejs.Tangible#areAnscestorsClosed

Checks to see if this asset's containing parent(s) is closed. Takes into account nesting doll situations and looks all the way up the chain. Useful for determining whether a player can interact with a nested object.

Returns:

Boolean
areAnscestorsKnown() → {Boolean}

Defined in: adventure/assets/tangible/areAnscestorsKnown.js, line 6

Inherited from: adventurejs.Tangible#areAnscestorsKnown

Checks to see if this asset and its containing parent(s) are known to player. Takes into account nesting doll situations and looks all the way up the chain. Useful for determining whether a player can "see" a nested object.

Returns:

Boolean
areAnscestorsOpen() → {Boolean}

Defined in: adventure/assets/tangible/areAnscestorsOpen.js, line 6

Inherited from: adventurejs.Tangible#areAnscestorsOpen

Checks to see if this asset's containing parent(s) is open. Takes into account nesting doll situations and looks all the way up the chain. Useful for determining whether a player can interact with a nested object.

Returns:

Boolean
areAnscestorsUnknown(nestlevel) → {Boolean}

Defined in: adventure/assets/tangible/areAnscestorsUnknown.js, line 6

Inherited from: adventurejs.Tangible#areAnscestorsUnknown

Parameters:

  • nestlevel int
Checks to see if this asset or its containing parent(s) are unknown to player. Takes into account nesting doll situations and looks all the way up the chain. Useful for determining whether a player can "see" a nested object.

Returns:

Boolean
canBePlacedInAspectOfAsset(aspect, asset) → {Boolean}

Defined in: adventure/assets/tangible/canBePlacedInAspectOfAsset.js, line 6

Inherited from: adventurejs.Tangible#canBePlacedInAspectOfAsset

Parameters:

  • aspect String
  • asset Object
Check whether this asset can be placed within the specified aspect of the specified asset. This takes into account the with_assets and with_classes properties.

Returns:

Boolean
canContainAnySubstance() → {Boolean}

Defined in: adventure/assets/tangible/canContainAnySubstance.js, line 6

Inherited from: adventurejs.Tangible#canContainAnySubstance

Determine whether asset can contain any substance.

Returns:

Boolean
canContainAssetAt(object) → {Boolean}

Defined in: adventure/assets/tangible/canContainAssetAt.js, line 6

Inherited from: adventurejs.Tangible#canContainAssetAt

Parameters:

  • object Object
Check whether this asset can be attached to specified other asset.

Returns:

Boolean
canPlayerNest(aspect) → {Boolean}

Defined in: adventure/assets/tangible/canPlayerNest.js, line 9

Inherited from: adventurejs.Tangible#canPlayerNest

Parameters:

  • aspect String
    A Tangible Aspect ID.
Ask if player can nest in an aspect of this asset.

Returns:

Boolean
canPlayerReachThatFromThis(object) → {Boolean}

Defined in: adventure/assets/tangible/canPlayerReachThatFromThis.js, line 6

Inherited from: adventurejs.Tangible#canPlayerReachThatFromThis

Parameters:

  • object Object
Check whether that asset can be reached by player when nested in this asset.

Returns:

Boolean
canSetVerbState(verb) → {Boolean}

Defined in: adventure/asset/canSetVerbState.js, line 6

Inherited from: adventurejs.Asset#canSetVerbState

Parameters:

  • verb String
canSetVerbState is a method to check whether the specified verb can set state on this asset. Assumes that asset.is.direct_object_of_verb[verb].enabled is true

Returns:

Boolean
destroy()

Defined in: adventure/assets/Tangible.js, line 2151

Inherited from: adventurejs.Tangible#destroy

Todos: What else needs to happen on destroy?

Remove this asset from the world before calling superclass.destroy.
didDoVerbs(verbs) → {Boolean}

Defined in: adventure/asset/didDoVerbs.js, line 6

Inherited from: adventurejs.Asset#didDoVerbs

Parameters:

  • verbs Array
didDoVerbs check whether any of the specified verbs has ever been applied to the asset as a direct object. This is a convenience method that relies on asset.DOVdidDo()

Returns:

Boolean
didIoVerbs(verbs) → {Boolean}

Defined in: adventure/asset/didIoVerbs.js, line 6

Inherited from: adventurejs.Asset#didIoVerbs

Parameters:

  • verbs Array
didIoVerbs check whether any of the specified verbs has ever been applied to the asset as an indirect object. This is a convenience method that relies on asset.IOVdidDo()

Returns:

Boolean
doesContainAnyAsset() → {Boolean}

Defined in: adventure/assets/tangible/doesContainAnyAsset.js, line 6

Inherited from: adventurejs.Tangible#doesContainAnyAsset

Check whether this asset contains any assets.

Returns:

Boolean
doesContainAnyAssetAt(aspect) → {Boolean}

Defined in: adventure/assets/tangible/doesContainAnyAssetAt.js, line 6

Inherited from: adventurejs.Tangible#doesContainAnyAssetAt

Parameters:

  • aspect String
Check whether this asset contains any assets.

Returns:

Boolean
doesContainAnySubstance() → {Boolean}

Defined in: adventure/assets/tangible/doesContainAnySubstance.js, line 6

Inherited from: adventurejs.Tangible#doesContainAnySubstance

Check whether this asset contains any substance.

Returns:

Boolean
doesContainAnySubstanceAt(aspect) → {Boolean}

Defined in: adventure/assets/tangible/doesContainAnySubstanceAt.js, line 6

Inherited from: adventurejs.Tangible#doesContainAnySubstanceAt

Parameters:

  • aspect String
Check whether this asset contains any substance at specified aspect.

Returns:

Boolean
doesContainAsset(id) → {String}

Defined in: adventure/assets/tangible/doesContainAsset.js, line 6

Inherited from: adventurejs.Tangible#doesContainAsset

Parameters:

  • id String
Check whether this asset contains the specified asset.

Returns:

String
doesContainAssetAt(id, aspect) → {Boolean}

Defined in: adventure/assets/tangible/doesContainAssetAt.js, line 6

Inherited from: adventurejs.Tangible#doesContainAssetAt

Parameters:

  • id String
  • aspect String
Check whether this asset contains the specified asset at the specified aspect.

Returns:

Boolean
doesContainSubstance(id) → {String}

Defined in: adventure/assets/tangible/doesContainSubstance.js, line 6

Inherited from: adventurejs.Tangible#doesContainSubstance

Parameters:

  • id String
Check whether this asset contains the specified substance.

Returns:

String
doesContainSubstanceAt(id, aspect) → {Boolean}

Defined in: adventure/assets/tangible/doesContainSubstanceAt.js, line 6

Inherited from: adventurejs.Tangible#doesContainSubstanceAt

Parameters:

  • id String
  • aspect String
Check whether this asset contains the specified substance.

Returns:

Boolean
DOVallowOnce(verb) → {Boolean}

Defined in: adventure/asset/DOVallowOnce.js, line 6

Inherited from: adventurejs.Asset#DOVallowOnce

Parameters:

  • verb String
DOVallowOnce is a method to check whether this asset is subscribed to allow the specified verb to act on it as a direct object only once.

Returns:

Boolean
DOVallowWithAnything(verb) → {Boolean}

Defined in: adventure/asset/DOVallowWithAnything.js, line 6

Inherited from: adventurejs.Asset#DOVallowWithAnything

Parameters:

  • verb String
DOVallowWithAnything is a method to check whether this asset is subscribed to act as a direct object with the specified verb without any direct object.

Returns:

Boolean
DOVallowWithAsset(verb, asset) → {Boolean}

Defined in: adventure/asset/DOVallowWithAsset.js, line 6

Inherited from: adventurejs.Asset#DOVallowWithAsset

Parameters:

  • verb String
  • asset Object
DOVallowWithAsset is a method to check whether this asset is subscribed to act as a direct object with the specified verb and indirect object.

Returns:

Boolean
DOVallowWithNothing(verb) → {Boolean}

Defined in: adventure/asset/DOVallowWithNothing.js, line 6

Inherited from: adventurejs.Asset#DOVallowWithNothing

Parameters:

  • verb String
DOVallowWithNothing is a method to check whether this asset is subscribed to act as a direct object with the specified verb without any indirect object. For example, "plug in computer" where when an outlet is implied but not defined.

Returns:

Boolean
DOVdidDo(verb) → {Boolean}

Defined in: adventure/asset/DOVdidDo.js, line 6

Inherited from: adventurejs.Asset#DOVdidDo

Parameters:

  • verb String
DOVdidDo is a method to check whether this asset was already used as a direct objecb by the specified verb.

_didDo is an alias meant for authors.

Returns:

Boolean
DOVdidDoCount(verb) → {Int}

Defined in: adventure/asset/DOVdidDoCount.js, line 6

Inherited from: adventurejs.Asset#DOVdidDoCount

Parameters:

  • verb String
DOVdidDoCount is a method to get a count of times this asset was used as a direct object by the specified verb.

_doCount is an alias meant for authors.

Returns:

Int
DOVdidTry(verb) → {Boolean}

Defined in: adventure/asset/DOVdidTry.js, line 6

Inherited from: adventurejs.Asset#DOVdidTry

Parameters:

  • verb String
DOVdidTry is a method to check whether it was attempted to use this asset as a direct object by the specified verb.

_didTry is an alias meant for authors.

Returns:

Boolean
DOVdidTryCount(verb) → {Boolean}

Defined in: adventure/asset/DOVdidTryCount.js, line 6

Inherited from: adventurejs.Asset#DOVdidTryCount

Parameters:

  • verb String
DOVdidTryCount is a method to get a count of times it was tried to use this asset as a direct object by the specified verb.

_tryCount is an alias meant for authors.

Returns:

Boolean
DOVgetConnectionCount(verb) → {Int}

Defined in: adventure/asset/DOVgetConnectionCount.js, line 6

Inherited from: adventurejs.Asset#DOVgetConnectionCount

Parameters:

  • verb String
    The name of a verb.
Return this.is.direct_object_of_verb[verb].with_params.connections.length

Returns:

Int
DOVgetConnections(verb) → {Array}

Defined in: adventure/asset/DOVgetConnections.js, line 6

Inherited from: adventurejs.Asset#DOVgetConnections

Parameters:

  • verb String
    The name of a verb.
Return this.is.direct_object_of_verb[verb].with_params.connections

Returns:

Array
DOVgetMaxConnections(verb) → {Int}

Defined in: adventure/asset/DOVgetMaxConnections.js, line 6

Inherited from: adventurejs.Asset#DOVgetMaxConnections

Parameters:

  • verb String
    The name of a verb.
Return this.is.direct_object_of_verb[verb].with_params.max_connections

Returns:

Int
DOVhasIndirectObjects(verb) → {Boolean}

Defined in: adventure/asset/DOVhasIndirectObjects.js, line 6

Inherited from: adventurejs.Asset#DOVhasIndirectObjects

Parameters:

  • verb String
DOVhasIndirectObjects is a method to check whether this asset has any particular indirect objects specified by the author for use with the specified verb.

Returns:

Boolean
DOVhasMaxConnections(verb) → {Boolean}

Defined in: adventure/asset/DOVhasMaxConnections.js, line 6

Inherited from: adventurejs.Asset#DOVhasMaxConnections

Parameters:

  • verb String
    The name of a verb.
Get whether the DOV has maximum connections.

Returns:

Boolean
DOVincrementDoCount(verb)

Defined in: adventure/asset/DOVincrementDoCount.js, line 6

Inherited from: adventurejs.Asset#DOVincrementDoCount

Parameters:

  • verb String
DOVincrementDoCount is a method to increment the number of times the specified verb has acted on this asset as a direct object.
DOVincrementTryCount(verb)

Defined in: adventure/asset/DOVincrementTryCount.js, line 6

Inherited from: adventurejs.Asset#DOVincrementTryCount

Parameters:

  • verb String
DOVincrementTryCount is a method to increment the number of times the specified verb has been tried on this asset as a direct object.
DOVisConnectedToAnything(verb) → {Boolean}

Defined in: adventure/asset/DOVisConnectedToAnything.js, line 6

Inherited from: adventurejs.Asset#DOVisConnectedToAnything

Parameters:

  • verb String
    The name of a verb.
Check whether this asset is currently connected to anything directly by a verb such as plugIn or tie. For example, if this asset is a computer plugged into an outlet, this method would return true.

Returns:

Boolean
DOVisConnectedToAsset(verb, asset) → {Boolean}

Defined in: adventure/asset/DOVisConnectedToAsset.js, line 6

Inherited from: adventurejs.Asset#DOVisConnectedToAsset

Parameters:

  • verb String
    The name of the verb to test.
  • asset Object | String
    A game asset or asset id to test.
Check whether this asset is currently connected as a direct object to the specified indirect object by the specified verb. For example, in the case of a computer plugged into an outlet, the computer would be the direct object, and calling this method on it would return true.

Returns:

Boolean
DOVisConnectedToNothing(verb) → {Boolean}

Defined in: adventure/asset/DOVisConnectedToNothing.js, line 6

Inherited from: adventurejs.Asset#DOVisConnectedToNothing

Parameters:

  • verb String
    The name of a verb.
Check whether this asset is currently connected as an indirect object to nothing by the specified verb. For example, in the case of a computer that can be plugged in, an author might prefer not to create a specific outlet into which to plug the computer. For that case we allow 'plug in computer', and store a null value to asset.is.direct_object_of_verb.plugIn.with_params.connections to represent the computer's plugged in state.

Returns:

Boolean
DOVsetConnection(verb, asset)

Defined in: adventure/asset/DOVsetConnection.js, line 6

Inherited from: adventurejs.Asset#DOVsetConnection

Parameters:

  • verb String
  • asset Object
Set asset's direct verb param connection to specified indirect object.
DOVsetWithAsset(verb, asset) → {Boolean}

Defined in: adventure/asset/DOVsetWithAsset.js, line 6

Inherited from: adventurejs.Asset#DOVsetWithAsset

Parameters:

  • verb String
  • asset Object
DOVsetWithAsset is used to specify another asset that can be used as an indirect object with this asset as direct object. For example, if this asset is a locking chest, chest.DOVsetWithAsset('unlock', 'gold key') would add the gold key as an indirect object of the chest.

Returns:

Boolean
DOVsetWithClass(verb, clas) → {Boolean}

Defined in: adventure/asset/DOVsetWithClass.js, line 6

Inherited from: adventurejs.Asset#DOVsetWithClass

Parameters:

  • verb String
  • clas String
DOVsetWithClass is a method to add an indirect object class to asset.is.direct_object_of_verb[verb].with_classes.

Returns:

Boolean
DOVunsetConnection(verb, asset)

Defined in: adventure/asset/DOVunsetConnection.js, line 6

Inherited from: adventurejs.Asset#DOVunsetConnection

Parameters:

  • verb String
  • asset Object
Unset asset's direct verb param connection to specified indirect object.
event_hooks()

Defined in: adventure/assets/Tangible.js, line 1498

Inherited from: adventurejs.Tangible#event_hooks

Todos: move all this!

Allow authors to insert custom logic on a per-asset basis, when specified assets react to being manipulated by verbs. To use, create a key/value pair for each asset you wish to insert logic for, where the key is the name of the other asset and the value is an anonymous function, as in this example:
MyGame.createAsset({
  class: "Bicycle",// THIS asset to be nested to
  name: "bicycle",
  event_hooks: {
    onNestThatToThis: {
      "Mighty Hero": function(params){ // THAT asset to be nested 
        MyGame.prependToNextPrint("You wobble a bit getting on the bike. ");
        MyGame.appendToNextPrint("Success! ");
      }
    },
  },
});
This example only adds some text to the output for the turn, but overrides can be used to add any kind of logic. Here's are some of the reactions that can be overriden:
  • onMoveThatToThis - when that asset is moved to this asset
  • onRemoveThisFromThat - when this asset is removed from that asset
  • onRemoveThatFromThis - when that asset is removed from this asset
  • onMoveThisToThat - when this asset is moved to that asset
  • onNestThatToThis - when that character is nested to this asset
  • onNestThisToThat - when this character is nested to that asset
  • onUnnestThatFromThis - when that character is unnested from this asset
  • onUnnestThisFromThat - when this character is unnested from that asset
  • onSubtractSubstanceFromThis - when a substance is subtracted from this asset
  • onAddSubstanceToThis - when a substance is added to this asset
  • onDestroyThis - when this asset is removed from the game
  • onChangeMoisture - when this asset is moistened
  • onChangeTemperature - when this asset is subjected to a change in temperature
  • onChangeGravity - when this asset is subjected to a change in gravity
  • onTieThisToThat - when this asset is tied to that asset
  • onTieThatToThis - when that asset is tied to this asset
  • onUntieThisFromThat - when this asset is untied from that asset
  • onUntieThatFromThis - when that asset is untied from this asset
  • onTurnThis - when this asset is turned
  • onTurnThisWithThat - when this asset is turned with that asset
  • onTurnThatWithThis - when that asset is turned with this asset
  • onLetGoThis - when player lets go of this asset
  • onHoldThis - when player holds this asset
  • onDrinkThis - when this asset is drunk
  • onDrinkFromThis - when this asset is drunk from
  • get(property, qualifier)

    Defined in: adventure/assets/tangible/$get.js, line 6

    Inherited from: adventurejs.Tangible#get

    Parameters:

    • property String
    • qualifier String
    Utility function that provides an easy way for authors to test for various conditions.
    • all - list things anywhere in this
    • behind - list things behind this
    • in - list things in this
    • on - list things on this
    • under - list things under this
    • attached - list things attached to this
    getAllContents() → {Array}

    Defined in: adventure/assets/tangible/getAllContents.js, line 6

    Inherited from: adventurejs.Tangible#getAllContents

    Returns an array of all content in any location

    Returns:

    Array
    getAllNestedContents() → {Array}

    Defined in: adventure/assets/tangible/getAllNestedContents.js, line 6

    Inherited from: adventurejs.Tangible#getAllNestedContents

    Get list of other assets nested within this one.

    Returns:

    Array
    getAncestorId() → {String}

    Defined in: adventure/assets/tangible/getAncestorId.js, line 6

    Inherited from: adventurejs.Tangible#getAncestorId

    Get the ID of this asset's topmost parent, excluding Room.

    Returns:

    String
    getAnySubstanceThisContains() → {String}

    Defined in: adventure/assets/tangible/getAnySubstanceThisContains.js, line 6

    Inherited from: adventurejs.Tangible#getAnySubstanceThisContains

    Get the substance, if any, contained in this asset.

    Returns:

    String
    getAspectAt(aspect) → {Object|Null}

    Defined in: adventure/assets/tangible/getAspectAt.js, line 6

    Inherited from: adventurejs.Tangible#getAspectAt

    Parameters:

    • aspect string
      The aspect to get.
    Get aspect at specified preposition.

    Returns:

    Object | Null
    getAspectWithVessel() → {String}

    Defined in: adventure/assets/tangible/getAspectWithVessel.js, line 6

    Inherited from: adventurejs.Tangible#getAspectWithVessel

    Get this asset's substance location. This is somewhat ambiguous because in theory an asset can have multiple substance locations but in practice we clearly prefer 'in'.

    Returns:

    String
    getClosedAnscestors() → {Array}

    Defined in: adventure/assets/tangible/getClosedAnscestors.js, line 6

    Inherited from: adventurejs.Tangible#getClosedAnscestors

    Get a list of this asset's containing parent(s) that are closed. Takes into account nesting doll situations and looks all the way up the chain. Useful for determining whether a player can interact with a nested object.

    Returns:

    Array
    getContentsAt() → {Array}

    Defined in: adventure/assets/tangible/getContentsAt.js, line 6

    Inherited from: adventurejs.Tangible#getContentsAt

    Returns an array of all content in the specified aspect.

    Returns:

    Array
    getCountOfListableContentsAt(where) → {int}

    Defined in: adventure/assets/tangible/getCountOfListableContentsAt.js, line 6

    Inherited from: adventurejs.Tangible#getCountOfListableContentsAt

    Parameters:

    • where String
    Get a count of assets within this asset that are listable in this asset's description, for example when player examines this.

    Returns:

    int
    getDescription(description) → {String}

    Defined in: adventure/asset/getDescription.js, line 6

    Inherited from: adventurejs.Asset#getDescription

    Parameters:

    • description String
    Get a description, such as "look in book", where "in" has been defined as a key at asset.descriptions.in. "look" is always the default description.

    Returns:

    String
    getIndirectDescription(indirect_aspect, indirect_asset, direct_aspect) → {String}

    Defined in: adventure/asset/getIndirectDescription.js, line 6

    Inherited from: adventurejs.Asset#getIndirectDescription

    Parameters:

    • indirect_aspect String
    • indirect_asset Object
    • direct_aspect String
    Get indirect description, such as "look at this through magnifying glass", where "through magnifying glass" is a key at asset.descriptions["through magnifying glass"].description "look" is always the default direct object description.

    Returns:

    String
    getInheritance() → {Array}

    Defined in: adventure/Atom.js, line 238

    Inherited from: adventurejs.Atom#getInheritance

    getInheritance is a utility method to get an asset's inheritance chain. Returns a list of class names from high to low.

    Returns:

    Array
    getListableContents() → {Array}

    Defined in: adventure/assets/tangible/getListableContents.js, line 6

    Inherited from: adventurejs.Tangible#getListableContents

    Get an array of assets within this asset that are listable in this asset's description, for example when player examines this.

    Returns:

    Array
    getNestedInstancesOfClass(instanceClass) → {Array}

    Defined in: adventure/assets/tangible/getNestedInstancesOfClass.js, line 6

    Inherited from: adventurejs.Tangible#getNestedInstancesOfClass

    Parameters:

    • instanceClass String
    Find instances of specified class within this asset, for example find all coins within a purse. Returns an array of asset IDs.

    Returns:

    Array
    getOpenOrClosed() → {Array}

    Defined in: adventure/assets/tangible/getOpenOrClosed.js, line 6

    Inherited from: adventurejs.Tangible#getOpenOrClosed

    Print a string representing open / closed state of this asset.

    Returns:

    Array
    getPlaceAspect() → {Object|null}

    Defined in: adventure/assets/tangible/getPlaceAspect.js, line 6

    Inherited from: adventurejs.Tangible#getPlaceAspect

    Returns the aspect object of this asset's parent asset or null.

    Returns:

    Object | null
    getPlaceAspectId() → {String}

    Defined in: adventure/assets/tangible/getPlacePreposition.js, line 6

    Inherited from: adventurejs.Tangible#getPlaceAspectId

    Returns the aspect id of this asset's parent asset, or a blank string.

    Returns:

    String
    getPlaceAsset() → {Object|Boolean}

    Defined in: adventure/assets/tangible/getPlaceAsset.js, line 6

    Inherited from: adventurejs.Tangible#getPlaceAsset

    Get the object of this asset's parent asset.

    Returns:

    Object | Boolean
    getPlaceAssetId() → {String}

    Defined in: adventure/assets/tangible/getPlaceAssetId.js, line 6

    Inherited from: adventurejs.Tangible#getPlaceAssetId

    Returns the ID of asset's parent or a blank string.

    Returns:

    String
    getPrintableListOfContents(params) → {String}

    Defined in: adventure/assets/tangible/getPrintableListOfContents.js, line 6

    Inherited from: adventurejs.Tangible#getPrintableListOfContents

    Parameters:

    • params Object
    Get a printable list of assets within all Aspects of this asset, for example to append to asset description when player inputs "examine this". Returns a string.

    Returns:

    String
    getProperty(prop) → {Boolean}

    Defined in: adventure/Atom.js, line 184

    Inherited from: adventurejs.Atom#getProperty

    Parameters:

    • prop String
      Name of the property to test for. Can include dot notation.
    A method to get a deep property without throwing an error. Allows for getting deep properties, ie "foo.bar.baz". Returns false if property doesn't exist, so beware of if(false === foo.bar.baz) comparisons.

    Returns:

    Boolean
    getRoomAsset() → {String}

    Defined in: adventure/assets/tangible/getRoomAsset.js, line 6

    Inherited from: adventurejs.Tangible#getRoomAsset

    Get the asset of the room this asset is in.

    Returns:

    String
    getRoomId() → {String}

    Defined in: adventure/assets/tangible/getRoomId.js, line 6

    Inherited from: adventurejs.Tangible#getRoomId

    Get the ID of the room this asset is in.

    Returns:

    String
    getRopesThatBlockTravel() → {Array}

    Defined in: adventure/assets/tangible/getRopesThatBlockTravel.js, line 6

    Inherited from: adventurejs.Tangible#getRopesThatBlockTravel

    Check if player is holding a rope, or tied by a rope, that is tied at the other end, preventing player from leaving room. Return a list of assets that meet this qualification.

    Returns:

    Array
    getSubstanceAt() → {String}

    Defined in: adventure/assets/tangible/getSubstanceAt.js, line 6

    Inherited from: adventurejs.Tangible#getSubstanceAt

    Get the substance, if any, contained in this asset.

    Returns:

    String
    getThingThisIsTiedToPlayerBy() → {Object}

    Defined in: adventure/assets/tangible/getThingThisIsTiedToPlayerBy.js, line 6

    Inherited from: adventurejs.Tangible#getThingThisIsTiedToPlayerBy

    Assuming this asset is tied to the player asset by means of a third thing, get that third thing. Returns an asset object.

    Returns:

    Object
    getTiedThingsThatDragOnTravel() → {Array}

    Defined in: adventure/assets/tangible/getTiedThingsThatDragOnTravel.js, line 6

    Inherited from: adventurejs.Tangible#getTiedThingsThatDragOnTravel

    Check if player is holding a rope, or tied by a rope, that is tied at the other end to an asset that can travel with player. Return a list of assets that meet this qualification.

    Returns:

    Array
    getVesselAt(aspect) → {Object|Null}

    Defined in: adventure/assets/tangible/getVesselAt.js, line 6

    Inherited from: adventurejs.Tangible#getVesselAt

    Parameters:

    • aspect string
      The aspect to check.
    Get substance container at specified preposition.

    Returns:

    Object | Null
    getYBottom() → {Float}

    Defined in: adventure/assets/tangible/getYBottom.js, line 6

    Inherited from: adventurejs.Tangible#getYBottom

    Get this asset's global bottom y based on its y and height, which may be negative.

    Returns:

    Float
    getYRange() → {Object}

    Defined in: adventure/assets/tangible/getYRange.js, line 6

    Inherited from: adventurejs.Tangible#getYRange

    Get this asset's bottom y and top y based on its y and height, which may be negative.

    Returns:

    Object
    getYTop() → {Float}

    Defined in: adventure/assets/tangible/getYTop.js, line 6

    Inherited from: adventurejs.Tangible#getYTop

    Get this asset's global top y based on its y and height.

    Returns:

    Float
    has()

    Defined in: adventure/asset/_has.js, line 7

    Inherited from: adventurejs.Asset#has

    has is an alias to asset.isIn() that reverses the direct and indirect objects, to test whether that asset is in this asset.
    if( MyGame.$('crown').$has('jewel') ){ // do stuff }
    
    hasAspectAt(aspect) → {Boolean}

    Defined in: adventure/assets/tangible/hasAspectAt.js, line 6

    Inherited from: adventurejs.Tangible#hasAspectAt

    Parameters:

    • aspect String
    Determine whether asset has an aspect at specified preposition.

    Returns:

    Boolean
    hasClass(prop) → {Boolean}

    Defined in: adventure/Atom.js, line 216

    Inherited from: adventurejs.Atom#hasClass

    Parameters:

    • prop String
      Name of the classe to test for.
    A method to test whether the Atom is an instance of a given class.

    Returns:

    Boolean
    hasContentsAtAspect(aspect) → {Boolean}

    Defined in: adventure/assets/tangible/hasContentsAtAspect.js, line 6

    Inherited from: adventurejs.Tangible#hasContentsAtAspect

    Parameters:

    • aspect String
    Determine whether asset has contents at the specified aspect.

    Returns:

    Boolean
    hasDescription(description) → {String|Boolean}

    Defined in: adventure/asset/hasDescription.js, line 6

    Inherited from: adventurejs.Asset#hasDescription

    Parameters:

    • description String
    See if asset has a description for an aspect, such as "look in book", where "in" has been defined as a key at asset.descriptions.in. "look" is always the default description.

    Returns:

    String | Boolean
    hasEventHook(hook, asset_name) → {Boolean}

    Defined in: adventure/asset/hasEventHook.js, line 6

    Inherited from: adventurejs.Asset#hasEventHook

    Parameters:

    • hook string
    • asset_name string
      We use asset.name here instead of asset.id to make life slightly easier for authors. Asset IDs are formed from asset names, but generally we don't expect authors to be aware of IDs. Hooks will only be defined by authors, so let them use asset.name as their identifier. We do however make an effort to see if an id has been passed instead of a name.
    Check if this asset has an event_hooks for a given verb; additionally check if the asset has an event_hooks for a specific asset in combination with the verb. This check is also performed redundantly too in tryEventHook.js.

    Returns:

    Boolean
    hasIndirectDescription(indirect_aspect, indirect_asset, direct_aspect) → {String|Boolean}

    Defined in: adventure/asset/hasIndirectDescription.js, line 6

    Inherited from: adventurejs.Asset#hasIndirectDescription

    Parameters:

    • indirect_aspect String
    • indirect_asset Object
    • direct_aspect String
    Determine whether asset has an indirect description, such as "look at this through magnifying glass", where "through magnifying glass" becomes a key at asset.descriptions["through magnifying glass"]. "look" is always the default direct object description.

    Returns:

    String | Boolean
    hasListableContents() → {Boolean}

    Defined in: adventure/assets/tangible/hasListableContents.js, line 6

    Inherited from: