diff --git a/(1) Community Patch/Database Changes/Defines/CoreDefineChanges.sql b/(1) Community Patch/Database Changes/Defines/CoreDefineChanges.sql index b0ef761ffa..bf096ea913 100644 --- a/(1) Community Patch/Database Changes/Defines/CoreDefineChanges.sql +++ b/(1) Community Patch/Database Changes/Defines/CoreDefineChanges.sql @@ -924,6 +924,7 @@ VALUES ('ESPIONAGE_SPY_XP_MISSION_SUCCESS_PERCENT', 0), -- When successfully completing a Spy Mission, gain (NP Points needed for Mission) * ESPIONAGE_XP_MISSION_SUCESS_PERCENT / 100 XP ('ESPIONAGE_COUNTERSPY_CHANGE_FOCUS_COOLDOWN', 5), -- Cooldown between switching Counterspy Missions + ('ESPIONAGE_SPY_POINT_UNIT', 100), -- Number of spy points a value of '1' in database columns like Eras.SpiesGrantedForPlayer or Buildings.ExtraSpies corresponds to --------------------------------------- -- VP happiness system diff --git a/CvGameCoreDLL_Expansion2/CvGlobals.cpp b/CvGameCoreDLL_Expansion2/CvGlobals.cpp index 8f1990a699..6df151a281 100644 --- a/CvGameCoreDLL_Expansion2/CvGlobals.cpp +++ b/CvGameCoreDLL_Expansion2/CvGlobals.cpp @@ -2183,6 +2183,7 @@ CvGlobals::CvGlobals() : GD_INT_INIT(ESPIONAGE_XP_UNCOVER_INTRIGUE, 0), GD_INT_INIT(ESPIONAGE_SPY_XP_MISSION_SUCCESS_PERCENT, 0), GD_INT_INIT(ESPIONAGE_COUNTERSPY_CHANGE_FOCUS_COOLDOWN, 5), + GD_INT_INIT(ESPIONAGE_SPY_POINT_UNIT, 100), GD_INT_INIT(INTERNATIONAL_TRADE_BASE, 100), GD_INT_INIT(INTERNATIONAL_TRADE_EXCLUSIVE_CONNECTION, 0), GD_INT_INIT(INTERNATIONAL_TRADE_CITY_GPT_DIVISOR, 20), @@ -7105,6 +7106,7 @@ void CvGlobals::cacheGlobals() GD_INT_CACHE(ESPIONAGE_XP_UNCOVER_INTRIGUE); GD_INT_CACHE(ESPIONAGE_SPY_XP_MISSION_SUCCESS_PERCENT); GD_INT_CACHE(ESPIONAGE_COUNTERSPY_CHANGE_FOCUS_COOLDOWN); + GD_INT_CACHE(ESPIONAGE_SPY_POINT_UNIT); GD_INT_CACHE(INTERNATIONAL_TRADE_BASE); GD_INT_CACHE(INTERNATIONAL_TRADE_EXCLUSIVE_CONNECTION); GD_INT_CACHE(INTERNATIONAL_TRADE_CITY_GPT_DIVISOR); diff --git a/CvGameCoreDLL_Expansion2/CvGlobals.h b/CvGameCoreDLL_Expansion2/CvGlobals.h index 5a4550440e..ec0e9a39d0 100644 --- a/CvGameCoreDLL_Expansion2/CvGlobals.h +++ b/CvGameCoreDLL_Expansion2/CvGlobals.h @@ -2771,6 +2771,7 @@ class CvGlobals GD_INT_MEMBER(ESPIONAGE_XP_UNCOVER_INTRIGUE); // VP GD_INT_MEMBER(ESPIONAGE_SPY_XP_MISSION_SUCCESS_PERCENT); // VP GD_INT_MEMBER(ESPIONAGE_COUNTERSPY_CHANGE_FOCUS_COOLDOWN); // VP + GD_INT_MEMBER(ESPIONAGE_SPY_POINT_UNIT); // VP GD_INT_MEMBER(INTERNATIONAL_TRADE_BASE); GD_INT_MEMBER(INTERNATIONAL_TRADE_EXCLUSIVE_CONNECTION); GD_INT_MEMBER(INTERNATIONAL_TRADE_CITY_GPT_DIVISOR); diff --git a/CvGameCoreDLL_Expansion2/CvPlayer.cpp b/CvGameCoreDLL_Expansion2/CvPlayer.cpp index 9958da602a..b9a90743c8 100644 --- a/CvGameCoreDLL_Expansion2/CvPlayer.cpp +++ b/CvGameCoreDLL_Expansion2/CvPlayer.cpp @@ -22631,15 +22631,13 @@ void CvPlayer::CreateSpies(int iNumSpies, bool bScaling) else { int iThreshold = max(1, GC.getGame().GetSpyThreshold()); - int iSpyPointGain = iThreshold; - // Spies scaling with era. Instead of 1 spy, we gain 100 spy points. For each time the number of spy points exceeds the threshold, a spy is created - if (bScaling) - iSpyPointGain = 100; + // Spies scaling with map size. Instead of 1 spy, we gain ESPIONAGE_SPY_POINT_UNIT spy points. For each time the number of spy points exceeds the threshold, a spy is created + int iSpyPointUnit = bScaling ? /*100*/ GD_INT_GET(ESPIONAGE_SPY_POINT_UNIT) : iThreshold; // Note that iNumSpies can be NEGATIVE (e.g. removing a policy that gives spy points). In that case, the player enters a spy debt. - m_iSpyPointsTotal += iNumSpies * iSpyPointGain; - m_iSpyPoints += iNumSpies * iSpyPointGain; + m_iSpyPointsTotal += iNumSpies * iSpyPointUnit; + m_iSpyPoints += iNumSpies * iSpyPointUnit; while (m_iSpyPoints >= iThreshold) { pEspionage->CreateSpy();