What determines whether an army retreats or is completely destroyed?