/*************************************************************************************************/
/** BETTER_BTS_AI_MOD 01/21/09 jdog5000 */
/** */
/** Naval AI, bugfix */
/*************************************************************************************************/
if( iCargo >= iTargetInvasionSize )
{
bAttack = true;
}
if ((iCargo >= iTargetReinforcementSize) || (bFull && iCargo > cargoSpace()))
{
bReinforce = true;
}
CvPlot* pAdjacentPlot = NULL;
for (int iI = 0; iI < NUM_DIRECTION_TYPES; iI++)
{
pAdjacentPlot = plotDirection(getX_INLINE(), getY_INLINE(), ((DirectionTypes)iI));
[B]if (pAdjacentPlot == NULL)
{
continue;
}[/B]
if(iCargo > 0 )
{
CvCity* pAdjacentCity = pAdjacentPlot->getPlotCity();
if( pAdjacentCity != NULL && pAdjacentCity->getOwner() == getOwnerINLINE() && pAdjacentCity->getPreviousOwner() != NO_PLAYER )
{
if( (GC.getGameINLINE().getGameTurn() - pAdjacentCity->getGameTurnAcquired()) < 5 )
{
// If just captured city and we have some cargo, dump units in city
getGroup()->pushMission(MISSION_MOVE_TO, pAdjacentPlot->getX_INLINE(), pAdjacentPlot->getY_INLINE(), 0, false, false, MISSIONAI_ASSAULT, pAdjacentPlot);
return;
}
}
}
else
{
if (pAdjacentPlot->isOwned() && isEnemy(pAdjacentPlot->getTeam()))
{