// walk.js
(function () {
/* global adventurejs A */
/**
* @augments {adventurejs.Verb}
* @class walk
* @ajsnode game.dictionary.verbs.walk
* @ajsextendverb go
* @ajsconstruct MyGame.createVerb({ "name": "walk", [...] });
* @ajsconstructedby adventurejs.Dictionary#createVerb
* @hideconstructor
* @ajsinstanceof Verb
* @ajsnavheading LocomotionVerbs
* @summary Verb meaning walk, as in "walk to diving board"; or, travel in specified direction.
* @tutorial Verbs_Subscriptions
* @tutorial AdvancedVerbs_VerbAnatomy
* @tutorial AdvancedVerbs_VerbProcess
* @tutorial AdvancedVerbs_ModifyVerbs
* @tutorial AdvancedVerbs_ModifyVerbs
* @classdesc
* <pre class="display border outline">
* <span class="ajs-player-input">> walk under ladder</span>
* Throwing caution to the winds, you walk under the ladder. You slip on a bit of rope hung from the ladder, which dislodges a bucket of paint from the top of the ladder. The bucket glances off your head, spilling a full gallon of paint that puddles at your feet. You slip in the paint and flail wildly, bringing the ladder crashing down on top of you, as you and it fall to the ground.
* </pre>
* Walk extends core verb <a href="/doc/go.html">go</a>.
* It checks whether "walk" is contextually available
* before forwarding to "go" for further handling.
* @ajsverbreactions
* @ajsverbphases doBeforeTry, doAfterTry, doBeforeSuccess, doAfterSuccess
*/
A.Preverbs.walk = {
name: "walk",
prettyname: "walk",
past_tense: "walked",
synonyms: ["walk"],
gerund: "walking",
type: { locomotion: true, travel: true },
extends: { go: true },
subject_must_be: {
not_constrained: true,
not_on_floor: true,
not_nested_elsewhere: true,
able_to_walk: true,
},
/**
* @ajsadverbs
* @memberof walk
*/
accepts_adverbs: ["left", "right", "around", "back", "towards", "over"],
/**
* @ajsverbstructures
* @memberof walk
*/
accepts_structures: [
"verb",
"verb noun",
"verb preposition",
"verb preposition noun",
"verb noun preposition noun",
],
/**
* @memberof walk
* @ajsverbphrase
* phrase1:
* {
* accepts_noun:true,
* noun_must_be:
* {
* known: true,
* tangible: true,
* present: true,
* visible: true,
* reachable: true,
* },
* accepts_preposition: true,
* },
*/
phrase1: {
accepts_noun: true,
noun_must_be: {
known: true,
tangible: true,
present: true,
visible: true,
reachable: true,
},
accepts_preposition: true,
},
/**
* @memberof walk
* @ajsverbphrase
* phrase2:
* {
* accepts_noun:true,
* noun_must_be:
* {
* known: true,
* tangible: true,
* present: true,
* visible: true,
* reachable: true,
* },
* accepts_preposition: true,
* },
*/
phrase2: {
accepts_noun: true,
noun_must_be: {
known: true,
tangible: true,
present: true,
visible: true,
reachable: true,
},
accepts_preposition: true,
},
/**
* @memberof walk
* @ajsverbparams
* with_params: {},
*/
with_params: {},
doTry: function () {
return this.game.dictionary.doVerb("go");
},
doSuccess: function () {
return this.handleSuccess();
},
}; // END walk
})();