Oh boy what a ride!!! But I did it. Just in case anyone else wants to do something bonkers like this, this is how I pulled it off.
<target action>
mp +20: user
if user.mp > 74
Add State 46: user
end
if user.mp < 75
Remove State 46: user
end
if user.mp > 59
Add State 45: user
end
if user.mp < 60
Remove State 45: user
end
if user.mp > 44
Add State 44: user
end
if user.mp < 45
Remove State 44: user
end
if user.mp > 29
Add State 43: user
end
if user.mp < 30
Remove State 43: user
end
if user.mp > 14
Add State 42: user
end
if user.mp < 15
Remove State 42: user
end
wait: 10
action animation
wait for animation
action effect
wait for animation
wait for movement
if user.mp === user.mmp
Add State 40: user
end
wait: 5
</target action>
This is for my MP building elemental skills. The spenders deal the damage BEFORE changing states though so they can reap the benefits of the buff before the MP drops. I made 6 States. 5 of which provide the varying damage boosts, the 6th being sickness. They are all immune to the level beneath them, as well as auto removing the ones beneath them.
I also did
if user.mp === user.mmp
instead of == 100 so that if I want to add a trinket that gives the mage extra max mp later, it'll give them a nicer threshold to play with at max damage before having to unload. Sickness lasts the correct duration, everything works. It was a hell of a ride to get here, and I had to test every scenario, but it all works. Phew. Let's hope she holds up, but it passed all the testing.