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
- CvUnit::GetEmbarkedUnitDefense() const
FAutoVariable::operator const bool &FAutoVariable::operator const int &
Called by
- CvCity::updateStrengthValue()
- isBeforeUnitCycle(const CvUnit *, const CvUnit *)
- CvHomelandAI::PlotMovesToSafety()
- CvPlayer::DoUnresearchedTechBonusFromKill(CvUnit *, UnitTypes, int, int, int &)
- CvPlayer::DoYieldBonusFromKill(YieldTypes, CvUnit *, CvUnit *, UnitTypes, int, int, bool, int &)
- CvTacticalAI::ExecuteMovesToSafestPlot()
- CvTacticalAI::PlotMovesToSafety(bool)
- CvTacticalAnalysisMap::AddToDominanceZones(int, CvTacticalAnalysisCell *)
- CvTacticalAnalysisMap::CalculateMilitaryStrengths()
- CvUnit::CanAutomate(AutomateTypes, bool) const
- CvUnit::EnemyScoreAtRange(const CvPlot *, bool) const
- CvUnit::GetMaxAttackStrength(const CvPlot *, const CvPlot *, const CvUnit *) const
- CvUnit::GetMaxDefenseStrength(const CvPlot *, const CvUnit *, bool) const
- CvUnit::GetMaxRangedCombatStrength(const CvUnit *, const CvCity *, bool, bool) const
- CvUnit::GetPower() const
- CvUnit::IsCanDefend(const CvPlot *) const
- CvUnit::UnitAttack(int, int, int, int)
- CvUnit::canHeal(const CvPlot *, bool) const
- CvUnit::canMoveInto(const CvPlot &, byte) const
- CvUnit::initWithNameOffset(int, UnitTypes, int, UnitAITypes, PlayerTypes, int, int, DirectionTypes, bool, bool, int, int)
- CvUnit::setXY(int, int, bool, bool, bool, bool, bool)
- CvUnitCombat::ApplyPostCombatTraitEffects(CvUnit *, CvUnit *)
- CvLuaUnit::lGetBaseCombatStrength(lua_State *)