Bazaar developer reference

CvUnit::GetBaseCombatStrength(bool) const

Defined in
CvUnit.cpp, line 12116
Class
CvUnit
Hook name
CivHooks::CvUnit_GetBaseCombatStrength

Hooks

static bool BeforeCvUnit_GetBaseCombatStrength(const CvUnit* self, bool bIgnoreEmbarked, int& result);static void AfterCvUnit_GetBaseCombatStrength(const CvUnit* self, bool bIgnoreEmbarked, int& result);static int ReplaceCvUnit_GetBaseCombatStrength(int (*original)(const CvUnit*, bool), const CvUnit* self, bool bIgnoreEmbarked);CivRegisterBefore<CivHooks::CvUnit_GetBaseCombatStrength>(host, &BeforeCvUnit_GetBaseCombatStrength);CivRegisterAfter<CivHooks::CvUnit_GetBaseCombatStrength>(host, &AfterCvUnit_GetBaseCombatStrength);CivRegisterReplace<CivHooks::CvUnit_GetBaseCombatStrength>(host, &ReplaceCvUnit_GetBaseCombatStrength);

Code

12116int CvUnit::GetBaseCombatStrength(bool bIgnoreEmbarked) const12117{12118	VALIDATE_OBJECT12119	if(m_bEmbarked && !bIgnoreEmbarked)12120	{12121		return GetEmbarkedUnitDefense() / 100;12122	}1212312124	return m_iBaseCombat;12125}

Calls

Called by