In Dragon Defense by Tyler Frisbee, you assume the role of a wizard defending a castle wall against an army of dragons. Each time a dragon hits the wall or blasts it with fire, part of the wall crumbles. If the dragon makes it past the wall or you lose all 3 of your lives, the game is over.

By collecting mana potions (represented by the ball), you are able to cast four different spells. Each spell requires a different amount of mana points. You can cast a shield spell (0 mana points) by pressing the fire button, an attack spell (1 mana point) by moving the joystick to the right while pressing the fire button, a healing spell (4 mana points) which regenerates the 3 lives you begin with by moving the joystick to the left while pressing the fire button, and finally a spell which rebuilds any damage caused to the castle wall (8 mana points) by moving the joystick down while pressing the fire button. You gain a point for every dragon you kill.

http://atariage.com/forums/topic/235042-my-first-game-dragon-defense/