Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0

Class: VerbSubscription

Extends: adventurejs.VerbSubscription

Defined in: adventure/VerbSubscription.js, line 6

VerbSubscription is in tryout vs using unclassed objects.

VerbSubscription is a special class used to create a standardized format for managing verb subscriptions on assets at asset.dov[verb] and asset.iov[verb]. This is meant to provide a clean and orderly way to specify what verbs are supported by individual assets or asset classes.

VerbSubscriptions and their values are passed down the inheritance chain. For example: asset.dov.examine is available on Matter, and inherited by Tangible, which means that all Tangible subclasses can be examined.

Private Constructor:

var foo = new adventurejs.VerbSubscription(game_name, name)

Parameters:

  • game_name String
    Name of top level game instance that is scoped to window.
  • name String
    Instance name.
Inherited Overrides

Index

Methods:

Properties:

Methods Collapse all  |  Expand all

disable()

Defined in: adventure/VerbSubscription.js, line 203

Overrides from: adventurejs.VerbSubscription#disable

Disable this verb on its parent asset.
enable()

Defined in: adventure/VerbSubscription.js, line 194

Overrides from: adventurejs.VerbSubscription#enable

Enable this verb on its parent asset.
incrementDoCount()

Defined in: adventure/VerbSubscription.js, line 212

Overrides from: adventurejs.VerbSubscription#incrementDoCount

Increment this verb subscription's do_count.
incrementTryCount()

Defined in: adventure/VerbSubscription.js, line 221

Overrides from: adventurejs.VerbSubscription#incrementTryCount

Increment this verb subscription's try_count.

Properties  | 

automatically :Boolean

Defined in: adventure/VerbSubscription.js, line 79

Overrides from: adventurejs.VerbSubscription#automatically

automatically: true allows for some verbs to be performed automatically if context calls for it, for example, when unlocking a door in order to pass through it. This takes precedence over global settings.
automatically_after_use :Boolean

Defined in: adventure/VerbSubscription.js, line 85

Overrides from: adventurejs.VerbSubscription#automatically_after_use

automatically_after_use: true if automatically is set true, this sets it so that a verb can only be applied automatically after a player has already used it manually. This is to prevent automatic use of tools from breaking puzzles. For example, imagine one door with many keys but only one that works; if choosing the right key is part of the puzzle, this option prevents players from simply saying "unlock door" and having the right key automatically selected for them.
did_do :Getter

Defined in: adventure/VerbSubscription.js, line 230

Overrides from: adventurejs.VerbSubscription#did_do

Check whether this verb has been successfully applied.
did_try :Getter

Defined in: adventure/VerbSubscription.js, line 239

Overrides from: adventurejs.VerbSubscription#did_try

Check whether this verb has been tried.
do_count :String

Defined in: adventure/VerbSubscription.js, line 54

Overrides from: adventurejs.VerbSubscription#do_count

do_count: 0 is used to track the number of times the verb is successfully applied to this object.
enabled :Boolean

Defined in: adventure/VerbSubscription.js, line 73

Overrides from: adventurejs.VerbSubscription#enabled

enabled: true allows changing the state of an asset's responsiveness to a given verb. If set false, a subscribed asset will not respond to the verb. This is useful for temporarily disabling verbs for specific assets, for example if you had a door that could not be unlocked until another action was completed.
inherited_from :String

Defined in: adventure/VerbSubscription.js, line 67

Overrides from: adventurejs.VerbSubscription#inherited_from

inherited_from: 'Asset' the name of the class this verb is inherited from. Since these properties aren't distinctly documented, this is offered as a convenience method for tracking down inherited verb settings.
name :String

Defined in: adventure/VerbSubscription.js, line 61

Overrides from: adventurejs.VerbSubscription#name

name: '' the name of the verb.
on_failure :String|*

Defined in: adventure/VerbSubscription.js, line 160

Overrides from: adventurejs.VerbSubscription#on_failure

on_failure: '' is an optional parameter. It is set as a string by default, but may provide a string or array or function to be served by getStringOrArrayOrFunction(). If it returns a string, that string will be appended to the verb's default failure message.
on_first_failure :String|*

Defined in: adventure/VerbSubscription.js, line 167

Overrides from: adventurejs.VerbSubscription#on_first_failure

on_first_failure: '' is an optional parameter. It is set as a string by default, but may provide a string or array or function to be served by getStringOrArrayOrFunction(). If it returns a string, that string will be appended to the verb's default failure message.
on_first_success :String|*

Defined in: adventure/VerbSubscription.js, line 153

Overrides from: adventurejs.VerbSubscription#on_first_success

on_first_success: '' is an optional parameter. It is set as a string by default, but may provide a string or array or function to be served by getStringOrArrayOrFunction(). If it returns a string, that string will be appended to the verb's default success message.
on_success :String|*

Defined in: adventure/VerbSubscription.js, line 146

Overrides from: adventurejs.VerbSubscription#on_success

on_success: '' is an optional parameter. It is set as a string by default, but may provide a string or array or function to be served by getStringOrArrayOrFunction(). If it returns a string, that string will be appended to the verb's default success message.
once :Boolean

Defined in: adventure/VerbSubscription.js, line 91

Overrides from: adventurejs.VerbSubscription#once

once: false if true, asset can only be successfully used once with given verb, but is left in place after use.
then_destroy :Boolean|*

Defined in: adventure/VerbSubscription.js, line 103

Overrides from: adventurejs.VerbSubscription#then_destroy

then_destroy: false allows author to specify that this asset should be destroyed after using. By default, then_destroy is set to a boolean. If true, asset is destroyed after a successful use regardless. then_destroy may provide a string or array or function subject to getStringOrArrayOrFunction().
then_disable :Boolean

Defined in: adventure/VerbSubscription.js, line 97

Overrides from: adventurejs.VerbSubscription#then_disable

then_disable: false if true, asset can only be successfully used once with given verb, but is left in place after use.
try_count :String

Defined in: adventure/VerbSubscription.js, line 47

Overrides from: adventurejs.VerbSubscription#try_count

try_count: 0 is used to track the number of times the verb is attempted on this object.
with_anything :Boolean

Defined in: adventure/VerbSubscription.js, line 110

Overrides from: adventurejs.VerbSubscription#with_anything

with_anything: true pertains only to indirect objects. If true, this asset can be used as an indirect object of this verb with any direct object.
with_assets :Array

Defined in: adventure/VerbSubscription.js, line 116

Overrides from: adventurejs.VerbSubscription#with_assets

with_assets: [] allows author to define a single asset that can interact with this one using the given verb, for example "unlock door with key" where key is the only asset that can unlock door.
with_classes :Array

Defined in: adventure/VerbSubscription.js, line 123

Overrides from: adventurejs.VerbSubscription#with_classes

with_classes: [] allows author to define an entire class that can interact with this asset using the given verb, for example "unlock door with skeleton key" where any instance of the class SkeletonKey can unlock door.
with_nothing :Boolean

Defined in: adventure/VerbSubscription.js, line 131

Overrides from: adventurejs.VerbSubscription#with_nothing

with_nothing: true pertains only to direct objects. If true, the specified verb can be applied to the direct object without the use of any indirect object.
with_params :Object

Defined in: adventure/VerbSubscription.js, line 137

Overrides from: adventurejs.VerbSubscription#with_params

with_params: {} is an optional collection of verb-specific parameters that are copied from the verb that is being subscribed to. For example, plug includes with_params.connections for tracking which assets are plugged to which.