Skip to content

Commit

Permalink
GOTTA, SWEEP SWEEP SWEEP!
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveVision committed Jun 25, 2024
1 parent 4735996 commit a57ceeb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion (1) Community Patch/Core Files/Core Values/CoreDefines.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion CvGameCoreDLL_Expansion2/CvBuildingClasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion CvGameCoreDLL_Expansion2/CvCity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions CvGameCoreDLL_Expansion2/CvDealClasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion CvGameCoreDLL_Expansion2/CvGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit a57ceeb

Please sign in to comment.