// goals.js
(function () {
/* global adventurejs A */
/**
* @augments {adventurejs.Verb}
* @class goal
* @ajsnode game.dictionary.verbs.goal
* @ajsconstruct MyGame.createVerb({ "name": "goal", [...] });
* @ajsconstructedby adventurejs.Dictionary#createVerb
* @hideconstructor
* @ajsinstanceof Verb
* @ajsnavheading UtilityVerbs
* @summary Verb used to get goals.
* @tutorial BasicVerbs_Subscriptions
* @tutorial AdvancedVerbs_VerbAnatomy
* @tutorial AdvancedVerbs_VerbProcess
* @tutorial AdvancedVerbs_ModifyVerbs
* @tutorial AdvancedVerbs_ModifyVerbs
* @classdesc
* <pre class="display border outline">
* <span class="ajs-player-input">> goal</span>
* </pre>
* <p>
* <strong>goals</strong> prints a list of goals.
* </p>
*/
A.Preverbs.goal = {
name: "goal",
synonyms: ["goals"],
verb_prep_noun: ["get goal", "show goal", "get goals", "show goals"],
/**
* @ajsverbstructures
* @memberof goal
*/
accepts_structures: ["verb"],
do: function () {
this.game.log("L1636", "log", "high", "goal", "verbs");
if (this.game.settings.use_goals_window) {
this.game.goalManager.openDialog();
} else {
let msg = "";
msg = this.game.goalcard.listGoals();
if (msg) this.game.print(msg, "");
}
return true;
},
};
})();