Code from Tim, implementation of combat and special effects