The demilich, an epic monster originally from the Epic Level Handbook for Dungeons and Dragons, Third Edition and nominally updated to Dungeons and Dragons 3.5 by the SRD and Conversion Book, has the extraordinary ability magic immunity which says
Demiliches are immune to all magical and supernatural effects, except as follows. A shatter spell affects a demilich as if it were a crystalline creature, but deals half the damage normally indicated. A dispel evil spell deals 3d6 points of damage (Fort save for half damage). Holy smite spells affect demiliches normally.
However, a demilich also has as spell-like abilities at will astral projection and harm, the latter noted as often used on itself to repair hp damage. Can the demilich, technically, even use these abilities on itself? Further, can a demilich cast its spells on itself?
Note: Split from a question about astral projection here. As the tags indicate, this question may require knowledge of how special abilities and magic function in both Dungeons and Dragons, Third Edition and Dungeons and Dragons 3.5.
This Answer has been updated to reflect newly found material
Yes, the Demilich can use Astral Projection, even on himself. Infact, from reading the spell you HAVE to go with your intended travelers if you want to use the spell at all.
As my other answer clarified, "Magic Immunity" is not the same as "Spell Immunity," and while I would argue that they are nearly identical that doesn't matter for the Astral Projection SLA as it's own definition is enough to allow the spell.
As I stated in my other answer, the definition of "Magic Immunity" is (Emphasis Mine):
This clearly states that magic immunity is not 100% set in stone. This is what allows the Demilich to use it's 'At Will' Harm SLA on itself. Since both Harm (which explicitly states it is mainly used to 'heal' itself) & "Astral Projection" (again, normal casting requires the caster to be the primary target) are listed in it's SLAs then RAW they are able to be cast on itself. Someone might ask why it didn't explicitly state how this spell would work on the demilich, the answer is simple, "it doesn't have to." The only time it HAS to list how something interacts with something else is if that interaction is different from normal. So, had the writers intended to allow the Demilich to cast the spell without it being the primary target (& avoid traveling) THIS exception/variation would have had to have been stated. However, listing the spell without modifications means simply that it was to be cast as usual.
Some may ask, "was it simply an oversight?" And while none of us can disprove a negative, I can state they WotC deliberately & explicitly removed it's "Alter Self" SLA 1 (which ironically doesn't require Spell Resistance) but left this spell! The fact that exists in the first place is enough to infer that it was intended to be usable, but the fact that the definition explicitly allows it cements the usability in the affirmative. Hence meeting the RAW requirement.
Bottom Line: The rules explicitly (maybe not too clearly) allow the Demilich to use it's Astral Projection SLA on itself.
1 The SRD is not updated to reflect that "Altar Self" has been removed from the Demilich's SLA, but according to the errata dated 2/6/2006 it has been removed.