Have a state apply a state wears off?

I was wondering how I would go about this? I wanted to make an item that gives you a temporary boost, but afterwards adds a debuff state (in this case, lets you act twice a turn, but afterwards you'd get a debuff, whether it be a damage decrease, that's also a state.)

EDIT: Also, I was wondering how substitute works? I tried placing it on a state and applied it to one of my party members (who has higher HP than the other members). But everyone else still took damage when hit?
I don't know if this can be done without using any custom plugin, but DoubleX RMMV State Triggers might help 🙂

In your case, use this notetag to the state offering the temporary boost:

<remove state trigger: STC1, STA3>Where STA3 is:

// Sets the state trigger action as adding the debuff state with id debuff_state_id STA3: { this.addState(debuff_state_id); },Where debuff_state_id needs to be set by you.

Original thread: https://forums.rpgmakerweb.com/threads/have-a-state-apply-a-state-wears-off.48790/