Javascript proof of concept for a battle system. Hopefully this gets put into a larger project.