if you want to trigger it only at a certain point in animation you can add Events to your animations, that way you can check the currently played animation and check for EventOccured(),EventBetween or eventAfter

you can launch the project in visual studio and place breakpoint on the code inside the if statements and see if its ever executed, if it gets to the line if(mana>20) then it works and instead it is if mana which is not working properly or it is the spawn code.

does it spawn the fireball if you have the ! there?(eg checks if its not between those events).