void CvUnit::doTurn()
{
PROFILE("CvUnit::doTurn()")
FAssertMsg(!isDead(), "isDead did not return false as expected");
FAssertMsg(getGroup() != NULL, "getGroup() is not expected to be equal with NULL");
[COLOR="Red"]
// srpt distant supply mod
CvCity* pNearestCity;
pNearestCity = GC.getMapINLINE().findCity(getX_INLINE(), getY_INLINE(), getOwnerINLINE());
int iDistance;
// srpt end[/COLOR]
testPromotionReady();
if (isBlockading())
{
collectBlockadeGold();
}
if (isSpy() && isIntruding() && !isCargo())
{
TeamTypes eTeam = plot()->getTeam();
if (NO_TEAM != eTeam)
{
if (GET_TEAM(getTeam()).isOpenBorders(eTeam))
{
testSpyIntercepted(plot()->getOwnerINLINE(), GC.getDefineINT("ESPIONAGE_SPY_NO_INTRUDE_INTERCEPT_MOD"));
}
else
{
testSpyIntercepted(plot()->getOwnerINLINE(), GC.getDefineINT("ESPIONAGE_SPY_INTERCEPT_MOD"));
}
}
}
if (baseCombatStr() > 0)
{
FeatureTypes eFeature = plot()->getFeatureType();
if (NO_FEATURE != eFeature)
{
if (0 != GC.getFeatureInfo(eFeature).getTurnDamage())
{
changeDamage(GC.getFeatureInfo(eFeature).getTurnDamage(), NO_PLAYER);
}
}
[COLOR="Red"]// srpt distant supply mod
if (getDomainType() == DOMAIN_LAND)
{
iDistance = plotDistance(getX_INLINE(), getY_INLINE(), pNearestCity->getX_INLINE(), pNearestCity->getY_INLINE());
if (iDistance > 10)
{
changeDamage(10, NO_PLAYER);
}
}
// srpt end[/COLOR]
}