Mind flayer darkener

Mind flayer darkeners, or illithids, are so insidious, diabolical and powerful that all denizens of the dark fear them.

Special abilities
A mind flayer darkener is immune to mind-affecting spells and has a spell resistance of 24. Its creature weapon can penetrate damage reduction as a +2 weapon.

This creature can use its psionic inertial barrier once per day, its psionic charm monster and psionic mass concussion each twice per day, its psionic mind blast 10m radius four times per day, and its psionic mind blast eight times per day. In addition, it carries a potion of cure serious wounds and (single) scrolls of Bigby's interposing hand and Evard's black tentacles. (These items are not dropped as loot when the creature dies.)

A mind flayer darkener is a level 7 wizard with the following spells prepared.

If in combat with a creature of a playable race who is neither petrified nor polymorphed, but is stunned or paralyzed, then the mind flayer will move to be 1.5 meters from that creature and use its extract brain ability. (If the target becomes polymorphed or loses the debilitating condition before the mind flayer is in position, it will use a psionic mind blast that does not count against the daily limit instead of extracting the brain.) There are a few quirks (bugs) associated with this. First, a creature of the Tiefling subrace (case sensitive) is considered a playable race and is considered stunned/paralyzed. (This was probably an attempt to account for Valen Shadowbreath in the Hordes of the Underdark campaign, but not intended to bypass the stunned/paralyzed check.) Second, a creature subject to a spell failure effect (not from equipment) is considered stunned/paralyzed by mind flayers. (Instead of spell failure, the intent was to detect the visual effect associated with being paralyzed, but this was incorrectly implemented.)