Thanks for the comment! Elemental weakness is a little tricky. Here's a different solution (thanks to Moogle Rampage:
if you're using VS Status core, can I suggest: Create Element Traits instead of assigning weaknesses directly to enemies. Each Element Trait has Passive State X You can then check for the Passive State and return the applicable weaknesses when present.
Checking for states is not hard: Use a conditional and do if script:
BattleManager._target.states().includes($dataStates[State#])