Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// DOVhasIndirectObjects.js
(function() {
	/*global adventurejs A*/ 
  "use strict";
  var p = adventurejs.Asset.prototype;	
  /**
   * <strong>DOVhasIndirectObjects</strong> is a method to check 
   * whether this asset has any particular indirect objects specified 
   * by the author for use with the specified verb.
   * @memberOf adventurejs.Asset
   * @method adventurejs.Asset#DOVhasIndirectObjects
   * @param {String} verb
   * @returns {Boolean}
   */

  p.DOVhasIndirectObjects = function Asset_DOVhasIndirectObjects(verb)
  {
    if(!this.isDOV(verb)) return false;

    // is this.dov[verb].with_assets !empty?
    if( this.dov[verb]?.with_assets.length )
    {
      return true;
    }

    // is this.dov[verb].with_classes !empty?
    if( this.dov[verb]?.with_classes.length )
    {
      return true;
    }
    
    return false;

  }
}());