I find those last stands in city squares to be somewhat ridiculous. Are they hardcoded?

Perhaps if not one could change "control" of city to who posess the walls? The walls and square?

Any thoughts?