If you want to make them take damage progressively, the best option is probably poisoning them selectively. This idea makes use of the fact that undead entities revert not only the result of poisoning/harming effects, but also the ones of healing effects.
Thus, for each "normal" entity type (Creeper
, Spider
etc.), you would do:
/effect @e[type=TheType] minecraft:poison desiredDuration desiredAmplifier
And for undead entity types (Zombie
, Skeleton
etc.), you would do:
/effect @e[type=TheType] minecraft:regeneration desiredDuration desiredAmplifier
Also works with healing. IDs are minecraft:instant_damage
for harming and minecraft:instant_health
for healing (i.e. harming the undead). Not sure right now what you need to put for the duration there, 0 is the only thing that makes sense though.
Note that, while harming heals undead monsters as much as it harms other monsters, healing deals more damage to them than normal monsters are healed. In fact, it deals as much damage to them as harming to other monsters.
For removing the particles, just add {ShowParticles:0b}
at the end of the command. (I think that does work with the effect
command as well, not quite sure though. It definitely works when applying effects via NBT, so if everything else fails, you could make that work by calling the entitydata
command.)