-
Notifications
You must be signed in to change notification settings - Fork 29
Description
When a city (city A) is captured (and currently destroyed by default), a neighboring city (city B) that has a connecting tile, meaning a tile that is there because of Law 7 or 8
Prototype/C7Engine/C7GameData/GameData.cs
Line 151 in 1cc3933
| foreach (Tile t in player.tileKnowledge.knownTiles.Where(t => t.owningCity == null && t.GetEdgeNeighbors().Any(e => e.owningCity != null)).ToList()) { |
remains in the city that can't actually justify owning it now that city A is gone.
We do calcuate the tiles after capture here
Prototype/C7Engine/C7GameData/GameData.cs
Line 183 in 1cc3933
| UpdateTileOwners(); |
but we need to recalculate the affected tiles, and remove ownership of tiles that we can't justify.
To be cleared, the tile is not justified because 1. the owning city hasn't expanded, 2. its existance is solely because of border laws.
Also, when removing tile ownership from CityA, here
Prototype/C7Engine/C7GameData/GameData.cs
Line 179 in 1cc3933
| foreach (Tile tile in city.GetTilesWithinBorders()) { |
I am not sure that's enough and we don't end up with leftover tile ownership that we can't just see, I haven't tested for that, it's merely a thought.
But in any case, we should go through with the fix for the tiles with the destroyed city too, because the dangling tile could have been in the destroyed city's ownership just as well that GetTilesWithinBorders() wouldn't be able to retrieve.
Here is an screenshot to better visualize the scenario
After another civ captured my Old City (expanded once), the tile that belongs to Utrecht marked with X should have been removed but remains in Utrecht's ownership.