// tie_to_with.js
(function () {
/*global adventurejs A*/
"use strict";
/**
* @augments {adventurejs.Verb}
* @class tie_to_with
* @ajsnode game.dictionary.verbs.tie_to_with
* @ajsconstruct MyGame.createVerb({ "name": "tie_to_with", [...] });
* @ajsconstructedby adventurejs.Dictionary#createVerb
* @hideconstructor
* @ajsinstanceof Verb
* @ajsnavheading DeprecatedVerbs
* @summary Summary.
* @todo revisit tie x to y with z
* @tutorial Scripting_VerbSubscriptions
* @tutorial Verbs_VerbAnatomy
* @tutorial Verbs_VerbProcess
* @tutorial Verbs_ModifyVerbs
* @tutorial Verbs_WriteVerbs
* @classdesc
* <pre class="display border outline">
* <span class="input">> tie boat to bollard with rope</span>
* You tie the rope to the boat and the bollard.
* </pre>
* <p>
* <strong>tie_to_with</strong> is a catchall that
* redirects to {@link tie_to_and}.
* </p>
*/
A.Preverbs.tie_to_with = {
name: "tie_to_with", // tie x to y with z
prettyname: "tie",
synonyms: [],
verb_noun_prep_noun_prep_noun: ["tie to with"],
phrase1: {
accepts_noun: true,
requires_noun: true,
noun_must_be: {
known: true,
tangible: true,
present: true,
visible: true,
reachable: true,
},
},
phrase2: {
accepts_noun: true,
requires_noun: true,
//accepts_preposition: true,
//requires_preposition: true,
//accepts_these_prepositions: [ 'to' ], /* @todo */
noun_must_be: {
known: true,
tangible: true,
present: true,
visible: true,
reachable: true,
},
},
phrase3: {
accepts_noun: true,
requires_noun: true,
//accepts_preposition: true,
//requires_preposition: true,
//accepts_these_prepositions: [ 'with' ], /* @todo */
noun_must_be: {
known: true,
tangible: true,
present: true,
visible: true,
reachable: true,
},
},
do: function () {
var input = this.game.getInput();
var parsedNoun1 = A.clone.call(this.game, input.parsedNoun3);
var parsedNoun2 = A.clone.call(this.game, input.parsedNoun1);
var parsedNoun3 = A.clone.call(this.game, input.parsedNoun2);
input.parsedNoun1 = A.clone.call(this.game, parsedNoun1);
input.parsedNoun2 = A.clone.call(this.game, parsedNoun2);
input.parsedNoun3 = A.clone.call(this.game, parsedNoun3);
this.game.dictionary.doVerb("tie_to_and");
return null;
},
};
})(); // tie_to_with