Bazaar developer reference

CvDangerPlots::GetDangerValueOfCitadel() const

Defined in
CvDangerPlots.cpp, line 709
Class
CvDangerPlots
Hook name
CivHooks::CvDangerPlots_GetDangerValueOfCitadel

Hooks

static bool BeforeCvDangerPlots_GetDangerValueOfCitadel(const CvDangerPlots* self, int& result);static void AfterCvDangerPlots_GetDangerValueOfCitadel(const CvDangerPlots* self, int& result);static int ReplaceCvDangerPlots_GetDangerValueOfCitadel(int (*original)(const CvDangerPlots*), const CvDangerPlots* self);CivRegisterBefore<CivHooks::CvDangerPlots_GetDangerValueOfCitadel>(host, &BeforeCvDangerPlots_GetDangerValueOfCitadel);CivRegisterAfter<CivHooks::CvDangerPlots_GetDangerValueOfCitadel>(host, &AfterCvDangerPlots_GetDangerValueOfCitadel);CivRegisterReplace<CivHooks::CvDangerPlots_GetDangerValueOfCitadel>(host, &ReplaceCvDangerPlots_GetDangerValueOfCitadel);

Code

708/// How much danger should we apply to a citadel?709int CvDangerPlots::GetDangerValueOfCitadel() const710{711	// Compute power of this player's strongest unit712	CvMilitaryAI* pMilitaryAI = GET_PLAYER(m_ePlayer).GetMilitaryAI();713	int iPower = pMilitaryAI->GetPowerOfStrongestBuildableUnit(DOMAIN_LAND);714715	// Magic number to approximate danger from one turn of citadel damage716	return iPower * 50;717}

Calls

Called by