Ahh, so close lol thank you. Is there a particular order of operations that the system prefers? Just in case I need to try and make something like this again
From what I understand you want your damage number to be at the end. Technically you can keep on using ; before damage like this a.addState(2); a.addState(4); a.equips()[1].params[3] + a.atk * 4 - b.def * 2
What that formula will do is apply guard state to user, then apply poison state to user, then do math to get a value for damage. There is a lot of fun things you can do once you learn more.
Have fun with damage formulas, experiment, but always remember to make backup copies so in case you actually want it to go back to original, then you will have it.
I would highly suggest searching Javascript Math in your search engine. Pretty much all math functions and methods work in the damage formula for skills and items. I love mathematics lol
Also in your game folder called js, you will notice rpg_object.js
It has cool information, however I suggest you make a backup copy if you ever plan to mess around with it, or better yet you could write a script to overwrite functions or do whatever you like.
For instance when I read through rpg_object.js I discovered that I can put a.die() to make the user dead in a damage formula. die() is a function, same is true as addState(). You will find addState() function in rpg_object.js under Game_Battler function. Game_BattlerBase function is also a good one to look through. It is a superclass of Game_Battler.
I am available to chat with whenever you need some help. Send me a dm.
I assume that this thread can now be closed now. I believe your original request has been fullfilled.