MV [RESOLVED] Yanfly Battle Core and State Importance

When using the Yanfly battle core I have every state other than knockouts being displayed in the battle log. For example, if poison is induced it shows the poison text and not the knockout text. The only exception is when a state induces a knockout at the end of a turn (e.g. poison, curse etc.) Is there any way to fix this?
Okay, so I've found the most logical place to put it... but it is having some rather unanticipated side effects. Specifically, it works a bit too well - plus it breaks the animated sideview extension.

Here's the code in question (with generic placeholders due to Yanfly's license change):

Code:
ext.battle.Window_BattleLog_displayActionResults =
    Window_BattleLog.prototype.displayActionResults;
Window_BattleLog.prototype.displayActionResults = function(subject, target) {
    if (ext.Param.optSpeed) {
      if (target.result().used) {
        this.displayCritical(target);
        this.displayDamage(target);
        this.displayAffectedStatus(target);
        this.displayFailure(target);
      }
    } else {
      ext.battle.Window_BattleLog_displayActionResults.call(this, subject,
          target);
    }
    if (target.isDead()) {
        target.performCollapse();
          if (target.isEnemy()) {
              this.push('addText', 'Defeated ' + target.name() + '!');
          } else {
              this.push('addText', target.name() + ' was knocked out!');
          }
    }
};

This is as close as I have managed to get due to the plugin design, so any ideas on where to put the enemy/actor check for the purpose of this workaround would be appreciated.
Well, I finally figured it out. It ended up being in an entirely different location than I had anticipated, but by changing the displayHpDamage function I was able to get the desired effect and have an actual report for the KO without regard for end of turn catch-up. Here's the updated function as it is defined in rpg_windows.js:

JavaScript:
Window_BattleLog.prototype.displayHpDamage = function(target) {
    if (target.result().hpAffected) {
        if (target.result().hpDamage > 0 && !target.result().drain) {
            this.push('performDamage', target);
        }
        if (target.result().hpDamage < 0) {
            this.push('performRecovery', target);
        }
        this.push('addText', this.makeHpDamageText(target));
        if (target.hp <= 0) {
            if (target.isActor()) {
                this.push('addText', target.name() + ' was knocked out!');
            } else {
                this.push('addText', 'Defeated ' + target.name() + '!');
            }
        }
    }
};

All that's left is to update all of my builds to reflect this and the fix will be in.

EDIT: And it's done. With that the case is closed.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/resolved-yanfly-battle-core-and-state-importance.135670/