mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-18 03:38:55 +07:00
Fix: barbarians pillaging ancient ruins (#1720)
Co-authored-by: dumichno <57294813+dumichno@users.noreply.github.com>
This commit is contained in:
@ -322,7 +322,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
|
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()
|
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)
|
||||||
|
Reference in New Issue
Block a user