Spoiler for Warlords Inflation:
Code: int CvPlayer::calculateInflationRate()
{
int iTurns;
int iRate;
iTurns = ((GC.getGameINLINE().getGameTurn() + GC.getGameINLINE().getElapsedGameTurns()) / 2);
iTurns += GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getInflationOffset();
if (iTurns < 0)
{
return 0;
}
iRate = iTurns;
iRate *= GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getInflationPercent();
iRate /= 100;
iRate *= GC.getHandicapInfo(getHandicapType()).getInflationPercent();
iRate /= 100;
if (!isHuman() && !isBarbarian())
{
iRate *= GC.getHandicapInfo(GC.getGameINLINE().getHandicapType()).getAIInflationPercent();
iRate /= 100;
iRate *= max(0, ((GC.getHandicapInfo(GC.getGameINLINE().getHandicapType()).getAIPerEraModifier() * getCurrentEra()) + 100));
iRate /= 100;
}
FAssert(iRate >= 0);
return iRate;
}
int CvPlayer::calculateInflatedCosts()
{
int iCosts;
iCosts = calculatePreInflatedCosts();
iCosts *= max(0, (calculateInflationRate() + 100));
iCosts /= 100;
return iCosts;
}