Bazaar developer reference

MilitaryAIHelpers::IsTestStrategy_EnoughNavalUnits(CvPlayer *)

Defined in
CvMilitaryAI.cpp, line 4572
Hook name
CivHooks::MilitaryAIHelpers_IsTestStrategy_EnoughNavalUnits

Hooks

static bool BeforeMilitaryAIHelpers_IsTestStrategy_EnoughNavalUnits(CvPlayer* pPlayer, bool& result);static void AfterMilitaryAIHelpers_IsTestStrategy_EnoughNavalUnits(CvPlayer* pPlayer, bool& result);static bool ReplaceMilitaryAIHelpers_IsTestStrategy_EnoughNavalUnits(bool (*original)(CvPlayer*), CvPlayer* pPlayer);CivRegisterBefore<CivHooks::MilitaryAIHelpers_IsTestStrategy_EnoughNavalUnits>(host, &BeforeMilitaryAIHelpers_IsTestStrategy_EnoughNavalUnits);CivRegisterAfter<CivHooks::MilitaryAIHelpers_IsTestStrategy_EnoughNavalUnits>(host, &AfterMilitaryAIHelpers_IsTestStrategy_EnoughNavalUnits);CivRegisterReplace<CivHooks::MilitaryAIHelpers_IsTestStrategy_EnoughNavalUnits>(host, &ReplaceMilitaryAIHelpers_IsTestStrategy_EnoughNavalUnits);

Code

4571/// "Enough Naval Units" Strategy: build navies4572bool MilitaryAIHelpers::IsTestStrategy_EnoughNavalUnits(CvPlayer* pPlayer)4573{4574	if(pPlayer->GetMilitaryAI()->GetNavalDefenseState() == DEFENSE_STATE_ENOUGH)4575	{4576		return true;4577	}45784579	return false;4580}

Calls

Called by