// skate.js
(function () {
/*global adventurejs A*/
/**
* @augments {adventurejs.Verb}
* @class skate
* @ajsnode game.dictionary.verbs.skate
* @ajsconstruct MyGame.createVerb({ "name": "skate", [...] });
* @ajsconstructedby adventurejs.Dictionary#createVerb
* @hideconstructor
* @ajsinstanceof Verb
* @ajsnavheading LocomotionVerbs
* @summary Verb meaning skate, as on a skateboard or skates.
* @tutorial Scripting_VerbSubscriptions
* @tutorial Verbs_VerbAnatomy
* @tutorial Verbs_VerbProcess
* @tutorial Verbs_ModifyVerbs
* @tutorial Verbs_WriteVerbs
* @classdesc
* <pre class="display border outline">
* <span class="input">> skate around rink</span>
* You power skate a lap around the rink.
* </pre>
* Skate extends core verb <a href="ride.html">ride</a>.
* It checks whether "skate" is contextually available
* before forwarding to "ride" for further handling.
* @ajsverbreactions doRemoveThisFromThat, doRemoveThatFromThis, doMoveThisToThat, doMoveThatToThis
* @ajsverbphases doBeforeTry, doAfterTry, doBeforeSuccess, doAfterSuccess
*/
A.Preverbs.skate = {
name: "skate",
prettyname: "skate",
past_tense: "skated",
synonyms: ["skate"],
type: { locomotion: true, travel: true },
extends: { go: true },
gerund: "skating",
player_must_be: {
not_constrained: true,
},
/**
* @ajsadverbs
* @memberof skate
*/
accepts_adverbs: ["left", "right", "around", "back", "towards", "over"],
/**
* @ajsverbstructures
* @memberof skate
*/
accepts_structures: [
"verb", // skate
"verb noun", // skate east
// "verb preposition", //
"verb preposition noun", // skate on skateboard, skate to thing
// "verb noun noun", //
"verb noun preposition noun", // skate east on skateboard
],
/**
* @memberof skate
* @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 skate
* @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 skate
* @ajsverbparams
* with_params: {},
*/
with_params: {},
doTry: function () {
// "verb", // skate
// "verb noun", // skate east
// "verb preposition noun", // skate on skateboard
// "verb noun preposition noun", // skate east on skateboard
return this.game.dictionary.doVerb("ride");
},
doSuccess: function () {
var input = this.game.getInput();
var verb_phrase = input.verb_phrase;
if (input.did_doSuccess) return this.handleSuccess();
},
}; // END skate
})();