// Returns true if attack was made...
bool CvSelectionGroup::groupAttack(int iX, int iY, int iFlags, bool& bFailedAlreadyFighting)
{
PROFILE_FUNC();
/************************************************************************************************/
/* DCM 04/19/09 Johny Smith */
/************************************************************************************************/
// Dale - SA: Stack Attack START
if (GC.isDCM_STACK_ATTACK())
{
return groupStackAttack(iX, iY, iFlags, bFailedAlreadyFighting);
}
// Dale - SA: Stack Attack END
/************************************************************************************************/
/* DCM END */
/************************************************************************************************/
/************************************************************************************************/
/* RevolutionDCM 04/19/09 Glider1 */
/************************************************************************************************/
// RevolutionDCM - attack support
CvPlot* pOrigPlot = plot();
CLLNode<IDInfo>* pUnitNode;
CvUnit* pLoopUnit;
CvPlot* pDestPlot = GC.getMapINLINE().plotINLINE(iX, iY);
// RevolutionDCM - end
/************************************************************************************************/
/* RevolutionDCM END Glider1 */
/************************************************************************************************/
if (iFlags & MOVE_THROUGH_ENEMY)
{
if (generatePath(plot(), pDestPlot, iFlags))
{
pDestPlot = getPathFirstPlot();
}
}
FAssertMsg(pDestPlot != NULL, "DestPlot is not assigned a valid value");
bool bStack = (isHuman() && ((getDomainType() == DOMAIN_AIR) || GET_PLAYER(getOwnerINLINE()).isOption(PLAYEROPTION_STACK_ATTACK)));
bool bAttack = false;
bFailedAlreadyFighting = false;
if (getNumUnits() > 0)
{
if ((getDomainType() == DOMAIN_AIR) || (stepDistance(getX(), getY(), pDestPlot->getX_INLINE(), pDestPlot->getY_INLINE()) == 1))
{