diff --git a/AI/VCAI/Goals.cpp b/AI/VCAI/Goals.cpp index 6e433ea67..5192de437 100644 --- a/AI/VCAI/Goals.cpp +++ b/AI/VCAI/Goals.cpp @@ -422,7 +422,17 @@ TSubgoal Win::whatToDoToAchieve() { if(goal.object) { - return sptr(Goals::VisitObj(goal.object->id.getNum())); + auto objRelations = cb->getPlayerRelations(ai->playerID, goal.object->tempOwner); + + if(objRelations == PlayerRelations::ENEMIES) + { + return sptr(Goals::VisitObj(goal.object->id.getNum())); + } + else + { + // TODO: Defance + break; + } } else {