MV How to build state conditional skill with yanfly action sequence?

I noticed that my state conditional damage formula won't work with yanfly's action sequence.

if (b.isStateAffected(39)) {a.mat * 7} else {0}

How can I make it work while using yanfly action sequence in my note tab?
That formula looks OK, assuming you're using it in the damage formula box of a skill or item.

Yanfly's action sequences don't change how the damage formula is evaluated, but it is possible you have forgotten to include an action effect action in your sequence, i.e. the formula never gets evaluated/applied. Maybe post your action sequence here? 🙂

Here's a YEP action sequence reference in case it helps~
Without looking too closely at the actual plugin, I'd suspect the reason has something to do with nested if statements in the action sequence causing an issue.

To get around this, you could try changing your formula to a ternary operator instead of using an if statement.

if (b.isStateAffected(39)) {a.mat * 7} else {0} would become var dmg = (b.isStateAffected(39)) ? a.mat * 7 : 0; return dmg
Thanks for the reply. I can't believe I didn't realize I had an typo in the action sequence this whole time. The action effect was really my mistake. I rechecked a couple times and still didn't realized it ^^"

I am new to the damage formula thing, are there any instructions for the coding that I can learn?
There's a thread here with a bunch of tips:
The damage formula is essentially a JavaScript eval, so a lot of stuff is valid. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-to-build-state-conditional-skill-with-yanfly-action-sequence.129213/