// From Lead From Behind by UncutDragon
// original
//CvUnit* pDefender = pPlot->getBestDefender(NO_PLAYER, getOwnerINLINE(), this, true);
//if (NULL != pDefender)
//{
// if (!canAttack(*pDefender))
// {
// return false;
// }
//}
// modified
if( combatLimit() < 100 )
{
CvUnit* pDefender = pPlot->getBestDefender(NO_PLAYER, getOwnerINLINE(), this, true);
if (NULL != pDefender)
{
if (!canAttack(*pDefender))
{
return false;
}
}
}
else if (!pPlot->hasDefender(true, NO_PLAYER, getOwnerINLINE(), this, true))
{
return false;
}