Yanfly Element Core Question

Spoiler: Yanfly Element Core Help Section Excerpt
"If you have YEP_BattleEngineCore.js installed with this plugin located
underneath it in the Plugin Manager, you can make use of these extra
damage related action sequences."


"FORCE ELEMENT: X
FORCE ELEMENT: X, X, X
FORCE ELEMENT: NAME
FORCE ELEMENT: NAME, NAME, NAME
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This will override elemental settings for elemental damage rate calculations
except for customized calculations that aim at specific elements. This will
ignore all other elements.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Usage Example: force element: 4
force element: 5, 6, 7
force element: fire
force element: ice, wind, water"

I would like to make use of this feature however I am unsure what to do. Plugging in the values and copying it into a skill notebox doesn't seem to work.
Yanfly's tutorial video mentioned that knowledge of Lunatic Code would be needed.

I need to make something along the lines of
"If the user of this attack is inflicted with a certain status condition then force element: Fire."

This is the last big thing I need to solve in order to complete my project. Any help would really be appreciated!


EDIT:
This is what I managed to come up with so far. Although I just edited something that @Aesica provided me a while back for a different matter.
It seems to be working... It just looks a bit awkward in spots... like the timing is off slightly for attacks...
Spoiler
<Target Action>

perform action

if user.isStateAffected(23)

force element: fire

action animation: target

wait for animation

else if user.isStateAffected(24)

force element: fire

action animation: target

wait for animation

else if user.isStateAffected(25)

force element: ice

action animation: target

wait for animation

else if user.isStateAffected(26)

force element: ice

action animation: target

wait for animation

else if user.isStateAffected(27)

force element: thunder

action animation: target

wait for animation

else if user.isStateAffected(28)

force element: thunder

action animation: target

wait for animation

else if user.isStateAffected(29)

force element: water

action animation: target

wait for animation

else if user.isStateAffected(30)

force element: water

action animation: target

wait for animation

else if user.isStateAffected(31)

force element: earth

action animation: target

wait for animation

else if user.isStateAffected(32)

force element: earth

action animation: target

wait for animation

else if user.isStateAffected(33)

force element: wind

action animation: target

wait for animation

else if user.isStateAffected(34)

force element: wind

action animation: target

wait for animation

else if user.isStateAffected(35)

force element: light

action animation: target

wait for animation

else if user.isStateAffected(36)

force element: light

action animation: target

wait for animation

else if user.isStateAffected(37)

force element: darkness

action animation: target

wait for animation

else if user.isStateAffected(38)

force element: darkness

action animation: target

wait for animation

else

action animation: target

end

wait for animation

action effect: target

death break

perform finish

</Target Action>

I did notice that there is already an almost 90 page thread that covers stuff like this so if needed this can be moved there...

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-element-core-question.114822/