// recall.js
(function () {
/* global adventurejs A */
/**
* @augments {adventurejs.Verb}
* @class recall
* @ajsnode game.dictionary.verbs.recall
* @ajsconstruct MyGame.createVerb({ "name": "recall", [...] });
* @ajsconstructedby adventurejs.Dictionary#createVerb
* @hideconstructor
* @ajsinstanceof Verb
* @ajsnavheading IntroversionVerbs
* @summary Verb meaning recall, as in "recall spell".
* @tutorial Scripting_VerbSubscriptions
* @tutorial Verbs_VerbAnatomy
* @tutorial Verbs_VerbProcess
* @tutorial Verbs_ModifyVerbs
* @tutorial Verbs_WriteVerbs
* @classdesc
* <pre class="display border outline">
* <span class="ajs-player-input">> recall Roger</span>
* You think about Roger. Those full lips, those wide eyes.
* You never thought you'd feel this way about another turtle.
* </pre>
* <strong>Recall</strong> returns a generic response
* about any
* {@link adventurejs.Asset|Asset}. Use
* <a href="/doc/Scripting_VerbReactions.html">verb reactions</a>
* to provide unique responses to specific assets.
* @ajsverbreactions doRecallThis, doRecallThat
* @ajsverbphases doBeforeTry, doAfterTry, doBeforeSuccess, doAfterSuccess
*/
A.Preverbs.recall = {
name: "recall",
prettyname: "recall",
past_tense: "recalled",
synonyms: ["thinkabout", "recall", "consider"],
verb_prep_noun: ["think about"], // think about thing
gerund: "thinking",
/**
* @memberof recall
* @ajsverbphrase
* phrase1:
* {
* accepts_noun: true,
* requires_noun: true,
* noun_must_be:
* {
* known: true,
* },
* },
*/
phrase1: {
accepts_noun: true,
requires_noun: true,
noun_must_be: {
known: true,
},
},
/**
* @memberof recall
* @ajsverbparams
* with_params: {},
*/
with_params: {},
doTry: function () {
var input = this.game.getInput();
var verb_phrase = input.verb_phrase;
var direct_object = input.getAsset(1);
var indirect_object = input.getAsset(2);
var msg = "";
if (verb_phrase === "think about") {
//
}
// can't talk to non-characters
// if (!(direct_object)) {
// this.game.debug(
// ` | ${this.name}.js | ${direct_object.id} `
// );
// msg += `${direct_object.Articlename} ... `;
// this.handleFailure(msg);
// return null;
// }
return true;
},
doSuccess: function () {
var input = this.game.getInput();
var verb_phrase = input.verb_phrase;
var direct_object = input.getAsset(1);
var indirect_object = input.getAsset(2);
var player;
var direct_object;
var msg = "";
// recall x
msg += `{We} recall ${direct_object.articlename}. `;
return this.handleSuccess(msg, direct_object);
},
};
})(); // recall