Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// getNestOrPlaceAspect.js
(function () {
  /*global adventurejs A*/
  "use strict";
  var p = adventurejs.Character.prototype;
  /**
   * Get aspect of character's parent. If character is nested,
   * returns nest asset preposition, otherwise returns room asset preposition.
   * @memberOf adventurejs.Character
   * @method adventurejs.Character#getNestOrPlaceAspect
   * @return {Boolean}
   */
  p.getNestOrPlaceAspect = function Character_getNestOrPlaceAspect() {
    if (this.isNested()) {
      return this.getNestAspect();
    } else {
      return this.getPlaceAspect();
    }
  };
})();