Bazaar developer reference

CityStrategyAIHelpers::IsTestCityStrategy_Landlocked(CvCity *)

Defined in
CvCityStrategyAI.cpp, line 2261
Hook name
CivHooks::CityStrategyAIHelpers_IsTestCityStrategy_Landlocked

Hooks

static bool BeforeCityStrategyAIHelpers_IsTestCityStrategy_Landlocked(CvCity* pCity, bool& result);static void AfterCityStrategyAIHelpers_IsTestCityStrategy_Landlocked(CvCity* pCity, bool& result);static bool ReplaceCityStrategyAIHelpers_IsTestCityStrategy_Landlocked(bool (*original)(CvCity*), CvCity* pCity);CivRegisterBefore<CivHooks::CityStrategyAIHelpers_IsTestCityStrategy_Landlocked>(host, &BeforeCityStrategyAIHelpers_IsTestCityStrategy_Landlocked);CivRegisterAfter<CivHooks::CityStrategyAIHelpers_IsTestCityStrategy_Landlocked>(host, &AfterCityStrategyAIHelpers_IsTestCityStrategy_Landlocked);CivRegisterReplace<CivHooks::CityStrategyAIHelpers_IsTestCityStrategy_Landlocked>(host, &ReplaceCityStrategyAIHelpers_IsTestCityStrategy_Landlocked);

Code

2260/// "Landlocked" City Strategy: If a City has no access to the Ocean then nullify all water-based Flavors2261bool CityStrategyAIHelpers::IsTestCityStrategy_Landlocked(CvCity* pCity)2262{2263	// If this City isn't adjacent to a body of water big enough to be "Ocean" then we consider it landlocked2264	if(!pCity->isCoastal())2265	{2266		return true;2267	}22682269	return false;2270}

Calls

Called by