// hop.js
(function () {
/*global adventurejs A*/
"use strict";
/**
* @augments {adventurejs.Verb}
* @class hop
* @ajsnode game.dictionary.verbs.hop
* @ajsconstruct MyGame.createVerb({ "name": "hop", [...] });
* @ajsconstructedby adventurejs.Dictionary#createVerb
* @hideconstructor
* @ajsinstanceof Verb
* @ajsnavheading LocomotionVerbs
* @summary Verb meaning hop, as in "hop over lake"; or, travel in specified direction.
* @tutorial Scripting_VerbSubscriptions
* @tutorial Verbs_VerbAnatomy
* @tutorial Verbs_VerbProcess
* @tutorial Verbs_ModifyVerbs
* @tutorial Verbs_WriteVerbs
* @classdesc
* <pre class="display border outline">
* <span class="input">> hop through mountain</span>
* You fire up your primitive oscillation overthruster,
* slip off your shoes and set your feet to the pedals,
* try to align the three beams... and fail completely,
* scraping against the mountain and spilling a shower of
* sparks and spaceship parts.
* </pre>
* Hop extends core verb <a href="go.html">go</a>.
* It checks whether "hop" is contextually available
* before forwarding to "go" for further handling.
* @ajsverbreactions
* @ajsverbphases doBeforeTry, doAfterTry, doBeforeSuccess, doAfterSuccess
*/
A.Preverbs.hop = {
name: "hop",
prettyname: "hop",
past_tense: "flew",
synonyms: ["hop"],
type: { locomotion: true, travel: true },
extends: { go: true },
player_must_be: {
not_constrained: true,
not_on_floor: true,
not_nested_elsewhere: true,
able_to_hop: true,
},
/**
* @ajsverbstructures
* @memberof hop
*/
accepts_structures: [
"verb",
"verb noun",
"verb preposition",
"verb preposition noun",
"verb noun preposition noun",
],
/**
* @memberof hop
* @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 hop
* @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 hop
* @ajsverbparams
* with_params: {},
*/
with_params: {},
do: function () {
return this.game.dictionary.doVerb("go");
},
}; // END hop
})();