Perhaps you're confused about the semantics of the of the cannotFoundCity function. It's supposed to return True when the given player is not allowed to found a city on the given tile. It's not specific to any unit type or a particular way of founding a city. All other preconditions for founding a city are still checked by the DLL, and, to actually found a city, a (settler) unit will have to execute a found-city mission. cannotFoundCity doesn't need to worry about those things. Your code (and my version of it should be equivalent) says that the player can found the city so long as no settler is present at the tile, and that, if a settler is present, a ruin also needs to be present. I think (and that's what @P&nny also suggested) it should just say that a ruin is always required. Checking for a unit avoids problems with starting locations on maps that have no ruins, but those problems can be addressed differently, e.g. by checking for the name of the map. Sorry if I'm stating the obvious, I'm not sure where we misunderstand each other.But isn't that the whole point? Without that, Settlers could found cities on other spots than on ruins - or am I misunderstanding you?
Last edited: