Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
// getVerbParam.js
(function () {
  /*global adventurejs A*/
  var p = adventurejs.Asset.prototype;
  /**
   * Return the value of the specified parameter in the specified verb subscription.
   * @memberOf adventurejs.Asset
   * @method adventurejs.Asset#getVerbParam
   * @param {String} verb The name of a verb.
   * @param {String} param The name of a param in with_params.
   * @return {*}
   */
  p.getVerbParam = function Asset_getVerbParam(verb, ov, param) {
    if (!verb || !this.game.dictionary.verbs[verb] || !this[ov][verb]) {
      return undefined;
    }
    return this[ov][verb].with_params[param];
  };
})();