mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Fixed #402 - couldn't build wonder if it was being built by a rival civ
This commit is contained in:
parent
c282ffb423
commit
2fdd3e2628
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 847 KiB After Width: | Height: | Size: 840 KiB |
@ -169,11 +169,14 @@ class Building : NamedStats(), IConstruction{
|
||||
if (uniqueTo!=null && uniqueTo!=civInfo.civName) return false
|
||||
if (GameBasics.Buildings.values.any { it.uniqueTo==civInfo.civName && it.replaces==name }) return false
|
||||
if (requiredTech != null && !civInfo.tech.isResearched(requiredTech!!)) return false
|
||||
if (isWonder && requiredBuildingInAllCities==null
|
||||
&& civInfo.gameInfo.civilizations.flatMap { it.cities }.any {
|
||||
it.cityConstructions.isBuilding(name) || it.cityConstructions.isBuilt(name)
|
||||
})
|
||||
return false
|
||||
if (isWonder && requiredBuildingInAllCities==null){
|
||||
if(civInfo.gameInfo.civilizations.flatMap { it.cities }
|
||||
.any {it.cityConstructions.isBuilt(name)})
|
||||
return false
|
||||
|
||||
if(civInfo.cities.any { it!=construction.cityInfo && it.cityConstructions.isBuilding(name) })
|
||||
return false
|
||||
}
|
||||
|
||||
if (requiredBuilding != null && !construction.containsBuildingOrEquivalent(requiredBuilding!!)) return false
|
||||
if (requiredBuildingInAllCities != null && civInfo.cities.any { !it.cityConstructions.containsBuildingOrEquivalent(requiredBuildingInAllCities!!) })
|
||||
|
Loading…
x
Reference in New Issue
Block a user