Skip to content

Commit

Permalink
Also don't downgrade free railroads
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveVision committed Aug 12, 2024
1 parent 7945ab2 commit 80572a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CvGameCoreDLL_Expansion2/CvBuilderTaskingAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2252,8 +2252,10 @@ void CvBuilderTaskingAI::AddRouteDirective(vector<OptionWithScore<BuilderDirecti
if (m_pPlayer->GetSameRouteBenefitFromTrait(pPlot, eRoute))
return;

// don't downgrade routes that our master built (or if we're a minor civ)
if (pPlot->getRouteType() > eRoute && !pPlot->IsRoutePillaged() && (GET_TEAM(m_pPlayer->getTeam()).IsVassal(GET_PLAYER(pPlot->GetPlayerThatBuiltRoute()).getTeam()) || m_pPlayer->isMinorCiv()))
// don't downgrade routes that our master built (or if we're a minor civ, or if we don't have to pay for the route)
TeamTypes eMyTeam = m_pPlayer->getTeam();
if (pPlot->getRouteType() > eRoute && !pPlot->IsRoutePillaged() &&
(m_pPlayer->isMinorCiv() || GET_TEAM(eMyTeam).IsVassal(GET_PLAYER(pPlot->GetPlayerThatBuiltRoute()).getTeam()) || eMyTeam != GET_PLAYER(pPlot->GetPlayerResponsibleForRoute()).getTeam()))
return;

BuildTypes eRouteBuild = GetBuildRoute(eRoute);
Expand Down

0 comments on commit 80572a8

Please sign in to comment.