Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// DOVallowWithNothing.js
(function () {
  /*global adventurejs A*/
  "use strict";
  var p = adventurejs.Asset.prototype;
  /**
   * <strong>DOVallowWithNothing</strong> is a method
   * to check whether this asset is subscribed to act as a direct
   * object with the specified verb without any indirect object.
   * For example, "plug in computer" where when an outlet is
   * implied but not defined.
   * @memberOf adventurejs.Asset
   * @method adventurejs.Asset#DOVallowWithNothing
   * @param {String} verb
   * @returns {Boolean}
   */
  p.DOVallowWithNothing = function Asset_DOVallowWithNothing(verb) {
    if (!verb || !this.game.dictionary.verbs[verb]) return false;
    console.warn("verb", verb);
    console.warn("!this.dov[verb]", !this.dov[verb]);
    console.warn("this.dov[verb]", this.dov[verb]);
    console.warn("this.dov[verb].with_nothing", this.dov[verb].with_nothing);
    if (!this.dov[verb]) return false;
    return this.dov[verb].with_nothing;
  };
})();