The combination I listed actually froze my game completely as soon as I built it. Not sure why that would occur since I assume you're calling your functions related to the wand set-up later on attack.
No actually I’m kinda “compiling” the code and pre-calculating the result of a cast, so there is likely a bug there, thank you for reporting