Making a spell that exclusively heals undead

I'm trying to make a spell that harms living creatures and heals the undead, but I have not found any opcode that lets me heal a certain creature type - is there a way to do this?
0
Comments
For the living-only half of the spell you want, I'd recommend another sub-spell, with an effect to make undead immune to it.
EFF 1 applies heal
EFF 2 applies damage.
Use op177 to apply the first to only Undead. Use op318 to block the second EFF from affecting Undead.
On closer examination, there are really quite a lot of ways to make this work.