Re. barb cities, maybe it could be checked by waiting till a barb city founds, then reloading to the turn before and looking what units are on the tile. In the code, the IBT sequence spawns barb cities immediately before it spawns barb units, so it couldn't create a unit, then have that unit...