Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// tryDestroyIndirectObjectAfterUsing.js
(function() {
	/*global adventurejs A*/ 
  "use strict";
  var p = adventurejs.Asset.prototype;	

  /**
   * <strong>tryDestroyIndirectObjectAfterUsing</strong> 
   * checks to see if the specified asset can only be used 
   * indirectly once with this verb by checking for 
   * <code>asset.iov[this.name].then_destroy</code>.
   * This is intended to provide a hook for authors 
   * to easily destroy an object after a single use, such as a key 
   * that only works once and then breaks or disappears.
   * @memberOf adventurejs.Verb
   * @method adventurejs.Verb#tryDestroyIndirectObjectAfterUsing
   * @param {Object} asset
   * @returns {Boolean|string}
   */
  p.tryDestroyIndirectObjectAfterUsing = function Asset_tryDestroyIndirectObjectAfterUsing(verb)
  {
    return this.tryDestroyAfterUsing('iov',verb);
  }
}());