Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// IOVgetConnectionCount.js
(function() {
	/*global adventurejs A*/ 
  "use strict";
  var p = adventurejs.Asset.prototype;	
  /**
   * Return 
   * this.iov[verb].with_params.connections.length
   * @memberOf adventurejs.Asset
	 * @method adventurejs.Asset#IOVgetConnectionCount
   * @param {String} verb The name of a verb.
   * @return {Int}
   */
  p.IOVgetConnectionCount = function Asset_IOVgetConnectionCount(verb) 
  {
    if( !verb || !this.game.dictionary.verbs[verb] ) return 0;
    if( this.iov[verb]?.with_params.connections )
    {
      return this.iov[verb].with_params.connections.length;
    }  
    return 0;
  }
}());