Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// IOVdidTry.js
(function() {
	/*global adventurejs A*/ 
  "use strict";
  var p = adventurejs.Asset.prototype;	
  /**
   * <strong>IOVdidTry</strong> is a method to check whether 
   * it was attempted to use this asset as an indirect object by the specified verb.
   * <br><br>
   * <strong>_iDidTry</strong> is an alias meant for authors.
   * @memberOf adventurejs.Asset
   * @method adventurejs.Asset#IOVdidTry
   * @param {String} verb
   * @returns {Boolean}
   */
  p.IOVdidTry = p._iDidTry = function Asset_IOVDidTry(verb)
  { 
    if( !verb || !this.game.dictionary.verbs[verb] ) return false;
    if( this.iov[verb] ) 
    {
      return this.iov[verb].did_try;
    }
    else if( this.did_try_verb_count[verb] )
    {
      return ( this.did_try_verb_count[verb]?.noun2 > 0 || this.did_try_verb_count[verb]?.noun3 > 0 );
    }
    return false;
  }
}());