National wonders are now removed from captured cities (hence "National")

This commit is contained in:
Yair Morgenstern 2018-06-17 23:22:09 +03:00
parent 92495f63ee
commit 8116a72fdf

View file

@ -127,6 +127,11 @@ class Battle(val gameInfo:GameInfo=UnCivGame.Current.gameInfo) {
enemyCiv.cities.first().cityConstructions.builtBuildings.add("Palace") // relocate palace
}
}
// Remove all national wonders when conquering a city
for(building in city.cityConstructions.getBuiltBuildings().filter { it.requiredBuildingInAllCities!=null })
city.cityConstructions.builtBuildings.remove(building.name)
(attacker as MapUnitCombatant).unit.moveToTile(city.getCenterTile())
city.civInfo.gameInfo.updateTilesToCities()
}