You could add a state (State B ) to the opponent that is removed after one action, and have the remove effect be to remove all instances of the original state (State A) from the user. Though this only works if only one actor can use the skill.
Can you give me more detail about your skill and states? I think i can help you. As far as i know, you just want your target to gain a state with +100% Evasion but also remove it after the first attack, regardless if it is a hit or missed/evaded one, right?
I want the user of the skill to be granted 100% evasion. Then, when an opponent targets you for an attack, you will evade it. IMMEDIATELY after you evade, the state is removed, or, if it lasts for 2 or more evaded attacks, it counts down and is removed when all "charges" are removed.
(if the difference in doing that is significant, let's just work on getting it to work once)
Example:
>You use Evasion.
>enemy attacks, hits another party member.
>effect persists because user was not targeted
>you attack
>enemy attacks you this time
>you evade the attack
>the state is now removed, as it's expiration condition has been met
Also, yes, the effect will be removed after the attack is evaded, so it'd be removed regardless of whether the attack lands or not, since in this case, it wouldn't.
Thank you very much sir. I had actually figured out which tags to use (that is, I knew I needed "custom deselect effect"), but idk the code, so I had no idea what went in between, lol.
Excellent, it works now! But it doesn't seem to count down turns (set it to 2, had it go off 5 times)
I have tested mine and it works fine. The state is removed after a hit. Did you forget to change X into your state ID?
I did not, which unfortunately must means there's another problem somewhere with a plugin...... great, those are never fun to troubleshoot
Still not working, could it have anything to do with the duration in turns that I set? I would imagine it would've just overwritten that, am I supposed to set it to 0 0?
From what I can see, there are no plugin incompatibilities, I turned off every other plugin that even mentions "state" that ISN'T a yanfly plugin, and it still isn't working. Well, it's working, but it isn't removing after the first attack against the user.
still nothing man. how frustrating.....
by the way, while testing this, I did find out something else I don't really like. if you press the Right direction arrow, it lets you "pass" on your turn. is there a way to remove or remap that? If it could be remapped, I'd like it to just Attack instead. (idk if it matters, but I'm using yanfly's ATB battle system)
So strange there...! My state here is working without a problem. I bet you have already changed my State 28 to yours, right?
And about your other issue, it is caused by Yanfly's Battle Status Window plugin. Find it and you will see some parameters in "Actor Switching" section.
I toggled it off, however.... is there any chance you know how it could be remapped? I found another plugin I'd been in need of, another yanfly one at that, that calls the status screen in battle to let you look at your stats, as well as state info. Thing is, it is placed on the "fight/escape" menu, it would be mighty useful to be able to have it much more easily accessible by just pressing Right (I use the option to start right at the attack/skill/item command window instead of having to choose "fight" first every single time, and because of that, a player would not likely ever find out about the status window, or often forget about it)
I also wanted to remap it, but still got no idea yet. Maybe you can dig into his codes and change something there.