Can no longer pillage city ruins - #914

This commit is contained in:
Yair Morgenstern 2019-06-30 19:37:49 +03:00
parent 1898c6f9f1
commit 76187efc3d

View file

@ -254,7 +254,8 @@ class UnitActions {
} }
fun canPillage(unit: MapUnit, tile: TileInfo): Boolean { fun canPillage(unit: MapUnit, tile: TileInfo): Boolean {
if(tile.improvement==null || tile.improvement==Constants.barbarianEncampment) return false if(tile.improvement==null || tile.improvement==Constants.barbarianEncampment
|| tile.improvement=="City ruins") return false
val tileOwner = tile.getOwner() val tileOwner = tile.getOwner()
// Can't pillage friendly tiles, just like you can't attack them - it's an 'act of war' thing // Can't pillage friendly tiles, just like you can't attack them - it's an 'act of war' thing
return tileOwner==null || tileOwner==unit.civInfo || unit.civInfo.isAtWarWith(tileOwner) return tileOwner==null || tileOwner==unit.civInfo || unit.civInfo.isAtWarWith(tileOwner)