Index: CvPlayer.cpp =================================================================== --- CvPlayer.cpp (revision 94) +++ CvPlayer.cpp (working copy) @@ -7908,7 +7908,24 @@ // PatchMod: REF Reduction START int bellRateMultiplier = 0; bellRateMultiplier = ((GC.getHandicapInfo(getHandicapType()).getKingUnitThresholdPercent() / 100) * GC.getDefineINT("REVOLUTION_EUROPE_UNIT_THRESHOLD_INCREASE")); + + // get old values + int OldRevThreshold = revolutionEuropeUnitThreshold(); + int OldRevThresholdMult = getRevolutionEuropeUnitThresholdMultiplier(); + setRevolutionEuropeUnitThresholdMultiplier((getRevolutionEuropeUnitThresholdMultiplier() * (100 + bellRateMultiplier)/100)); + + // get new values + int NewRevThreshold = revolutionEuropeUnitThreshold(); + int NewRevThresholdMult = getRevolutionEuropeUnitThresholdMultiplier(); + + // log event with values + if (GC.getLogging()) + { + TCHAR szOut[1024]; + sprintf(szOut, "PatchMod: Player %d triggered REF increase ( handicap threshold %d bell rate multiplier %d ). Old Threshold: %d New Threshold: %d Old ThresholdMult: %d New ThresholdMult: %d \n", getID(), GC.getHandicapInfo(getHandicapType()).getKingUnitThresholdPercent(), bellRateMultiplier, OldRevThreshold, NewRevThreshold, OldRevThresholdMult, NewRevThresholdMult ); + gDLL->messageControlLog(szOut); + } // PatchMod: REF Reduction END if (NO_PLAYER != getParent()) @@ -14303,7 +14320,24 @@ // PatchMod: REF Reduction START void CvPlayer::doREFReduction(int iGold) { + // get old values + int OldRevThreshold = revolutionEuropeUnitThreshold(); + int OldRevThresholdMult = getRevolutionEuropeUnitThresholdMultiplier(); + setRevolutionEuropeUnitThresholdMultiplier(getRevolutionEuropeUnitThresholdMultiplier() * ((100 + (iGold / GC.getHandicapInfo(getHandicapType()).getKingGoldThresholdPercent())) / 100)); + + // get new values + int NewRevThreshold = revolutionEuropeUnitThreshold(); + int NewRevThresholdMult = getRevolutionEuropeUnitThresholdMultiplier(); + + // log event with values + if (GC.getLogging()) + { + TCHAR szOut[1024]; + sprintf(szOut, "PatchMod: Player %d paid their king %d gold ( handicap threshold %d ). Old Threshold: %d New Threshold: %d Old ThresholdMult: %d New ThresholdMult: %d \n", getID(), iGold, GC.getHandicapInfo(getHandicapType()).getKingGoldThresholdPercent(), OldRevThreshold, NewRevThreshold, OldRevThresholdMult, NewRevThresholdMult ); + gDLL->messageControlLog(szOut); + } + return; } // PatchMod: REF Reduction END