void CvPlayer::doPrices()
{
if (isEurope())
{
for (int iYield = 0; iYield < NUM_YIELD_TYPES; ++iYield)
{
YieldTypes eYield = (YieldTypes) iYield;
CvYieldInfo& kYield = GC.getYieldInfo(eYield);
if (kYield.isCargo())
{
// R&R, Androrc Price Recovery
GC.getGameINLINE().changeYieldBoughtTotal(getID(), eYield, kYield.getEuropeVolumeAttrition());
//Androrc End
int iBaseThreshold = kYield.getPriceChangeThreshold() * GC.getHandicapInfo(getHandicapType()).getEuropePriceThresholdMultiplier() * GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getGrowthPercent() / 10000;
int iNewPrice = kYield.getBuyPriceLow() + GC.getGameINLINE().getSorenRandNum(kYield.getBuyPriceHigh() - kYield.getBuyPriceLow() + 1, "Price selection");
iNewPrice += getYieldBoughtTotal(eYield) / std::max(1, iBaseThreshold);
if (GC.getGameINLINE().getSorenRandNum(100, "Price correction") < kYield.getPriceCorrectionPercent() * std::abs(iNewPrice - getYieldBuyPrice(eYield)))
{
iNewPrice = std::min(iNewPrice, getYieldBuyPrice(eYield) + 1);
iNewPrice = std::max(iNewPrice, getYieldBuyPrice(eYield) - 1);
setYieldBuyPrice(eYield, iNewPrice, true);
}
}
}
}