Thanks for all the tips! I have been able to defeat the battle by pulling the wizards away one at a time with some sort of telekenesis spell, then the device won't get charged and is easy to kill.