mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 22:00:24 +07:00
Added 'mountain within 2 tiles' restriction to Machu Picchu as per #1762
This commit is contained in:
@ -119,6 +119,7 @@ Mint =
|
|||||||
Machu Picchu =
|
Machu Picchu =
|
||||||
'Few romances can ever surpass that of the granite citadel on top of the beetling precipices of Machu Picchu, the crown of Inca Land.' - Hiram Bingham =
|
'Few romances can ever surpass that of the granite citadel on top of the beetling precipices of Machu Picchu, the crown of Inca Land.' - Hiram Bingham =
|
||||||
Gold from all trade routes +25% =
|
Gold from all trade routes +25% =
|
||||||
|
Must have an owned mountain within 2 tiles =
|
||||||
|
|
||||||
Aqueduct =
|
Aqueduct =
|
||||||
40% of food is carried over after a new citizen is born =
|
40% of food is carried over after a new citizen is born =
|
||||||
|
@ -226,24 +226,30 @@ class Building : NamedStats(), IConstruction{
|
|||||||
if (construction.isBeingConstructed(name)) return "Is being built"
|
if (construction.isBeingConstructed(name)) return "Is being built"
|
||||||
if (construction.isEnqueued(name)) return "Already enqueued"
|
if (construction.isEnqueued(name)) return "Already enqueued"
|
||||||
|
|
||||||
|
val cityCenter = construction.cityInfo.getCenterTile()
|
||||||
if ("Must be next to desert" in uniques
|
if ("Must be next to desert" in uniques
|
||||||
&& !construction.cityInfo.getCenterTile().getTilesInDistance(1).any { it.baseTerrain == Constants.desert })
|
&& !cityCenter.getTilesInDistance(1).any { it.baseTerrain == Constants.desert })
|
||||||
return "Must be next to desert"
|
return "Must be next to desert"
|
||||||
|
|
||||||
if ("Must be next to mountain" in uniques
|
if ("Must be next to mountain" in uniques
|
||||||
&& !construction.cityInfo.getCenterTile().neighbors.any { it.baseTerrain == Constants.mountain })
|
&& !cityCenter.neighbors.any { it.baseTerrain == Constants.mountain })
|
||||||
return "Must be next to mountain"
|
return "Must be next to mountain"
|
||||||
|
|
||||||
|
if("Must have an owned mountain within 2 tiles" in uniques
|
||||||
|
&& !cityCenter.getTilesInDistance(2)
|
||||||
|
.any { it.baseTerrain==Constants.mountain && it.getOwner()==construction.cityInfo.civInfo })
|
||||||
|
return "Must be within 2 tiles of an owned mountain"
|
||||||
|
|
||||||
if("Must not be on plains" in uniques
|
if("Must not be on plains" in uniques
|
||||||
&& construction.cityInfo.getCenterTile().baseTerrain==Constants.plains)
|
&& cityCenter.baseTerrain==Constants.plains)
|
||||||
return "Must not be on plains"
|
return "Must not be on plains"
|
||||||
|
|
||||||
if("Must not be on hill" in uniques
|
if("Must not be on hill" in uniques
|
||||||
&& construction.cityInfo.getCenterTile().baseTerrain==Constants.hill)
|
&& cityCenter.baseTerrain==Constants.hill)
|
||||||
return "Must not be on hill"
|
return "Must not be on hill"
|
||||||
|
|
||||||
if("Can only be built in coastal cities" in uniques
|
if("Can only be built in coastal cities" in uniques
|
||||||
&& !construction.cityInfo.getCenterTile().isCoastalTile())
|
&& !cityCenter.isCoastalTile())
|
||||||
return "Can only be built in coastal cities"
|
return "Can only be built in coastal cities"
|
||||||
|
|
||||||
if("Can only be built in annexed cities" in uniques
|
if("Can only be built in annexed cities" in uniques
|
||||||
@ -258,8 +264,7 @@ class Building : NamedStats(), IConstruction{
|
|||||||
|
|
||||||
// Regular wonders
|
// Regular wonders
|
||||||
if (isWonder){
|
if (isWonder){
|
||||||
if(civInfo.gameInfo.getCities()
|
if(civInfo.gameInfo.getCities().any {it.cityConstructions.isBuilt(name)})
|
||||||
.any {it.cityConstructions.isBuilt(name)})
|
|
||||||
return "Wonder is already built"
|
return "Wonder is already built"
|
||||||
|
|
||||||
if(civInfo.cities.any { it!=construction.cityInfo && it.cityConstructions.isBeingConstructed(name) })
|
if(civInfo.cities.any { it!=construction.cityInfo && it.cityConstructions.isBeingConstructed(name) })
|
||||||
|
Reference in New Issue
Block a user