How to format a custom formula in Yanfly's Lunatic Damage?

Can anyone teach me how to format this damage formula in the Yanfly's Lunatic Damage script? I'm not a scripter so I'm finding it hard to work out how exactly it's supposed to be formatted within the script.

b.state?(1) ? b.add_state(2) + b.add_state(3) : b.add_state(2)

Thanks!

Edit: A friendly forumer, Moogle_X, has solved this for me. For anyone wondering how to format formulas for Lunatic Damage, it looks like this:

when /WEAKENED1/i

        if b.state?(1);b.add_state(2);b.add_state(3);else;b.add_state(2);end;

        value += (0)

 

Now I can go crazy with my states, thanks Moogle_X! 
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.


at OP request

Original thread: https://forums.rpgmakerweb.com/threads/how-to-format-a-custom-formula-in-yanflys-lunatic-damage.46284/