MV Need Help with Weaknesses adding States + Calling Common Event on State Plugin Fix

Hello there!

I found a few plugins, as described in the title, and after looking through everything, I can't really seem to figure it out.

Plugin A applies a state to enemies if the enemy is weak to the attacking element. Plugin B runs a common event when all enemies have the state applied to them.

The issue stems where these two plugins don't really work together. Plugin B only works when the state is directly applied to the enemy (Eg. State Add: Burning to all enemies, the common event triggers), but not when enemy weaknesses trigger a state to be added.

I've also tried asking the creator of the plugin, too, and he hasn't used JS in a long time: So I'm hoping someone would be able to help me out here, and he's also let me know he's fine with other people helping me out and solving this issue.

Thanks for giving this a read, thank you if you'd be able to help me and adjust the code so these are able to work in unison: I really need this for the battle system in my game.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-weaknesses-adding-states-calling-common-event-on-state-plugin-fix.158881/