Can items have dual purposes?

Hi all,

I've just started tinkering around with RPG Maker MV and have been coming up with a list of status effects and curative items. Two of the status effects i've created revolve around decreased/increased agility. I've created an item that will cure the negative state of decreased agility, but I was wondering is there was any way to have the same item cure and invoke effects based on the character's current status?

So in this example, say a character has decreased agility. I use the item to cure this negative effect and bring them back up to normal. If I then use this item again on the same character, it adds the positive effect of increased agility. I don't want to go straight from a decreased to an increased effect through a single use of the item.

It was just an idea I had, and not sure if it can be done, but if anyone could help me out on this that would be great!
yes and no - you can have the item call a common event, and use conditional branches in the common event to decide what to do.
However, in battlescreen common events are executed at end of turn, so it would not work exactly like a normal item and it will require some tricks for targeting the effect.
Hi,

In this particular case you could also work around the problem a bit:
If you make your battler immune to the positive state while they are affected by the negative state (state resist trait), your item can simply add the positive state first and then remove the negative state to achieve the effect you want.
Hi,

In this particular case you could also work around the problem a bit:
If you make your battler immune to the positive state while they are affected by the negative state (state resist trait), your item can simply add the positive state first and then remove the negative state to achieve the effect you want.

That's a very interesting way around it, will definitely give it a go. Thanks!
If you use YEP_SkillCore, you can get what you ask easily.
Lets say state 28 is the negative state & state 29 is the positive state. Now place this in the item notetag.
<After Eval>
if (b.isStateAffected(28)){
b.removeState(28);
}
else{
b.addState(29);
}
</After Eval>

Original thread: https://forums.rpgmakerweb.com/threads/can-items-have-dual-purposes.77644/