Bazaar developer reference

CityStrategyAIHelpers::IsTestCityStrategy_SmallCity(CvCity *)

Defined in
CvCityStrategyAI.cpp, line 2217
Hook name
CivHooks::CityStrategyAIHelpers_IsTestCityStrategy_SmallCity

Hooks

static bool BeforeCityStrategyAIHelpers_IsTestCityStrategy_SmallCity(CvCity* pCity, bool& result);static void AfterCityStrategyAIHelpers_IsTestCityStrategy_SmallCity(CvCity* pCity, bool& result);static bool ReplaceCityStrategyAIHelpers_IsTestCityStrategy_SmallCity(bool (*original)(CvCity*), CvCity* pCity);CivRegisterBefore<CivHooks::CityStrategyAIHelpers_IsTestCityStrategy_SmallCity>(host, &BeforeCityStrategyAIHelpers_IsTestCityStrategy_SmallCity);CivRegisterAfter<CivHooks::CityStrategyAIHelpers_IsTestCityStrategy_SmallCity>(host, &AfterCityStrategyAIHelpers_IsTestCityStrategy_SmallCity);CivRegisterReplace<CivHooks::CityStrategyAIHelpers_IsTestCityStrategy_SmallCity>(host, &ReplaceCityStrategyAIHelpers_IsTestCityStrategy_SmallCity);

Code

2216/// "Small City" City Strategy: If a City is under 3 Population tweak a number of different Flavors2217bool CityStrategyAIHelpers::IsTestCityStrategy_SmallCity(CvCity* pCity)2218{2219	// City Population is too low, don't build Settlers yet2220	if(pCity->getPopulation() >= GC.getAI_CITYSTRATEGY_SMALL_CITY_POP_THRESHOLD() &&   // 2 to 42221	        pCity->getPopulation() < GC.getAI_CITYSTRATEGY_MEDIUM_CITY_POP_THRESHOLD())2222	{2223		return true;2224	}22252226	return false;2227}

Calls

Called by