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