Basic Verb Use:Verb Definitions
The first thing to understand about verbs is the distinction between verbs and verb subscriptions. Verbs are created when a game begins, using definitions provided by the AdventureJS dictionary. In order for a verb to be applied to an asset, the asset must be subscribed to the verb. This document is talking about verb definitions. We offer this information here to provide context for the verb subscription docs that follow. If you're new to AdventureJS, we recommend that you move on to those.
Each verb definition contains a
doTry block that tests whether the verb can be applied in the
current circumstances, and a doSuccess block that applies any
state changes and prints a message back to the player. Each verb also inherits
methods that handle failure states and success states. On the advanced verb
pages, we offer a complete
example verb.
If you're looking for documentation regarding AdventureJS's predefined verbs, a complete Verb Reference is available. Verb utility functions allow you to enable / disable verbs for all assets, modify verbs, combine verbs, replace verbs, or create new verbs.