When I was working on NPC scripting, I added the ability to cast spells in the script. As part of a quest, where you have to fight the quest giver, I made this NPC cast a fireball when his health dropped below a certain amount. The fireballs are supposed to explode on impact.
I was in for a completely unexpected moment.
To test it out, I started with a fireball myself to pass that health threshold and trigger the NPC to cast, and well, the result was not what I expected. :D
Check out in the clip below: