MZ Make slip damage KO enemies but not allies

Hello,

So I'm wondering if anyone would be open to writing a script (unless there's one floating around already that I'm not aware of) to make poison ("Slip") damage KO enemies, but not allies.

In the editor, you can set up slip damage to KO or not to KO, but the setting applies to both allies and enemies. I'd like this setting to *only* apply to allies, if possible.
JavaScript:
_Game_Battler_maxSlipDamage = Game_Battler.prototype.maxSlipDamage;
Game_Battler.prototype.maxSlipDamage = function() {
    if (this.isEnemy()) return this.hp;
    return _Game_Battler_maxSlipDamage.apply(this);
};
Awesome, thank you! I'll check this out ASAP 🙂

Original thread: https://forums.rpgmakerweb.com/threads/make-slip-damage-ko-enemies-but-not-allies.137793/