// isVerbState.js
(function () {
/* global AdventureJS A */
var p = AdventureJS.Assets.Asset.prototype;
/**
* <strong>isVerbState</strong> is a method to check whether
* this asset already has state set by the specified verb.
* @memberOf AdventureJS.Assets.Asset
* @method AdventureJS.Assets.Asset#isVerbState
* @param {String} verb
* @returns {Boolean}
*/
p.isVerbState = function Asset_isState(verb) {
if (!verb || !this.game.dictionary.verbs[verb]) return false;
verb = this.game.dictionary.verbs[verb];
// ex: do verb close to this and this.is.closed
if (verb.state && this.is[verb.state]) return true;
// ex: do verb open to this and !this.is.closed
if (verb.unstate && !this.is[verb.unstate]) return true;
return false;
};
})();