// isOnFloor.js
(function () {
/*global adventurejs A*/
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"].includes(this.posture)
) {
return true;
}
return false;
};
})();