Battle system bug fixes

Several bugs in the battle system have been tested and fixed. The battle system should be very playable at this point.