Apply State when hitting enemy weakness

Hi everyone,

I'm trying to make a consumable item that does damage as well as applying a state if the enemy is weak to the attack element.

I've seen that this might be possible in MV by typing it into the damage calculation (Something like this: b.elementRate(11) > 1 ? b.addState(3)).

Is there an equivalent in VX Ace, without scripts? If not, are there any scripts that could do this?

The only solution I came up with is creating a separate version of the state and giving ALL enemies that shouldn't be affected a resistance to that duplicate state. That seems like a bit of a hassle though, so was just wondering if there was a better way.

Thanks
I think that b.element_rate(11) > 1 ? b.add_state(3) should work for Ace. Haven't tried though.
I think that b.element_rate(11) > 1 ? b.add_state(3) should work for Ace. Haven't tried though.

That worked, thanks!!

In case anyone curious sees this thread, I used this formula: b.element_rate(11) > 1 ? b.add_state(3) + 50: 50. This way it deals damage too

Original thread: https://forums.rpgmakerweb.com/threads/apply-state-when-hitting-enemy-weakness.154939/