improve combat algorithm