Looking for the right script call

Hello, all! I'm looking for a script call that would pull the ID the user's Normal Attack State. For example, if the user's Normal Attack State is Burn (id 27), or Chill (id 28), it would look something like this.

<target action>
if [User's Attack State ID] == 27
add element: 2
animation 8: target
wait for animation
action effect: target
add state: 27
else if [User's Attack State ID] == 28
add element: 3
animation 9: target
wait for animation
action effect: target
add state: 28
else
animation 7: target
wait for animation
action effect: target
end
</target action>

I've tried looking through the Script Call spreadsheets on Google Docs (links below), but haven't found a script call that matches what I need. I assume it might be something along the lines of "user.traits[x].dataId", where x is the index of the Attack State trait, but I don't know how traits are ordered. Here is my plugins list for reference.
[ISPOILER]
01.png

[/ISPOILER]
02.png

03.png

04.png

[/ISPOILER]

Here's the links to the Goodle Docs mentioned:
Script Calls:

Script Call Reference:

Any advise is greatly appreciated!
Battlers can have multiple attack states. You could try:

if user.attackStates().some(function(id) { return id === 27; })
I.e. "does the skill user's attack state list include state ID 27?"
Alrighty! I'll try that one! Will return with results! Thank you! 🙂
You're welcome, hopefully it works~
You're welcome, hopefully it works~
It works!!! Thank you! Also, with Yanfly's Action Sequence Pack, are we able to use the "&&" operator in our if statements inside a notetag?

UPDATE: Nevermind! I tested it out and found out we can! Once again, thank you for the help caethyril!

Original thread: https://forums.rpgmakerweb.com/threads/looking-for-the-right-script-call.167126/