I'm wanting there to be a state which gives the user a buff, but slowly drains their MP or TP. When that runs out, it should go away. Is there a plugin that could make this possible? Would anyone be up for making one?
State that goes away when you run out of MP of TP?
JS Plugin RequestsYanfly's buffs and states core.
This plugin can do most of the thing you require.
Specifically, with Yanfly's Buffs & States plugin you could put something like this in your state's notebox:
I.e. at the end of each turn it'll check the affected battler's MP, and if MP = 0 the state will remove itself. You might want to use a different tag, maybe Action End instead of Turn End, depending on when it should check. To check TP instead of MP, just replace mp with tp.
Code:
<Custom Turn End Effect>
if (user.mp <= 0) {
user.removeState(state.id);
}
</Custom Turn End Effect>
Ok, thanks. One other question: Is there a way to have it reduce the amount of MP by a specific amount?
You could use another buffs & states notetag on the skill, e.g.
Code:
<Custom Regenerate Effect>
user.gainMp(-10);
</Custom Regenerate Effect>
Original thread: https://forums.rpgmakerweb.com/threads/state-that-goes-away-when-you-run-out-of-mp-of-tp.103679/