Looking at your code, there is nothing using your MagicRaycast method which seems to be the only thing that detects and does damage to enemies.
That was indeed the issue, thank you for letting me know!