// verbs.js
// OK 09 2023
(function () {
/* global AdventureJS A */
/**
* @augments {AdventureJS.Dictionary.Verb}
* @class verbs
* @ajsconstruct MyGame.createVerb({ "name": "verbs", [...] });
* @ajsconstructedby AdventureJS.Dictionary#createVerb
* @hideconstructor
* @ajsinstanceof Verb
* @ajsnavheading UtilityVerbs
* @ajsnode game.dictionary.verbs.verbs
* @summary Verb that returns a list of all available verbs.
* @tutorial BasicVerbs_Subscriptions
* @tutorial Reference_HowAVerbIsBuilt
* @tutorial Reference_HowAVerbWorks
* @tutorial AdvancedVerbs_ModifyVerbs
* @tutorial AdvancedVerbs_ModifyVerbs
* @classdesc
* <div class="display">
* <div class="ajs-player-input">> verbs</div>
* <div class="ajs-p">- aft<br/>
* - again<br/>
* - ask about<br/>
* - etc.</div>
* </div>
* <p>
* Verbs returns a list of all active verbs.
* </p>
*/
A.Dictionary.VerbDefinitions.verbs = {
name: "verbs",
synonyms: ["verbs"],
/**
* @ajsverbstructures
* @memberof verbs
*/
accepts_structures: ["verb"],
do: function () {
var input = this.game.getInput();
var verbList = "Available verbs: ";
var count = 0;
for (var prop in this.dictionary.verbs) {
if (count > 0) verbList += ", ";
verbList += this.dictionary.verbs[prop].prettyname;
count++;
}
verbList += ". ";
this.game.print(verbList, input.output_class);
return true;
},
};
})();