With the barracks, and dark barracks, you can queue troops even if the camps are full, and thus some of your troops have been trained by the time you come out of a battle. I would like it if this were to happen with the spell factory aswell-eg a lvl 3 gets 5 slots, but only 3 that can be taken into battle.
