本文整理汇总了C++中CvPlot::HasResource方法的典型用法代码示例。如果您正苦于以下问题:C++ CvPlot::HasResource方法的具体用法?C++ CvPlot::HasResource怎么用?C++ CvPlot::HasResource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CvPlot
的用法示例。
在下文中一共展示了CvPlot::HasResource方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PlotFoundValue
//.........这里部分代码省略.........
if (iDistance <= NUM_CITY_RINGS)
#endif
{
if (ePlotResource == NO_RESOURCE)
{
++iDesertCount;
}
}
}
if (bIsInca)
{
if (pLoopPlot->isHills())
{
#if defined(MOD_GLOBAL_CITY_WORKING)
if (iDistance <= pPlayer->getWorkPlotDistance())
#else
if (iDistance <= NUM_CITY_RINGS)
#endif
{
iAdjacentMountains = pLoopPlot->GetNumAdjacentMountains();
if (iAdjacentMountains > 0 && iAdjacentMountains < 6)
{
//give the bonus if it's hills, with additional if bordered by mountains
rtnValue += m_iIncaMultiplier + (iAdjacentMountains * m_iIncaMultiplier);
}
}
}
}
#if defined(MOD_BALANCE_CORE_SETTLER)
if (MOD_BALANCE_CORE_SETTLER)
{
if(pLoopPlot->isWater() && pLoopPlot->HasResource(NO_RESOURCE))
{
iWaterPlot++;
}
if(pLoopPlot == NULL || pLoopPlot->isImpassable() || pLoopPlot->getTerrainType() == TERRAIN_SNOW || pLoopPlot->getFeatureType() == FEATURE_ICE)
{
iBadPlot++;
}
}
#endif
}
}
else // this tile is owned by someone else
{
// See if there are other cities nearby (only count major civs)
if (iClosestEnemyCity > iDistance)
{
if (pLoopPlot->isCity() && (pLoopPlot->getOwner() < MAX_MAJOR_CIVS))
{
iClosestEnemyCity = iDistance;
}
}
}
}
}
#if defined(MOD_BALANCE_CORE_SETTLER)
if (MOD_BALANCE_CORE_SETTLER)
{
iLoopPlots++;
}
#endif
}
}