diff --git a/(1) Community Patch/Core Files/Core Tables/CoreTableEntries.sql b/(1) Community Patch/Core Files/Core Tables/CoreTableEntries.sql index bab03b152d..2a6f70c3c7 100644 --- a/(1) Community Patch/Core Files/Core Tables/CoreTableEntries.sql +++ b/(1) Community Patch/Core Files/Core Tables/CoreTableEntries.sql @@ -1433,7 +1433,7 @@ ALTER TABLE Policies ADD COLUMN 'TradeRouteSeaDistanceModifier' INTEGER DEFAULT -- City Security against Spies ALTER TABLE Buildings ADD COLUMN 'SpySecurityModifier' INTEGER DEFAULT 0; --- City Security against Spies per X Population, where X = ESPIONAGE_SECURITY_PER_POPULATION_BUILDING_SCALER +-- City Security against Spies per X, where X = (total of this value in the city) * (city population) / ESPIONAGE_SECURITY_PER_POPULATION_BUILDING_SCALER ALTER TABLE Buildings ADD COLUMN 'SpySecurityModifierPerXPop' INTEGER DEFAULT 0; -- City Security against Spies in all Cities ALTER TABLE Buildings ADD COLUMN 'GlobalSpySecurityModifier' INTEGER DEFAULT 0; diff --git a/(1) Community Patch/Core Files/Core Values/CoreDefines.sql b/(1) Community Patch/Core Files/Core Values/CoreDefines.sql index 6e7fcd95c1..04568a703c 100644 --- a/(1) Community Patch/Core Files/Core Values/CoreDefines.sql +++ b/(1) Community Patch/Core Files/Core Values/CoreDefines.sql @@ -861,7 +861,7 @@ INSERT INTO Defines (Name, Value) SELECT 'ESPIONAGE_SECURITY_BASE', 10; -- Base INSERT INTO Defines (Name, Value) SELECT 'ESPIONAGE_SECURITY_NOT_ALL_HAVE_SPIES', 1000; -- Security if not all players have a Spy INSERT INTO Defines (Name, Value) SELECT 'ESPIONAGE_SECURITY_PREVIOUS_CITY_MISSIONS', 2; -- Security for each previous Spy Mission completed in the City INSERT INTO Defines (Name, Value) SELECT 'ESPIONAGE_SECURITY_PER_POPULATION', -2; -- Security per Population in City -INSERT INTO Defines (Name, Value) SELECT 'ESPIONAGE_SECURITY_PER_POPULATION_BUILDING_SCALER', 360; -- +1 Security per X Population in city for each SpySecurityModifierPerXPop provided by buildings +INSERT INTO Defines (Name, Value) SELECT 'ESPIONAGE_SECURITY_PER_POPULATION_BUILDING_SCALER', 360; -- Adds +1 Security every time X reaches this value, where X = (total SpySecurityModifierPerXPop in city) * (city population) INSERT INTO Defines (Name, Value) SELECT 'ESPIONAGE_SECURITY_PER_TRADE_ROUTE', -1; -- Security per Trade Route to/from City INSERT INTO Defines (Name, Value) SELECT 'ESPIONAGE_SECURITY_PER_EXCESS_UNHAPPINESS', -4; -- Security per Excess Unhappiness in City diff --git a/CvGameCoreDLL_Expansion2/CvBuildingClasses.cpp b/CvGameCoreDLL_Expansion2/CvBuildingClasses.cpp index 325d384bc2..d803764bd1 100644 --- a/CvGameCoreDLL_Expansion2/CvBuildingClasses.cpp +++ b/CvGameCoreDLL_Expansion2/CvBuildingClasses.cpp @@ -2416,7 +2416,7 @@ int CvBuildingEntry::GetSpySecurityModifier() const return m_iSpySecurityModifier; } -/// Modifier to Security against espionage per ESPIONAGE_SECURITY_PER_POPULATION_BUILDING_SCALER population +/// Modifier to Security against espionage based on ESPIONAGE_SECURITY_PER_POPULATION_BUILDING_SCALER int CvBuildingEntry::GetSpySecurityModifierPerXPop() const { return m_iSpySecurityModifierPerXPop; diff --git a/CvGameCoreDLL_Expansion2/CvCity.cpp b/CvGameCoreDLL_Expansion2/CvCity.cpp index 9dffb45178..4c2db372e3 100644 --- a/CvGameCoreDLL_Expansion2/CvCity.cpp +++ b/CvGameCoreDLL_Expansion2/CvCity.cpp @@ -25725,7 +25725,7 @@ int CvCity::CalculateCitySecurity(CvString* toolTipSink) const // Local Buildings iTempMod = GetSpySecurityModifier(); - iTempMod += GD_INT_GET(ESPIONAGE_SECURITY_PER_POPULATION_BUILDING_SCALER) != 0 ? getPopulation() * GetSpySecurityModifierPerXPop() / /*2*/ GD_INT_GET(ESPIONAGE_SECURITY_PER_POPULATION_BUILDING_SCALER) : 0; + iTempMod += GD_INT_GET(ESPIONAGE_SECURITY_PER_POPULATION_BUILDING_SCALER) != 0 ? getPopulation() * GetSpySecurityModifierPerXPop() / /*360*/ GD_INT_GET(ESPIONAGE_SECURITY_PER_POPULATION_BUILDING_SCALER) : 0; GC.getGame().BuildProdModHelpText(toolTipSink, "TXT_KEY_EO_CITY_SECURITY_BUILDINGS_TT", iTempMod); iCitySecurity += iTempMod; diff --git a/CvGameCoreDLL_Expansion2/CvDealClasses.cpp b/CvGameCoreDLL_Expansion2/CvDealClasses.cpp index 30ede183a9..b441219239 100644 --- a/CvGameCoreDLL_Expansion2/CvDealClasses.cpp +++ b/CvGameCoreDLL_Expansion2/CvDealClasses.cpp @@ -1301,14 +1301,14 @@ bool CvDeal::IsPossibleToTradeItem(PlayerTypes ePlayer, PlayerTypes eToPlayer, T if (bSameTeam || !MOD_BALANCE_VP) return false; - // AI teammate of human - if (pFromPlayer->IsAITeammateOfHuman()) - return false; - // Vassalage is disabled if (GC.getGame().isOption(GAMEOPTION_NO_VASSALAGE)) return false; + // AI teammate of human + if (pFromPlayer->IsAITeammateOfHuman()) + return false; + // Must be able to end all vassals if (!pFromTeam->canEndAllVassal()) return false; diff --git a/CvGameCoreDLL_Expansion2/CvGlobals.cpp b/CvGameCoreDLL_Expansion2/CvGlobals.cpp index c47cd22066..71fdf4a18d 100644 --- a/CvGameCoreDLL_Expansion2/CvGlobals.cpp +++ b/CvGameCoreDLL_Expansion2/CvGlobals.cpp @@ -2162,7 +2162,7 @@ CvGlobals::CvGlobals() : GD_INT_INIT(ESPIONAGE_SECURITY_NOT_ALL_HAVE_SPIES, 1000), GD_INT_INIT(ESPIONAGE_SECURITY_PREVIOUS_CITY_MISSIONS, 2), GD_INT_INIT(ESPIONAGE_SECURITY_PER_POPULATION, -2), - GD_INT_INIT(ESPIONAGE_SECURITY_PER_POPULATION_BUILDING_SCALER, 2), + GD_INT_INIT(ESPIONAGE_SECURITY_PER_POPULATION_BUILDING_SCALER, 360), GD_INT_INIT(ESPIONAGE_SECURITY_PER_TRADE_ROUTE, -1), GD_INT_INIT(ESPIONAGE_SECURITY_PER_EXCESS_UNHAPPINESS, -4), GD_INT_INIT(ESPIONAGE_SPY_EXPERIENCE_DENOMINATOR, 100),