figure out some weirdness with stat setting; they seem to work now and the code correctly figures out when battle ends