diff --git a/CvGameCoreDLL_Expansion2/CvUnit.cpp b/CvGameCoreDLL_Expansion2/CvUnit.cpp index 5d02e483b1..dad352bbcf 100644 --- a/CvGameCoreDLL_Expansion2/CvUnit.cpp +++ b/CvGameCoreDLL_Expansion2/CvUnit.cpp @@ -1733,6 +1733,7 @@ void CvUnit::reset(int iID, UnitTypes eUnit, PlayerTypes eOwner, bool bConstruct { m_Promotions.Reset(); + m_terrainIgnoreCostCount.clear(); m_terrainDoubleMoveCount.clear(); #if defined(MOD_PROMOTIONS_HALF_MOVE) m_terrainHalfMoveCount.clear(); @@ -1749,6 +1750,7 @@ void CvUnit::reset(int iID, UnitTypes eUnit, PlayerTypes eOwner, bool bConstruct m_extraTerrainAttackPercent.clear(); m_extraTerrainDefensePercent.clear(); + m_featureIgnoreCostCount.clear(); m_featureDoubleMoveCount.clear(); #if defined(MOD_PROMOTIONS_HALF_MOVE) m_featureHalfMoveCount.clear(); @@ -27189,6 +27191,7 @@ void CvUnit::setHasPromotion(PromotionTypes eIndex, bool bNewValue) { changeExtraTerrainAttackPercent(((TerrainTypes)iI), (thisPromotion.GetTerrainAttackPercent(iI) * iChange)); changeExtraTerrainDefensePercent(((TerrainTypes)iI), (thisPromotion.GetTerrainDefensePercent(iI) * iChange)); + changeTerrainIgnoreCostCount(((TerrainTypes)iI), ((thisPromotion.GetTerrainIgnoreCost(iI)) ? iChange : 0)); changeTerrainDoubleMoveCount(((TerrainTypes)iI), ((thisPromotion.GetTerrainDoubleMove(iI)) ? iChange : 0)); #if defined(MOD_PROMOTIONS_HALF_MOVE) changeTerrainHalfMoveCount(((TerrainTypes)iI), ((thisPromotion.GetTerrainHalfMove(iI)) ? iChange : 0)); @@ -27204,6 +27207,7 @@ void CvUnit::setHasPromotion(PromotionTypes eIndex, bool bNewValue) { changeExtraFeatureAttackPercent(((FeatureTypes)iI), (thisPromotion.GetFeatureAttackPercent(iI) * iChange)); changeExtraFeatureDefensePercent(((FeatureTypes)iI), (thisPromotion.GetFeatureDefensePercent(iI) * iChange)); + changeFeatureIgnoreCostCount(((FeatureTypes)iI), ((thisPromotion.GetFeatureIgnoreCost(iI)) ? iChange : 0)); changeFeatureDoubleMoveCount(((FeatureTypes)iI), ((thisPromotion.GetFeatureDoubleMove(iI)) ? iChange : 0)); #if defined(MOD_PROMOTIONS_HALF_MOVE) changeFeatureHalfMoveCount(((FeatureTypes)iI), ((thisPromotion.GetFeatureHalfMove(iI)) ? iChange : 0)); diff --git a/CvGameCoreDLL_Expansion2/CvUnitMovement.cpp b/CvGameCoreDLL_Expansion2/CvUnitMovement.cpp index 9aaa12701f..9256f74d36 100644 --- a/CvGameCoreDLL_Expansion2/CvUnitMovement.cpp +++ b/CvGameCoreDLL_Expansion2/CvUnitMovement.cpp @@ -237,6 +237,12 @@ int CvUnitMovement::GetCostsForMove(const CvUnit* pUnit, const CvPlot* pFromPlot bIgnoreTerrainCost = true; bNoRiverCrossingPenalty = true; // as specified by Incan UA } + else if (pToPlot->isHills() && pUnit->isTerrainIgnoreCost(TERRAIN_HILL)) + { + bIgnoreTerrainCost = true; + if (/*FALSE*/ GD_INT_GET(IGNORE_SPECIFIC_TERRAIN_COSTS_INCLUDES_RIVERS) > 0) + bNoRiverCrossingPenalty = true; + } else if (pUnit->isTerrainIgnoreCost(eToTerrain)) { bIgnoreTerrainCost = true;