MZ Ignore state message if target already has state

Hey all,

Not sure if this is something that needs a plugin or if there's some simple thing I'm missing.

The issue is that if a player or enemy has a state (such as Poison), and an ability is used which could inflict that state, the battle log will put out a message that the state has been applied. Ideally I'd prefer it to just ignore the battle log completely if it inflicts a state on an enemy that already has that state.

EX:
1 - Enemy is not poisoned
2 - Player uses skill that inflicts Poison
3 - Battle log states "Enemy has been poisoned!"
4 - Next turn, player uses that same skill which inflicts poison on the already poisoned enemy
5 - The battle log does not state "Enemy has been poisoned!"
The trick is that the code displaying the message happens after the action has applied states to the battler; so you have no way of knowing at that point whether the battler already had the state beforehand.

It's doable, but it's important to know if you have any other plugins which affect battle...pretty much at all. Overwriting a function which another battle plugin uses would just break that.
That explanation makes sense to me. Currently I'm using Visustella MZ Core, Battlecore, and Skills/States Core plugins.

EDIT: Would it make sense to have the state application automatically fail if the target already has the state?

EDIT 2: Figured out a workable solution. The trick is to make a trait of the state that it resists the state (0%), which means that when an actor/enemy is inflicted with this state they become functionally immune to being inflicted with it again (MUST be state rate 0%, as state resist will also remove the status)

Important also to note that the Skill that inflicts the status must NOT be set to "Certain Hit", otherwise it will ignore the state rate.
EDIT: Would it make sense to have the state application automatically fail if the target already has the state?

If you want to do it like that VS Skill and States has plugin settings for reapply rules. If you set it to ignore, I think that works.

EDIT: Or not LOL. I guess you'd have to edit a method then. But seems like you already found a solution.

Original thread: https://forums.rpgmakerweb.com/threads/ignore-state-message-if-target-already-has-state.184046/