Ultranium/Xenanis

Xenanis is a Hardmode boss intended to be fought after Plantera.

While Xenanis is alive, the music will play.

Summoning
Xenanis does not spawn on its own and is summoned by using an at nighttime. The boss will flee if it becomes daytime while it's active.

Behavior
Xenanis typically chases the player while shooting projectiles at them, occasionally teleporting to positions around them to perform certain attacks.

Phase 1
Xenanis uses attacks in a fixed cycle.
 * Chases the player and fires seven ethereal bolts at them.
 * Teleports to one of 4 corners around the player 5 times, firing even spreads of 5 purple spears after each teleport.
 * Teleports above the player and summons 4 purple vortexes around itself before launching them at the player.
 * Floats around the player while shooting 5 small homing shadowflames.
 * Teleports above the player, stops in place and fires two sets of lasers in a circle around itself. During this attack, creates a circle around itself, which prevents the player from escaping.

Xenanis enters Phase 2 at 50% HP.

Phase 2
Xenanis summons two massive purple portals to the player's sides. After a few second, two Xenanis Apparitions appear from the portals and attack. Until the Apparitions are slain, Xenanis will hover above the player, passive and invulnerable.

The two different Apparitions have ??? / HP each and each use separate, fixed attack cycles.
 * Light Apparition
 * Fires three spreads of ethereal orbs.
 * Stops briefly to charge up a large ethereal vortex and throw it at the player.
 * Chases the player and fires 7 homing fireballs.
 * Teleports above the player and fires three aimed death rays.
 * Dark Apparition
 * Dashes at the player 4 times.
 * Releases 7 short-ranged dark waves at the player.
 * Erupts into a burst of long-ranged dark tentacles, repeating it afterward in a different pattern.

When the Apparitions are slain, Xenanis reactivates and starts using an enhanced variant of his previous attack cycle.
 * Floats around the player while firing 6 faster homing shadowflames.
 * Teleports above the player three times, firing a ring of purple bolts after each teleport.
 * Pauses in place to summon a massive purple vortex before throwing it at the player.
 * Flies in a line while summoning 5 smaller vortexes that launch themselves at the player.
 * Teleports above the player, stops in place, and fires 4 sets of lasers in a faster, more erratic circle around itself. The circle arena in Phase 1 is summoned again