(Answered) Skill that has different effect based on state on target?

So I have a skill called Nightmare that inflicts additional damage if the enemy is affected by the Sleep state (or is supposed to). So far it does 0 damage. What am I doing wrong here?


Basing this off some other formulas I saw.


if b.state?(6);end;c = 1000;else;c = 10;end;c


Very basic example. I plan to have my actual damage formula multiplied by "c", but for now I'm just trying basic testing with this formula and it's doing 0 damage.


*edit* The correct way, as answered by Ogouka, is this:


b.isStateAffected(x) ? [high damage formula] : [lower damage formula]


Thanks Ogouka! 😀
Browsed through the Damage Formula help thread and found this for ya:


b.isStateAffected(x) ? [high damage formula] : [lower damage formula]
That's way different than the formulas I found. Did I post a really old RPG maker formula or something?


Testing now.


*edit* It worked! You're amazing! Helping with two questions at once. lol Thank you! 

Original thread: https://forums.rpgmakerweb.com/threads/answered-skill-that-has-different-effect-based-on-state-on-target.60097/