The hobgoblin is a 7th level spellcaster, Its spellcasting ability is Intelligence (spell save DC 13, +5 to hit with spell attacks). It has the following wizard spells prepared:
Cantrips (at will): acid splash, fire bolt, ray of frost, shocking grasp
1st level (4 slots): fog could, magic missile, thunderwave
2nd level (3 slots): gust of wind, Melf's acid arrow, scorching ray
3rd level (3 slots): fireball, fly, lightning bolt
4th level (1 slot): ice storm
Arcane Advantage. Once per turn, the hobgoblin can deal an extra 7 ( 2d6 ) damage to a creature it hits with a damaging spell if that creature is within 5 feet of an ally of the hobgoblin that isn’t incapacitated.
Army Arcana. When the hobgoblin casts a spell that causes damage or that forces other creatures to make a saving throw, it can choose itself and any number of allies to be immune to the damage caused by the spell and to succeed on the saving throw.
Quarterstaff. Melee Weapon Attack: +3 to hit, reach 5 ft., one target. Hit: 4 ( 1d6+1 ) bludgeoning damage, or 5 ( 1d8+1 ) slashing damage if used with two hands.