Bazaar developer reference

EconomicAIHelpers::IsTestStrategy_GrowLikeCrazy(EconomicAIStrategyTypes, CvPlayer *)

Defined in
CvEconomicAI.cpp, line 4206
Hook name
CivHooks::EconomicAIHelpers_IsTestStrategy_GrowLikeCrazy

Hooks

static bool BeforeEconomicAIHelpers_IsTestStrategy_GrowLikeCrazy(EconomicAIStrategyTypes eStrategy, CvPlayer* pPlayer, bool& result);static void AfterEconomicAIHelpers_IsTestStrategy_GrowLikeCrazy(EconomicAIStrategyTypes eStrategy, CvPlayer* pPlayer, bool& result);static bool ReplaceEconomicAIHelpers_IsTestStrategy_GrowLikeCrazy(bool (*original)(EconomicAIStrategyTypes, CvPlayer*), EconomicAIStrategyTypes eStrategy, CvPlayer* pPlayer);CivRegisterBefore<CivHooks::EconomicAIHelpers_IsTestStrategy_GrowLikeCrazy>(host, &BeforeEconomicAIHelpers_IsTestStrategy_GrowLikeCrazy);CivRegisterAfter<CivHooks::EconomicAIHelpers_IsTestStrategy_GrowLikeCrazy>(host, &AfterEconomicAIHelpers_IsTestStrategy_GrowLikeCrazy);CivRegisterReplace<CivHooks::EconomicAIHelpers_IsTestStrategy_GrowLikeCrazy>(host, &ReplaceEconomicAIHelpers_IsTestStrategy_GrowLikeCrazy);

Code

4206bool EconomicAIHelpers::IsTestStrategy_GrowLikeCrazy(EconomicAIStrategyTypes eStrategy, CvPlayer* pPlayer)4207{4208	int iFlavorGrowth = pPlayer->GetGrandStrategyAI()->GetPersonalityAndGrandStrategy((FlavorTypes)GC.getInfoTypeForString("FLAVOR_GROWTH"));4209	CvEconomicAIStrategyXMLEntry* pStrategy = pPlayer->GetEconomicAI()->GetEconomicAIStrategies()->GetEntry(eStrategy);4210	if(iFlavorGrowth >= pStrategy->GetWeightThreshold())4211	{4212		return true;4213	}42144215	return false;4216}

Calls

Called by