Opera
Deity
- Joined
- Sep 21, 2008
- Messages
- 4,643
Oh, so this is what purity is? It means that if they have a new religion appearing, if they already have another religion widespread, they will consider the new one much less? It kinda makes sense. I'll take a look...
Edit: Just checked. I don't quite understand it. Don't know why but the logic of this snippet of code eludes me.
This purity thing bugs me.
Edit: Just checked. I don't quite understand it. Don't know why but the logic of this snippet of code eludes me.
Code:
int iBestCount = getHasReligionCount(eBestReligion);
int iSpreadPercent = (iBestCount * 100) / std::max(1, getNumCities());
int iPurityPercent = (iBestCount * 100) / std::max(1, countTotalHasReligion());
if (iPurityPercent < 49)
{
if (iSpreadPercent > ((eBestReligion == eFavorite) ? 65 : 75))
{
if (iPurityPercent > ((eBestReligion == eFavorite) ? 25 : 32))
{
return eBestReligion;
}
}
return NO_RELIGION;
}