Changing MP

Hey all,
I have a temporary buff at the beginning of battle. There are multiple selections, but only one is set up. This buff increases max MP by 50, and also increases MP by 50. This buff works correctly.

At the end of battle, I want to revert the max MP back to normal (all characters have a normal max of 100 MP), as well as reduce the MP by 50. So if they had 140/150 at the end of battle, it would revert to 90/100. I cannot get this reduction to happen. I have variables set for the max MP and MP. A conditional branch in the cutscene immediately after battle checks if the max is greater or equal to 101, and if so reduces the max by 50 (back to 100). A second branch checks if the total MP is 101 or over and reduces it by 50 followed by a brief dialogue to confirm the reduction. A later dialogue will report the current values. I never get the reduction confirmation dialogue, and the later dialogue reports the values as they are with the buff still active. I've tried moving the conditional branches to different spots to see if it makes a difference, but no luck.
Are you using a state?

I was going to say if you're using a state to pull this off, you could try adding a single step to the counter before taking it off and maybe seeing if that works. Otherwise, I'd have to see a screenshot to even try and sort it out for myself.
show us how exactly you did that and we might be able to tell you where you went wrong.
Top of the first image, you'll see the buff - that one works.
Top of the second image, you'll see where I'm trying to revert the buff. That doesn't work. The rest of that second event kicks off just fine.
most probably wrong order.
you need to reduce MP first before reducing MaxMP, because the engine will always cut current MP if it is higher than MaxMP.

also don't use the condition on 101 twice, the effect should be on one condition only.
Because the second condition will no longer be true if the max is already reduced....
most probably wrong order.
you need to reduce MP first before reducing MaxMP, because the engine will always cut current MP if it is higher than MaxMP.

also don't use the condition on 101 twice, the effect should be on one condition only.
Because the second condition will no longer be true if the max is already reduced....
So I just tried this, and it still doesn't reduce max or current MP.
then most likely the condition isn't true - please post screenshots of the full events, including the control variable command that sets the variables you check in the condition. Because if those numbers are older instead of current, they might still be below 100.
then most likely the condition isn't true - please post screenshots of the full events, including the control variable command that sets the variables you check in the condition. Because if those numbers are older instead of current, they might still be below 100.
You definitely steered me in the right direction. My variables were screwed up. After correcting those, the buff expires correctly!

Original thread: https://forums.rpgmakerweb.com/threads/changing-mp.119062/