I'm playing a rather cramped 18-civ (well, 17; Sury failed to fogbust) game. Ramesses popped a GSpy very early by building GWall and a couple other wonders before doing anything else. He used it for a Golden Age. With one city, population 5 at most, I'm sure he got a whole lot out of it.
Four more civs have popped GSpies since then. Without exception, they used them to build SY in the city that birthed the Spy, regardless of whether that city was any good for running EPs or not.
void CvUnitAI::AI_merchantMove()
{
PROFILE_FUNC();
if (AI_construct())
{
return;
}
if (AI_discover(true, true))
{
return;
}
int iGoldenAgeValue = (GET_PLAYER(getOwnerINLINE()).AI_calculateGoldenAgeValue() / (GET_PLAYER(getOwnerINLINE()).unitsRequiredForGoldenAge()));
int iDiscoverValue = std::max(1, getDiscoverResearch(NO_TECH));
if (AI_trade(iGoldenAgeValue * 2))
{
return;
}
if (((iGoldenAgeValue * 100) / iDiscoverValue) > 60)
{
if (AI_goldenAge())
{
return;
}
if (AI_trade(iGoldenAgeValue))
{
return;
}
if (iDiscoverValue > iGoldenAgeValue)
{
if (AI_discover())
{
return;
}
if (GET_PLAYER(getOwnerINLINE()).getUnitClassCount(getUnitClassType()) > 1)
{
if (AI_join())
{
return;
}
}
}
}
else
{
if (AI_discover())
{
return;
}
if (AI_join())
{
return;
}
}
if ((GET_PLAYER(getOwnerINLINE()).AI_getPlotDanger(plot(), 2) > 0) ||
(getGameTurnCreated() < (GC.getGameINLINE().getGameTurn() - 25)))
{
if (AI_discover())
{
return;
}
}
if (AI_retreatToCity())
{
return;
}
if (AI_safety())
{
return;
}
getGroup()->pushMission(MISSION_SKIP);
return;
}
But GMerchants don't have a Great Building, so why is that coded?Basically, the GSPies are using the behavioral of GMerchants.
[snip]
1)Build the Great Building, that is the Scotland Yolo.
I'm pretty sure that is true, though hard to remember because... y'know.. the unit is invisible. Found this bit in the patch notes which is probably relevant:I think Karadoc did make his own GSpy code bits.
- Tightened the conditions on espionage usage when using the 'espionage economy' strategy, so that the AI will be a bit less likely to waste all its espionage blowing up factories when it is meant to be stealing techs.
I suspect its got something to do with being so low down on the priority list, I don't recall ever seeing a settled AI GM either.I can't see for instance from that function why the AI doesn't settle a Great Spy. I think there's other code involved.