Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// isOnFloor.js
(function () {
  /*global adventurejs A*/
  "use strict";
  var p = adventurejs.Character.prototype;
  /**
   * Determine whether player is on floor.
   * @memberOf adventurejs.Character
   * @method adventurejs.Character#isOnFloor
   * @returns {Boolean}
   */
  p.isOnFloor = function Character_isOnFloor() {
    if (
      (!this.isNested() || this.getNestAsset() instanceof adventurejs.Floor) &&
      ["sit", "kneel", "lie"].indexOf(this.posture) > -1
    ) {
      return true;
    }
    return false;
  };
})();