An example of what I’m trying to do:
If the enemy is not paralyzed, it applies paralyze and does 20 damage
If the enemy IS paralyzed, it does not apply paralyze, and instead does 35 damage, removes paralyze from the target, and applies bleeding
How do I do this?
I’m not sure, but it should be something like this:
In the formula field, select Hp Damage.
b.isStateAffected(x) ? b.removeState(x); y ; b.addState(x) : b.addState(x); y
Replace X with State ID
Replace Y with the desired damage
That won’t work. You can’t drop semicolons into the middle of a ternary, and the amount isn’t the final element, so damage will be 0. Use a proper if statement instead.
if(b.isStateAffected(x)) { b.removeState(x); b.addState(x); y } else { b.addState(x); y }