Script to create non-damaging skills with an element "X" impossible to work against targets immune to or able to absorb element "X".

In Pokemon, there are elements (types) assigned to skills (moves), even non-damage skills have an element, like thunder wave, that only causes paralysis, but is electric-elemental/type. Ground-type Pokemon are immune to electric-type moves, so this means that Thunder Wave will never work against ground types and they cannot be paralyzed by Thunder Wave, however, they can be paralyzed by glare, which is like Thunder Wave, but normal-type, because Ground-type Pokemon are not immune to ground.

Both skills cause the same state (paralysis), but only one will work because one of them has an element that does not affect characters and enemies who receive 0% of ground-elemental damage.

So can someone please make a script that replicates this system? Elemental non-damaging skills and make it never work against enemies and characters immune or who absorbs that element?

I'm using "yanfly element absorb" script, and "Victor element set" script to put elements in non-damaging skills.

Original thread: https://forums.rpgmakerweb.com/threads/script-to-create-non-damaging-skills-with-an-element-x-impossible-to-work-against-targets-immune-to-or-able-to-absorb-element-x.166924/