diff --git a/CvGameCoreDLL_Expansion2/CvBarbarians.cpp b/CvGameCoreDLL_Expansion2/CvBarbarians.cpp index 0544570232..ea61c48ba0 100644 --- a/CvGameCoreDLL_Expansion2/CvBarbarians.cpp +++ b/CvGameCoreDLL_Expansion2/CvBarbarians.cpp @@ -1137,7 +1137,7 @@ void CvBarbarians::SpawnBarbarianUnits(CvPlot* pPlot, int iNumUnits, BarbSpawnRe continue; ResourceTypes eLoopPlotResource = pLoopPlot->getResourceType(); - if (eLoopPlotResource != NO_RESOLUTION && std::find(vValidResources.begin(), vValidResources.end(), eResource) == vValidResources.end()) + if (eLoopPlotResource != NO_RESOURCE && std::find(vValidResources.begin(), vValidResources.end(), eLoopPlotResource) == vValidResources.end()) { vValidResources.push_back(eResource); } diff --git a/CvGameCoreDLL_Expansion2/CvBuilderTaskingAI.cpp b/CvGameCoreDLL_Expansion2/CvBuilderTaskingAI.cpp index 443aa93cbc..97f0d18696 100644 --- a/CvGameCoreDLL_Expansion2/CvBuilderTaskingAI.cpp +++ b/CvGameCoreDLL_Expansion2/CvBuilderTaskingAI.cpp @@ -2965,6 +2965,10 @@ pair CvBuilderTaskingAI::ScorePlotBuild(CvPlot* pPlot, ImprovementTypes break; case LIKELYHOOD_UNLIKELY: iSecondaryScore += 40; + break; + case LIKELYHOOD_IMPOSSIBLE: + // No bonus for blocking tile steal if theft is impossible + break; } } else if (pkImprovementInfo && pkImprovementInfo->IsCreatedByGreatPerson() && !bIsCultureBomb) @@ -2982,6 +2986,10 @@ pair CvBuilderTaskingAI::ScorePlotBuild(CvPlot* pPlot, ImprovementTypes break; case LIKELYHOOD_UNLIKELY: iSecondaryScore -= 40; + break; + case LIKELYHOOD_IMPOSSIBLE: + // No penalty for great person improvements if theft is impossible + break; } } @@ -4195,7 +4203,7 @@ void CvBuilderTaskingAI::SetupExtraXAdjacentPlotsForBuild(BuildTypes eBuild, Imp if (!pPlot->canBuild(eBuild, m_pPlayer->GetID(), false, false, true)) continue; - if (pPlot->canBuild(eBuild, m_pPlayer->GetID()), false, false) + if (pPlot->canBuild(eBuild, m_pPlayer->GetID(), false, false)) { m_extraPlotsForXAdjacentImprovements[eImprovement].insert(pPlot);