Fix: barbarians pillaging ancient ruins (#1720)

Co-authored-by: dumichno <57294813+dumichno@users.noreply.github.com>
This commit is contained in:
lyrjie 2020-01-18 22:56:22 +03:00 committed by Yair Morgenstern
parent 02def2ffa9
commit 8efe21ea57

View file

@ -322,7 +322,8 @@ class UnitActions {
fun canPillage(unit: MapUnit, tile: TileInfo): Boolean {
if (tile.improvement == null || tile.improvement == Constants.barbarianEncampment
|| tile.improvement == "City ruins") return false
|| tile.improvement == Constants.ancientRuins
|| tile.improvement == "City ruins") return false
val tileOwner = tile.getOwner()
// 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)