battle calc bug with retreat