Resolved #5713 - AI doesn't try attacking with non-attack units

This commit is contained in:
yairm210
2021-11-29 22:45:54 +02:00
parent b9d2078442
commit 57f3bf2bb2

View File

@ -129,7 +129,7 @@ object UnitAutomation {
// Might die next turn - move!
if (unit.health <= unit.getDamageFromTerrain() && tryHealUnit(unit)) return
if (unit.isCivilian()) {
if (unit.isCivilian() || unit.hasUnique(UniqueType.CannotAttack)) {
if (tryRunAwayIfNeccessary(unit)) return
if (unit.hasUnique(UniqueType.FoundCity))