To be more specific, the character in question is a Ranger using the 'ranger without spells' from the UA article on variant class designs, but the same thing can be done by a fighter-3 (battlemaster)/ranger (hunter)-3. And we also have Rogue (Assassin)-6.
Our ranger and our rogue are both adjacent to a troll and no other enemy is
adjacent to the troll. The ranger attacks, dealing damage, then declares the use of Horde Breaker because the rogue is "a different creature that is within 5 feet of the target and within range of your weapon". (Horde Breaker)
Then our ranger proceeds to "forgo one of your attacks and use a bonus action to direct one of your companions to strike," (Commander's Strike) and has the rogue assassinate the troll, again.
So, Can you use Horde Breaker to gain an additional attack (against an ally) and then give up that attack for commander's strike so your ally gains an attack?
Best Answer
Yes, you can forgo the additional attack from Horde Breaker and use Commander's Strike.
Horde Breaker says:
and Commander's Strike says:
You take the Attack action meeting the first criteria of Commander's Strike. You make the attack while another creature is within reach of your weapon and 5 feet of the target meeting the criteria for Horde Breaker. You gain an additional attack which is not a bonus action so must still be under the umbrella of the Attack action (not that this is a requirement). You forgo that attack meeting the second criteria of Commander's Strike and use your bonus action meeting the third.
Well spotted.