[RPG] Can you combine War Caster, whip, and Warlock Features to Eldritch Blast enemies with reach

dnd-5efeatsopportunity-attackreachwarlock

So, Whip is a one-handed martial weapon with reach. Reach is a feature that, among other things, lets you make opportunity attacks with that weapon out to 10 feet instead of just five.

Equipment

Reach (p. 147). This property also
determines your reach for opportunity attacks
with a reach weapon.

— PHB Errata

War Caster lets you cast a spell instead of making an opportunity attack.

Both Hexblade and the Eldritch Invocation Improved Pact Weapon have ways of letting you use a one-handed martial weapon as your spellcasting focus.

So, if you have War Caster, and you have a whip that you can use as a spellcasting focus, would that let you use Eldritch Blast on anyone who provokes an opportunity attack within 10 feet?

As far as I can tell, the real question is whether "spell using the weapon as a spellcasting focus" counts for the "with that weapon" requirement of the Reach property, but I haven't been able to find a clear answer on that.

Best Answer

Yes, but Improved Pact Weapon isn't necessary.

When an enemy moves out of your reach, it provokes an opportunity attack from you, so when an enemy leaves the reach of your whip (by moving beyond 10 feet away from you) it provokes an opportunity attack from you (rules on Combat):

You can make an opportunity attack when a hostile creature that you can see moves out of your reach.

If you have the War Caster feat, when an enemy provokes an opportunity attack from you due to movement, you can forego the opportunity attack and instead use your reaction to cast an eligible spell such as eldritch blast (rules on War Caster):

When a hostile creature's movement provokes an opportunity attack from you, you can use your reaction to cast a spell at the creature, rather than making an opportunity attack.

So, yes, your intended tactic works: the enemy provokes an opportunity attack due to movement, so instead of making an opportunity attack you use your reaction to cast eldritch blast.

However, it's completely irrelevant whether the whip is your spellcasting focus or not. With War Caster, you can provide the somatic components of eldritch blast even if your hands are full of weapons. With Improved Pact Weapon, you could provide the material components of a spell using your pact weapon as your focus, but eldritch blast doesn't have material components, so Improved Pact Weapon isn't necessary to be able to make this tactic work.

All you need is the War Caster feat and a whip.