Making specific enemies "not count" for victory conditions

I'm using a row system & my game contains "enemies" that are actually objects like boxes or pillars, alongside actual enemies in combat. This plays into various targeting mechanics, but my main concern is what happens with these "enemy" objects at the end of combat.

My ideal outcome would be to leave these objects on the field when end-of-combat processes run. Having these "enemy" objects flee or perish when all actual enemies are dead is acceptable, but I'd rather the game ignore them & leave them around, it's more visually naturalistic that way. How should I go about this?
Paste the following into a text editor, save as a *.js file, include as a plugin:
Code:
Game_Unit.prototype.aliveMembers = function() {
    return this.members().filter(function(member) {
        if (member.isActor())
            return member.isAlive();
        else
            return member.isAlive() && !member.enemy().meta.Inanimate;
    });
};

Then giving any enemies the notetag <Inanimate> will cause them to not count toward living troop members.
for all true enemies, give them a troop event that counts their death and checks if all are dead. if yes abort battle
@dreamless - there's a Victor plugin that let you put states on enemies to make them count as "incapacitated", aka. the fight will end even if you don't get rid of them.
I used Turan's code, thanks!

Original thread: https://forums.rpgmakerweb.com/threads/making-specific-enemies-not-count-for-victory-conditions.162159/