Not sure if this is what you are looking for, but found this in YEP_BattleEngine:
//=============================================================================
// Spriteset_Battle
//=============================================================================
Spriteset_Battle.prototype.isBusy = function() {
return false;
};
Yanfly.BEC.Spriteset_Battle_update = Spriteset_Battle.prototype.update;
Spriteset_Battle.prototype.update = function() {
Yanfly.BEC.Spriteset_Battle_update.call(this);
this.updateZCoordinates();
};
Spriteset_Battle.prototype.updateZCoordinates = function() {
if (Imported.YEP_ImprovedBattlebacks) {
this.updateBattlebackGroupRemove();
} else {
this._battleField.removeChild(this._back1Sprite);
this._battleField.removeChild(this._back2Sprite);
}
this._battleField.children.sort(this.battleFieldDepthCompare);
if (Imported.YEP_ImprovedBattlebacks) {
this.updateBattlebackGroupAdd();
} else {
this._battleField.addChildAt(this._back2Sprite, 0);
this._battleField.addChildAt(this._back1Sprite, 0);
}
};
Spriteset_Battle.prototype.battleFieldDepthCompare = function(a, b) {
var priority = BattleManager.getSpritePriority();
if (a._battler && b._battler && priority !== 0) {
if (priority === 1) {
if (a._battler.isActor() && b._battler.isEnemy()) return 1;
if (a._battler.isEnemy() && b._battler.isActor()) return -1;
} else if (priority === 2) {
if (a._battler.isActor() && b._battler.isEnemy()) return -1;
if (a._battler.isEnemy() && b._battler.isActor()) return 1;
}
}
if (a.z < b.z) return -1;
if (a.z > b.z) return 1;
if (a.y < b.y) return -1;
if (a.y > b.y) return 1;
return 0;
};
Spriteset_Battle.prototype.isPopupPlaying = function() {
return this.battlerSprites().some(function(sprite) {
return sprite.isPopupPlaying();
});
};
Yanfly.BEC.Spriteset_Battle_battlerSprites =
Spriteset_Battle.prototype.battlerSprites;
Spriteset_Battle.prototype.battlerSprites = function() {
var sprites = Yanfly.BEC.Spriteset_Battle_battlerSprites.call(this);
var length = sprites.length;
var result = [];
for (var i = 0; i < length; ++i) {
var sprite = sprites[i];
if (!sprite) continue;
if (!sprite._battler) continue;
result.push(sprite);
}
return result;
};