MV Substitute + Counter compatability

Got plans for a character who uses a Substitute state to cover allies and then Counterattacks that substituted hit. The way MV handles Substitution by default doesn't give that option though and instead applies the damage directly to the Substitute character without giving them a chance to counter.

Now, I'm pretty sure I have to modify something in BattleManager.invokeNormalAction to fix this, but I'm still new to learning MV's backend structure and I'm not really sure where to go from here. My own fixes caused game crashes and I think I my approach is misaimed anyway, so I figured I would ask here.
Are you using any plugins that this would need to be compatible with?
Oh, that would have been good information to include in the OP, my bad. OTL

The relevant plugins I'm using are YEP Battle Engine Core & YEP Counter Control. As far as I can tell, neither Battle Core or Counter Control actually modify invokeNormalAction, but there might be other compatibility issues I'm not accounting for.
Another attempted fix of mine failed so I'm bumping this. 😀
Found Triacontane's SubstituteExtend plugin, which has a substitute/counterattack compatibility option. Leaving the link here in case someone else needs it! :v

Original thread: https://forums.rpgmakerweb.com/threads/substitute-counter-compatability.134826/