// swim.js
(function () {
/* global adventurejs A */
/**
* @augments {adventurejs.Verb}
* @class swim
* @ajsnode game.dictionary.verbs.swim
* @ajsredirectverb swim
* @ajsconstruct MyGame.createVerb({ "name": "swim", [...] });
* @ajsconstructedby adventurejs.Dictionary#createVerb
* @hideconstructor
* @ajsinstanceof Verb
* @ajsnavheading LocomotionVerbs
* @summary Verb meaning swim, as in "swim through tunnel"; 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">> swim under bear</span>
* You try to swim under the bear that blocks your path to the waterfall and the spawning grounds beyond. Sadly, it pulls you out of the water with one big swipe of its paw.
* </pre>
* Swim extends core verb <a href="/doc/go.html">go</a>.
* It checks whether "swim" is contextually available
* before forwarding to "go" for further handling.
* @ajsverbreactions doRemoveThisFromThat, doRemoveThatFromThis, doMoveThisToThat, doMoveThatToThis
* @ajsverbphases doBeforeTry, doAfterTry, doBeforeSuccess, doAfterSuccess
*/
A.Preverbs.swim = {
name: "swim",
prettyname: "swim",
past_tense: "swam",
synonyms: ["swim"],
type: { locomotion: true, travel: true },
extends: { go: true },
gerund: "swimming",
subject_must_be: {
not_constrained: true,
not_on_floor: true,
not_nested_elsewhere: true,
able_to_swim: true,
},
/**
* @ajsadverbs
* @memberof swim
*/
accepts_adverbs: ["left", "right", "around", "back", "towards", "over"],
/**
* @ajsverbstructures
* @memberof swim
*/
accepts_structures: [
"verb",
"verb noun",
"verb preposition",
"verb preposition noun",
"verb noun preposition noun",
],
/**
* @memberof swim
* @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 swim
* @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 swim
* @ajsverbparams
* with_params: {},
*/
with_params: {},
doTry: function () {
return this.game.dictionary.doVerb("go");
},
doSuccess: function () {
return this.handleSuccess();
},
}; // END swim
})();