I have set (a.mat + a.atk) * 5 - (b.def + b.mdf) * 2 && a.AddState(69)
two issues.
first, the last statement of the formula must have a numerical value. when you have the entire formula like than and then toss in && a.AddState(69) at the end, you turn the value from a number to something else. if youre going to do stuff like that in the formula box, you need to use a semicolon to split the statements so that the actual formula is the last part and all the other mechanics happen before it.
second, its a.addState, not a.AddState.
to make it work, you'd need to do
Code:
a.addState(69); (a.mat+a.atk)*5 - (b.def+b.mdf)*2
that being said, using the formula box to run functions that actually change things (like adding states to battlers) can result in the code being ran even when you dont intend on it.
as an example, If an actor with autobattle active has access to that skill, the formula has to be ran in order for the game to consider what action they should use per target. thatll cause the game to give them that state (multiple times even) far before they even choose the skill theyll use, even if thats not the skill theyll settle on using
EDIT: Ninja'd