Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// DOVallowOnce.js
(function() {
	/*global adventurejs A*/ 
  "use strict";
  var p = adventurejs.Asset.prototype;	
  /**
   * <strong>DOVallowOnce</strong> is a method to check whether 
   * this asset is subscribed to allow the specified verb to act on it
   * as a direct object only once.
   * @memberOf adventurejs.Asset
   * @method adventurejs.Asset#DOVallowOnce
   * @param {String} verb
   * @returns {Boolean}
   */
  p.DOVallowOnce = function Asset_DOVallowOnce(verb)
  {
    if( !verb || !this.game.dictionary.verbs[verb] ) return false;
    if( !this.dov[verb]?.enabled ) return false;
    return this.dov[verb].once;
  }
}());