So you've chosen Xerath. Why? Stupid question. Get out.
Those of you left, congratulations on passing the first test. Here, I'll show you the build that has so far led me to being a fairly successful Xerath in the matches I've played (any losses were user-error induced, and I take full responsibility). Interestingly, in any match where the other team also has a Xerath, I have managed to come out ahead of the evil doppelganger every time. Whether it's the build to thank, or me, I leave to you to decide.
A few things to keep in mind while reading this build:
1. This build is designed to attain early-game dominance, and keep it that way. I have found that doing well early on snowballs into doing well for the entire game, as it puts you at an early advantage that is much easier to hold on to than it is to earn back later in the game.
2. This build assumes that everything goes according to plan. I'll mention it again, but every game is different, and I leave it up to your best judgement to change the item/skill order as necessary (except the Rabbadon's--more on that later).
3. This build assumes that you are judicious with your spell use. I've found that smart spellcasting and decent mana regen work better than simply stacking flat mana and firing blindly. Plus, it's better to spend your money on stacking AP and utility items and making sure you only need one volley of spells to kill them in the first place. I'm not saying you can never miss, but get into the mentality that every spell counts. Otherwise, you'll find yourself out of mana often, and Xerath is useless without his spells.
4. I play Xerath very defensively at early levels, and since you're reading this build, you should too. Stay behind your minions--your skill shots go through them with no penalty so there's no reason to get up close. Make your enemies have to fight to get into range of you and use Xerath's massive range to your advantage. You don't even have to be right behind your minions. Also, unless you can guarantee you're going to destroy/significantly injure the turret, don't bother pressing up to it with your minions. It's too easy to get trapped in its range by a gank, or a finicky Locus of Power deactivation. Let the minions do the work, and just harass the enemy from well outside its range.
5. Xerath is one of the best harassers in the game. The ability to camp behind your minions and take potshots with Arcanopulse means you can easily do half their life bar before they ever land one hit on you. Every time Arcanopulse is off cooldown, do what you can to land another hit on them (remember, you have to lead the target since it has a delay, and it actually has slightly longer range than the cursor says it does). Worst-case, they run away to heal and give up gold/xp. Best case, you manage a few kills without them ever laying a finger on you.
With that, let's get started.
I used to have more variety in the runes, but I've found that using pure scaling AP runes (and flat AP quints) works out phenomenally well. Why? Well, a few reasons:
For starters, stocking up on nothing but scaling AP runes (combined with the masteries) means you end up getting about 5 AP per level, which is pretty impressive. That also ends up equaling roughly 100 extra AP at level 18 (counting Rabaddon's). That's another Zhonya's hourglass added on to your damage/armor.
Secondly, that scaling AP means waiting to buy a Needlessly Large Rod is nowhere near as painful, since your power stays relevant without spending money on lesser items, as well as scaling your armor without any effort.
Finally, most of you probably scoffed at ditching the Magic Penetration runes. The thing is, the Marks only totaled about 9.5 Magic Penetration, which is ok at early levels, and mostly useless at later ones. Between Void Staff and Locus of Power, Xerath winds up with a whopping 70% Magic Penetration, and there isn't a character in the game who can do anything about that.
Before the revamped masteries, I had 9/0/21. Since then, I've used the build outlined above since the pure offensive power makes Xerath much scarier, and the utility tree really only offers cooldown reduction (Xerath really doesn't need any beyond the Ionian Boots).
The Teleport/Flash combo is meant to give Xerath some utility/survivability since his items/runes cover everything else. Use teleport to immediately return to your lane after healing/buying and keep the pressure up, and flash to escape ganks/other hairy situations.
Other possible spells:
Surge--Not a bad plan, especially with the proper mastery. Ends up being like having an entire other Void Staff/Rylai's worth of AP added onto you. Good if you're more concerned with aggressive domination.
Clarity--After the update, and with the proper mastery, potentially worth it if you just want to spam Xerath's spells every chance you get. Your mana-hungry teammates will definitely thank you for it.
Exhaust--Again, good if you think you'll need to keep people from running/chasing. Xerath doesn't need it so much since he naturally punches through Magic Resist, and his range makes it tough to run from him at all.
Ghost--Xerath's Locus of Power speed buff mostly covers you here, and again, his range makes chases rarely necessary. As for escaping bad situations, Flash is more useful. Really only worth it if you need to hop from lane to lane quickly.
Ignite--Not as good since the update, but it's still like having a fourth damaging spell that deals in true damage. Probably your best replacement option next to Surge.
All the Others--Not really worth it.
I learned to play Xerath by watching his Champion Spotlight (highly recommended) and I pick my spells in the same order (Arcanopulse, Mage Chains, Locus of Power. Max Arcanopulse first, then Locus of Power, then Mage Chains, getting the next level of Arcane Barrage every chance you get). The only exception to this is if I'm in the middle lane. In that case, I get Locus of Power before Mage Chains, since I need the harassment capabilities more than the stun (honestly, the odds of killing someone at level 2/3 are minimal, so the stun's not a priority before level 3). If I'm laning with someone, I get Mage Chains before Locus of power, since stunning an enemy might allow my teammate and/or I to pick up some early kills.
Regardless, always start with Arcanopulse, and max it first.
I should tell you now, after the Rabbadon's, every item in this build--and the order you purchase them--is fluid. It really depends on how the match is going, what you personally are struggling with, and what you have the money for at any given time. The build order suggested is meant for when everything is going according to plan and you need to just keep pressing your advantage.
That said, always get the Rabbadon's ASAP. Seriously, on any other caster I would normally suggest starting with a smaller item, but it just isn't worth it with Xerath. The Rabbadon's makes every single item you purchase afterwards more powerful, and the massive boost to his AP (and, consequently, his armor) makes him a force to be reckoned with for the rest of the match. Without it, Xerath is going to seem woefully underpowered and everything will just spiral downwards from there. Seriously, at most you should be getting Boots of Speed before finishing the Deathcap, but unless you're having a miserable game, don't even finish the boots before finishing the Deathcap. It's that important.
UPDATE: Since the introduction of Athene's Unholy Grail, I've started purchasing it first. Why? Well a) the nearly limitless well of mana it grants increases your farming/harassment potential exponentially, b) It grants a pretty decent amount of AP and c) the magic resist it gives you is exceptionally handy against other AP mids. I'll keep testing it out and keep you guys posted.
As I said, the rest of the items are fluid, and my suggestions are outlined above. The order you purchase them is truly up to you and the flow of the game. If they stack Magic resist early, get the Void Staff and Abyssal scepter sooner. If you're consistently running out of mana/health, Rod of Ages it up in here. Use your best judgment.
The only consistent rule I can tell you for buying Xerath's items is to use items that have AP as well as some other effect. If you need armor, and fast, get Zhonya's Hourglass instead of Thornmail or Frozen Heart, since it gives you 50 armor and the AP will give you another 15 (more with your Rabbadon's). If you need Magic Resist, get Lich Bane and/or Abyssal Scepter instead of Force of Nature, since they both have other abilities that drastically help Xerath as well as stacking more AP. If you need health, get Rod of Ages and/or Rylai's. If you need mana, Rod of Ages and/or Archangel's Staff. You see the pattern?
Pros / Cons
I'll list the pros/cons of this build, since you should already know Xerath's pros/cons:
-Extremely powerful. I guarantee 400+ AP by 20 minutes, and I've seen this build get upwards of 700.
-Decent survivability. More AP means more Armor for Xerath, so making him more powerful makes him harder to kill.
-Power without sacrificing versatility. Since power = armor for Xerath, it's easy to throw in items like Rylai's, Lich Bane, and Abyssal Scepter to not only add power, but stack up the utility as well.
-Minimal thought. One reason I love Xerath is how little you need to keep track of. This build capitalizes on that by focusing on stacking AP and letting his natural armor/low cooldowns/magic penetration do the thinking for you.
-Low mana. This build almost never focuses on raising Xerath's rather pathetic mana pool. If you aren't careful, you'll wind up out of mana frequently, and Xerath is utterly useless without his spells. The mana regen can only do so much.
-Slow. Xerath barely breaks 400 movement, even with the minor buff from Locus of Power. If Flash is on cooldown, your only hope is to stun/kill your pursuers, or hope your team saves you.
-Low health. Xerath has reasonable health (for a caster), but I've focused more on stacking armor and magic resist to keep him alive. If they have armor/magic penetration, your health bar will vanish faster than you can say "Oh, SHI-"
-If there are other AP casters on your team (like Vlad, Brand, Annie, etc.), you may want to consider picking up a Will of the Ancients. The Spell Vamp is always nice, and the others will thank you for it in team fights. Plus, they stack, so if you all get one, your team's AP will skyrocket.
-When laning with others, go light on the harassment. Driving the enemies back is useful when you're solo, since you can keep the pressure up, but trapping enemies at the turret screws your teammate. Coordinate with your team to figure out what the right amount of harassment should be.
-If the enemy team is bunched together (team fight, defending a turret, baron, etc.) don't be afraid to open with Arcane Barrage. Xerath's cooldowns are all spectacularly low, and his ultimate ends up with only a 45 second cooldown. Since you'll be dealing roughly 500+ damage per shot with Arcane Barrage, and it does splash damage, let the enemy team have it all at once.
-Xerath can leash for your jungler from the other side of a wall with Arcanopulse. Useful for leashing Blue since it will try to walk all the way around before giving up, giving your jungler plenty of hits on it without fear of retaliation.
-Xerath can engage in teamfights from behind walls without ever being in any threat of danger.
-If the enemy team is going for Baron, camp in the bushes above him and wait for him to be at low life. If you time it right, you can use Arcane Barrage/Arcanopulse to steal Baron out from under them and still easily escape with a head start on the enemy. (This works for when your team tries to get Baron as well, offering you relative safety if the enemy tries to stop your team.)
-Grab the blue buff whenever you think you can. Between gaining mana faster than you can spend it and the reduced cooldowns, you'll not only be scarier in teamfights, but also a fantastic farmer. Just start throwing out Arcaonpulses on every minion wave and rack up the money. While the buff is on, feel free to throw down Arcane Barrage every chance you get (unless you think a teamfight is imminent). It will be off cooldown long before the buff wears off.