All you have to do is put the passive in the skill like:
<Passive State: 26>
<Evade Counter>
<Hide in Battle>
And in the State just put
<Evade Counter>
That's how I do it anyway.
Not quite. Yanfly's Counter Control allows me to evade when I counter. I want to counter when I evade.
For example - imagine a character with several evasion-boosting abilities or abilities that guarantee evasion of X number of physical attacks.
The passive capitalizes on this by forcing the character to counter the attacker every time they evade.
Effectively, I'm using the character's Evasion to decide when to counter, and not the Counter Attack parameter itself.
Maybe I'm not following completely but my character is setup exactly how you are describing. Anytime he evades an attack he counter attacks the enemy, buffing evasion with items or skills lets him evade more attacks which in turn lets him counter attack more.
I think the problem is that you're using Custom React Effect. If the attack is evaded, that part is skipped over, so it can't possibly work that way. Try using Custom Deselect Effect instead. That will occur when evading.
<Custom Deselect Effect>
var attacker = user.index();
if (this.isHpEffect() && this.isPhysical() && target.result().evaded) {
if (!target.isStateAffected(7)) {
BattleManager.queueForceAction(target, 1, attacker);
}
}
</Custom Deselect Effect>
I think Pots Talos is mistaken. <Evade Counter> makes the user dodge only when countering, not counter when dodging. Try the above code with the Deselect Effect. It has to be Deselect, since React and Respond require the attack to hit, and Select occurs before we know if the attack hit, miss, or was dodged.
Hmm...I hadn't considered the action sequence side of it. I don't know enough about action sequences to give a definite answer, but I think there's a way to ensure that the user doesn't die until the attack is complete. What does the sequence for the triggering attack look like?
What I'm seeing is that currently, I don't think there's any way to ensure that the user is immortal. Maybe try adding the line:
immortal: user, true
Place that in the setup action (along with anything else needed to ensure continuity, including immortal: target, true), then remove user immortality in the finish action after the user returns to home position. See if that works.