b'Afya Elemental Overlord \n'b'  Medium   undead ,  any alignment  \n'b'  Armor Class  13 (16 with  mage armor )  Hit Points  165 (30d8 + 30)  Speed  30 ft.\n'b' STATS STR: 10 (+0) DEX:  16 (+3)  CON:  13 (+1)  INT:  14 (+2)  WIS:  15 (+2)  CHA:  21 (+5)  \n'b'\n'b'\n'b'\n'b'\n'b'\n'b'\n'b'  Saving Throws   Dexterity  +9,  Constitution  +7,  Charisma  +11  Damage Resistances  acid, cold, fire, lightning, thunder; bludgeoning, piercing, and slashing from nonmagical attacks not made with silver  Damage Immunities  necrotic, poison  Condition Immunities   exhaustion ,  grappled ,  paralyzed ,  petrified ,  poisoned ,  prone ,  restrained   Skills   Arcana  +8,  Intimidation  +11,  Persuasion  +11  Damage Immunities  varies (see Elemental Flexibility)  Senses  darkvision 60 ft., passive  Perception  12  Languages  any three languages  Challenge  18 (20,000 XP) \n'b' Special Traits \n'b'\n'b'  Elemental Flexibility . At the start of its turn, the elemental overlord must choose one damage type: acid, cold, fire, or lightning. It has immunity to its chosen damage type until the start of its next turn. It can\xe2\x80\x99t choose the same damage type two rounds in a row. \n'b'  Elemental Shield . A creature that touches the elemental overlord or hits it with a  melee attack  while within 5 feet of it takes 10 (3d6) damage of the type chosen with Elemental Flexibility. \n'b'  Incorporeal Movement . The elemental overlord can move through other creatures and objects as if they were  difficult terrain . It takes 5 (1d10) force damage if it ends its turn inside an object. \n'b'  Legendary Resistance  (3/day). If the elemental overlord fails a saving throw, it can choose to succeed instead. \n'b'  Magic Resistance . The elemental overlord has advantage on saving throws against spells and other magical effects. \n'b'  Shadow Sight . Magical  darkness  doesn\xe2\x80\x99t impede the elemental overlord\xe2\x80\x99s  darkvision . \n'b'  Shadow Stealth . While in dim light or darkness, the elemental overlord can take the  Hide  action as a bonus action. \n'b'  Shadow Walk  (2/day). As a bonus action while in dim light or darkness, the elemental overlord can  teleport  to an unoccupied space it can see within 30 feet that is also in dim light or darkness. \n'b'  Spellcasting . The elemental overlord is a 20th-level spellcaster. Its spellcasting ability is  Charisma  (spell save DC 18, +10 to hit with spell attacks). The overlord has the following  wizard  spells prepared:\n'b'\n'b'\n'b'  Cantrips  (at will):  acid splash , blade ward, fire bolt,  light ,  prestidigitation  \n'b'  1st level  (4 slots):  burning hands ,  detect magic ,  mage armor ,  magic missile ,  shield  \n'b'  2nd level  (3 slots):  blur ,  flaming sphere ,  gust of wind ,  misty step  \n'b'  3rd level  (3 slots):  counterspell ,  fly ,  lightning bolt  \n'b'  4th level  (3 slots):  conjure minor elementals ,  ice storm ,  stoneskin ,  wall of fire  \n'b'  5th level  (3 slots):  cone of cold ,  conjure elemental ,  wall of stone  \n'b'  6th level  (2 slots):  chain lightning ,  wall of ice  \n'b'  7th level  (2 slots):  delayed blast   fireball ,  prismatic spray  \n'b'  8th level  (1 slot):  control weather  \n'b'  9th level  (1 slot):  meteor swarm  \n'b'\n'b'  Sunlight Sensitivity . While in sunlight, the elemental overlord has disadvantage on  attack  rolls, as well as on  Wisdom  ( Perception ) checks that rely on sight. \n'b'  Undead Nature . The elemental overlord doesn\xe2\x80\x99t require air, food, drink, or sleep. \n'b'\n'b' Actions \n'b'\n'b'  Dagger .  Melee or Ranged Weapon Attack : +9 to hit, reach 5 ft. or range 20/60 ft., one target.  Hit : 5 (1d4 + 3) piercing damage. \n'b'  Elemental Bolt .  Ranged Spell Attack : +11 to hit, range 120 ft., one target.  Hit : 28 (8d6) damage of the type chosen with Elemental Flexibility, and the target must succeed on a DC 18  Constitution  saving throw or have disadvantage on its next saving throw against a spell cast by the elemental overlord. \n'b'  Life Drain .  Melee Weapon Attack : +6 to hit, reach 5 ft., one creature.  Hit : 36 necrotic damage and the target\xe2\x80\x99s hit point maximum is reduced by an amount equal to the damage taken. This reduction lasts until the target finishes a  long rest . The target dies if this effect reduces its hit point maximum to 0. \n'b'\n'b' Legendary Actions \n'b' The elemental overlord can take 3 legendary  actions , choosing from the options below. Only one legendary action can be used at a time and only at the end of another creature\xe2\x80\x99s turn. The overlord regains spent legendary actions at the start of its turn. \n'b'\n'b'  Cantrip . The elemental overlord casts a cantrip. \n'b'  Move . The elemental overlord moves up to half its speed without provoking opportunity attacks. \n'b'  Elemental Bolt  (costs 2 actions). The elemental overlord makes one Elemental Bolt  attack . \n'b'  Power Uncontained  (costs 3  actions ). The elemental overlord releases a burst of elemental energy. Each creature within 20 feet of it must make a DC 18  Dexterity  saving throw. On a failure, a creature takes 21 (6d6) force damage and is pushed up to 10 feet away and knocked  prone . On a success, a creature takes half the damage and isn\xe2\x80\x99t pushed or knocked  prone .'