A generic battle calculation class that I use in some of my projects.