(Answered) Help with things that proc off of crits.

Alright so using Yanfly's AutoPassiveStates I created a multitude of passives I can learn. My question is how do I make it so while a state is active and when you crit with something it will proc a certain effect?


I'll give some examples:


-Critical Strikes generate 10 TP and increase your physical damage dealt by 15% for 2 turns. (The damage increase would be an additional state, of course)


-Critical Strikes cause the target to bleed for 5 turns.


-Critical Strikes activate a heal-over-time on yourself.


-Critical strikes have a 20% chance to completely refill your ATB bar.


I have all of Yanfly's plugins and can install others if necessary.


Bear in mind I want these to be on a state rather than a skill so the state would affect every skill you use while in effect.


Thanks for reading!


~Serv


*edit* After a great deal of 'soul searching', Nekoyoubi actually helped me with a solution. To each skill that would be affected by these states I would add a note tag such as this:


<Pre-Damage Eval>
if (a.isStateAffected(891) && b.result().critical) {
a.addState(915); user.gainTp(10);
}
</Pre-Damage Eval>


This can be altered to fit the other states I have listed. Just be sure to have this tag in the SKILL note tag.


*Note* This requires multiple Yanfly plugins.
I've moved this thread to JS Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.
I still haven't found much. You can do it with a formula in a skill, but I haven't found anything for states.

Original thread: https://forums.rpgmakerweb.com/threads/answered-help-with-things-that-proc-off-of-crits.60008/