Do not wake up a general or a worker if they are protected (#2383)
This commit is contained in:
parent
84f41341f6
commit
4cc10aa38f
1 changed files with 3 additions and 2 deletions
|
@ -450,8 +450,9 @@ class MapUnit {
|
|||
attacksThisTurn = 0
|
||||
due = true
|
||||
|
||||
// Wake sleeping units if there's an enemy nearby
|
||||
if (isSleeping() && currentTile.getTilesInDistance(2).any {
|
||||
// Wake sleeping units if there's an enemy nearby and civilian is not protected
|
||||
if (isSleeping() && (!type.isCivilian() || currentTile.militaryUnit == null) &&
|
||||
currentTile.getTilesInDistance(2).any {
|
||||
it.militaryUnit != null && it.militaryUnit!!.civInfo.isAtWarWith(civInfo)
|
||||
})
|
||||
action = null
|
||||
|
|
Loading…
Reference in a new issue