Ethereal Enemies Immune to Physical Damage

Community,

I've looked and haven't been able to find an answer.  I wish to create certain Ethereal Undead enemies, like Ghosts, Wraiths, etc, which are completely immune to physical damage.  I change the PDR of the enemy to 0%.  I wish, however, to have all magic attacks still inflict damage.  The problem I run into, is when a character is equipped with a weapon that does magic damage, like a flame sword or something... it's still registering as physical damage even though I give that weapon

Attack Element (Fire)

Elemental Damage 110%.

Same goes for if I cast an Enchant Fire spell on a character, which has the same attributes... the attack still registers as "physical damage" and therefore does not decrease the enemy's hp at all.

Anyone have a solution or a script or anything that I may have overlooked?  I would have bet my mortgage that this has been solved already but I've been unable to find it.

I use mostly yanfly scripts.

Thanks in advance

Luke

EDIT:

I figured it out.  I had my enemy with a PDR of 0%, when instead what I needed was Element Rate Physical 0%.  This fixes the problem and makes a basic, non elemental attack do ZERO damage, but an attack with elemental damage wound as normal.
Have you set the skills hit type to "magical attack"? That is what decides if the damage calculation uses PDR or MDR, the elements are a different rate.
Whenever I create ghost enemies, instead of reducing the PDR to 0%, I reduce the Physical element to 0%.

PDR refers to all physical attacks, as in attacks of close range. It does not take into account the element of the attack.

Hope this helps.

Edit: Nm. Just seen your edit line. 😛

Original thread: https://forums.rpgmakerweb.com/threads/ethereal-enemies-immune-to-physical-damage.38803/