Bazaar developer reference

CvUnit::GetRangePlusMoveToshot() const

Defined in
CvUnit.cpp, line 21682
Class
CvUnit
Hook name
CivHooks::CvUnit_GetRangePlusMoveToshot

Hooks

static bool BeforeCvUnit_GetRangePlusMoveToshot(const CvUnit* self, int& result);static void AfterCvUnit_GetRangePlusMoveToshot(const CvUnit* self, int& result);static int ReplaceCvUnit_GetRangePlusMoveToshot(int (*original)(const CvUnit*), const CvUnit* self);CivRegisterBefore<CivHooks::CvUnit_GetRangePlusMoveToshot>(host, &BeforeCvUnit_GetRangePlusMoveToshot);CivRegisterAfter<CivHooks::CvUnit_GetRangePlusMoveToshot>(host, &AfterCvUnit_GetRangePlusMoveToshot);CivRegisterReplace<CivHooks::CvUnit_GetRangePlusMoveToshot>(host, &ReplaceCvUnit_GetRangePlusMoveToshot);

Code

21680#if defined(MOD_AI_SMART_V3)21681//AMS: Special property to get unit range+ move possibility.21682int CvUnit::GetRangePlusMoveToshot() const21683{21684	VALIDATE_OBJECT21685	return ((getDomainType() == DOMAIN_AIR) ? GetRange() : (GetRange() + baseMoves() - (isMustSetUpToRangedAttack() ? 1 : 0)));21686}

Calls

Called by