[MV] How to remove "State Resist: Dead"

Hi all!

I have a battle:
Enemy 1 is resistent to dead. Meaning he will not die if HP<0. If his HP are below 0, after 5 turns he recovers his HP.

Enemy 2 is protected by enemy 1 as long has enemy 1 has HP>0. If Enemy 1 has 0 HP, Enemy 2 is vulnerable to attacks again.

The battle should end, when Enemy 2 has 0 HP (with a victory).

How do I do that? Right now as far as I get:
Check if enemy 2 has 0 HP. Then abort battle (which I do not want). That works. If I add the state death to enemy 1, nothing happens.

...I hope I did not overcomplicate the problem I have. Basically: How can I let an enemy with "State Resist: Dead" die? 😀

Thanks!


edit: found a weird way to solve the issue: Transform enemy 1 to a copy enemy of itself that doesn't have the state resistance... but that feels wrong. Will work if nobody has a different solution?
How did you assign the state in the first place?

If you had a troop event on turn 0 assigning the state, then you should be able to remove the state with a simple event command, the same way you added it on turn 0.

but it sounds as if you didn't use a resist death state, but assigned the trait for resist death directly in the editor - if you do that you cannot remove the trait because traits are static by default.
How did you assign the state in the first place?

If you had a troop event on turn 0 assigning the state, then you should be able to remove the state with a simple event command, the same way you added it on turn 0.

but it sounds as if you didn't use a resist death state, but assigned the trait for resist death directly in the editor - if you do that you cannot remove the trait because traits are static by default.
Yeah it is an enemy trait in the database enemies-tab, "State Resist: Dead". So these cannot be changed unless with plugins or coding? That is ... unexpected. I thought I was just thinking overly complicated again. Thanks though for the info!
No, the trick most people use is to make states with traits they want to assign temporarily, like an immortal state that has the trait resist death, and is then applied at turn 0 (that is before battle) if it is to be used.
because states can be added and removed, and can contain anything else from the trait list.
Or no function at all if you want an invisible state to check for targeting and other options without the player realising it exists (a state with a name to check for, but no messages, no icon and no effect on a low priority will never be visible)

Original thread: https://forums.rpgmakerweb.com/threads/mv-how-to-remove-state-resist-dead.157382/