RR4- Spain on a lake..... Again :p

The function is in the dll and it is called doReligion IIRC.

Edit: it is CvGame::doHolyCity ....

Code:
void CvGame::doHolyCity()
{
	PlayerTypes eBestPlayer;
	TeamTypes eBestTeam;
	long lResult;
	int iValue;
	int iBestValue;
	int iI, iJ, iK;

	lResult = 0;
	gDLL->getPythonIFace()->callFunction(PYGameModule, "doHolyCity", NULL, &lResult);
	if (lResult == 1)
	{
		return;
	}

	if (getElapsedGameTurns() < 5 && !isOption(GAMEOPTION_ADVANCED_START))
	{
		return;
	}

	int iRandOffset = getSorenRandNum(GC.getNumReligionInfos(), "Holy City religion offset");
	for (int iLoop = 0; iLoop < GC.getNumReligionInfos(); ++iLoop)
	{
		iI = ((iLoop + iRandOffset) % GC.getNumReligionInfos());

		if (!isReligionSlotTaken((ReligionTypes)iI))
		{
			iBestValue = MAX_INT;
			eBestTeam = NO_TEAM;

			for (iJ = 0; iJ < MAX_TEAMS; iJ++)
			{
				if (GET_TEAM((TeamTypes)iJ).isAlive())
				{
					if (GET_TEAM((TeamTypes)iJ).isHasTech((TechTypes)(GC.getReligionInfo((ReligionTypes)iI).getTechPrereq())))
					{
						if (GET_TEAM((TeamTypes)iJ).getNumCities() > 0)
						{
							iValue = getSorenRandNum(10, "Found Religion (Team)");

							for (iK = 0; iK < GC.getNumReligionInfos(); iK++)
							{
								int iReligionCount = GET_TEAM((TeamTypes)iJ).getHasReligionCount((ReligionTypes)iK);

								if (iReligionCount > 0)
								{
									iValue += iReligionCount * 20;
								}
							}

							if (iValue < iBestValue)
							{
								iBestValue = iValue;
								eBestTeam = ((TeamTypes)iJ);
							}
						}
					}
				}
			}

			if (eBestTeam != NO_TEAM)
			{
				iBestValue = MAX_INT;
				eBestPlayer = NO_PLAYER;

				for (iJ = 0; iJ < MAX_PLAYERS; iJ++)
				{
					if (GET_PLAYER((PlayerTypes)iJ).isAlive())
					{
						if (GET_PLAYER((PlayerTypes)iJ).getTeam() == eBestTeam)
						{
							if (GET_PLAYER((PlayerTypes)iJ).getNumCities() > 0)
							{
								iValue = getSorenRandNum(10, "Found Religion (Player)");

								if (!(GET_PLAYER((PlayerTypes)iJ).isHuman()))
								{
									iValue += 10;
								}

								for (iK = 0; iK < GC.getNumReligionInfos(); iK++)
								{
									int iReligionCount = GET_PLAYER((PlayerTypes)iJ).getHasReligionCount((ReligionTypes)iK);

									if (iReligionCount > 0)
									{
										iValue += iReligionCount * 20;
									}
								}

								if (iValue < iBestValue)
								{
									iBestValue = iValue;
									eBestPlayer = ((PlayerTypes)iJ);
								}
							}
						}
					}
				}

				if (eBestPlayer != NO_PLAYER)
				{
					ReligionTypes eReligion = (ReligionTypes)iI;

					if (isOption(GAMEOPTION_PICK_RELIGION))
					{
						eReligion = GET_PLAYER(eBestPlayer).AI_chooseReligion();
					}

					if (NO_RELIGION != eReligion)
					{
						GET_PLAYER(eBestPlayer).foundReligion(eReligion, (ReligionTypes)iI, false);
					}
				}
			}
		}
	}
}
 
Then a random number is generated, all the modifieres are applied and the city with the smaller number gets to be the holy city.
That doesn't sound right. From what I have read elsewhere, and my own experience, it isn't strictly the one with the smaller result, but that one just has better odds of getting it.
 
Oh forget abt the hydra .... so no settler. But I ha d abad feeling abt this.

Anyway, we got the second head:

RR-Spain-BC2440-Judaism.jpg

And revolted to OR:


And got Stonehenge

RR-Spain-BC2400-Stonehenge.jpg

Unfortunately, our warrior decided to look for hydra in the wrong place -- belly of lions. So, I started a warrior after stonehenge, before going to Oracle. I played until BW (good news, copper nearby):

RR-Spain-BC1760-copper.jpg

Cyrus revolted to slavery 4 turns, I see no reason to revolt immediately, we are spiritual, so revolt only when needed.

I had also gotten a worker out the same time as BW for chopping. Suggest hunting next. to connect the ivory. Ir will also lead to Animal Husbandry for the cows. Ofcourse alternative is to get Farming.
 

Attachments

City SE of copper looks great. Coastal connection to cap, 3 resources which need the same techs as those in the cap in the inner circle, plainshill, decent amount of forests nearby, hills... probabely your early HE city?
 
i like due south of the copper, three plains hills, copper, rice and cows plus two grasslands that can be irrigated. sounds like military city to me
 
Well I didn't get a lot of a break...

Still in the queue with Sunday night at the earliest...
 
Yes, I am up for hopefully tonight
 
1760 BC
I don't know why the worker is unordered. I don't like inheriting an incomplete turn.

I swap to writing immediately. If we get the Oracle, then we can have our three-headed hydra. :hammer: :hammer:


1160 BC
Did you think this would be the third head of the Hydra? :hammer: :hammer: :hammer: :hammer:



Did you know we are medieval already?


Two warriors are starting to move to the copper site. A settler is in the queue. Research is now toward improvement techs with hunting completed, and animal husbandry for the cows.

The big debate is how soon for the AP? Don't forget it is more yummy prophet points, and I would love the extra hammers.
 
Oh, the worker was unordered because it depends on what tech the next player (i.e. you) choose next. If you keep to hunting, then better to move the worker to the iveory. If you want to hurry up Oracle, then move to the hill to chop and mine would be better.

Good job with the oracle. 3 headed hydra. Do we want a forth head (Prophet bulb)? Then we have to plan our tech carefully to have the prophet bulb CoL. Else, I suggest we expediate our settling.

The save is missing.

-
 
The big debate is how soon for the AP? Don't forget it is more yummy prophet points, and I would love the extra hammers.

In case we really want a fourth head, I'd suggest now.. But I won't wait for the settler any longer..
So do we want to go for the fourth head?? Otherwise we should discuss a dotmat!:clap:
 
I don't think another head would be advisable. You should focus on getting your cities up. The prophet better builds a shrine or so... to help your eco instead of being bulbed. You can still try to be first to confucianism...
 
I'd suggest cities and military are the order of the day now,
 
Cities and army are paramount now ... we have been playing a (lousy) OCC so far. And we have monty nearby, remember? I'm surprised that he didn't gave us a visit until now, to say the truth :p
 
And of course the thing of most importance... the save :lol::lol::lol:
 
Back
Top Bottom