VALIDATE_OBJECT
int iCultureThreshold = /*15*/ GC.getCULTURE_COST_FIRST_PLOT();
float fExponent = /*1.1f*/ GC.getCULTURE_COST_LATER_PLOT_EXPONENT();
int iPolicyExponentMod = GET_PLAYER(m_eOwner).GetPlotCultureExponentModifier();
if(iPolicyExponentMod != 0)
{
fExponent = fExponent * (float)((100 + iPolicyExponentMod));
fExponent /= 100.0f;
}
int iAdditionalCost = GetJONSCultureLevel() * /*8*/ GC.getCULTURE_COST_LATER_PLOT_MULTIPLIER();
iAdditionalCost = (int) pow((double) iAdditionalCost, (double)fExponent);
iCultureThreshold += iAdditionalCost;
// More expensive for Minors to claim territory
if(GET_PLAYER(getOwner()).isMinorCiv())
{
iCultureThreshold *= /*150*/ GC.getMINOR_CIV_PLOT_CULTURE_COST_MULTIPLIER();
iCultureThreshold /= 100;
}
// Religion modifier
int iReligionMod = 0;
ReligionTypes eMajority = GetCityReligions()->GetReligiousMajority();
if(eMajority != NO_RELIGION)
{
const CvReligion* pReligion = GC.getGame().GetGameReligions()->GetReligion(eMajority, getOwner());
if(pReligion)
{
iReligionMod = pReligion->m_Beliefs.GetPlotCultureCostModifier(getOwner());
BeliefTypes eSecondaryPantheon = GetCityReligions()->GetSecondaryReligionPantheonBelief();
if (eSecondaryPantheon != NO_BELIEF)
{
iReligionMod += GC.GetGameBeliefs()->GetEntry(eSecondaryPantheon)->GetPlotCultureCostModifier();
}
}
}
// -50 = 50% cost
int iModifier = GET_PLAYER(getOwner()).GetPlotCultureCostModifier() + m_iPlotCultureCostModifier + iReligionMod;
if(iModifier != 0)
{
iModifier = max(iModifier, /*-85*/ GC.getCULTURE_PLOT_COST_MOD_MINIMUM()); // value cannot reduced by more than 85%
iCultureThreshold *= (100 + iModifier);
iCultureThreshold /= 100;
}
// Game Speed Mod
iCultureThreshold *= GC.getGame().getGameSpeedInfo().getCulturePercent();
iCultureThreshold /= 100;
// Make the number not be funky
int iDivisor = /*5*/ GC.getCULTURE_COST_VISIBLE_DIVISOR();
if(iCultureThreshold > iDivisor * 2)
{
iCultureThreshold /= iDivisor;
iCultureThreshold *= iDivisor;
}
return iCultureThreshold;