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