Bazaar developer reference

CvUnit::GetBullyMinorMove(const CvPlot *) const

Defined in
CvUnit.cpp, line 2972
Class
CvUnit
Hook name
CivHooks::CvUnit_GetBullyMinorMove

Hooks

static bool BeforeCvUnit_GetBullyMinorMove(const CvUnit* self, const CvPlot* pPlot, PlayerTypes& result);static void AfterCvUnit_GetBullyMinorMove(const CvUnit* self, const CvPlot* pPlot, PlayerTypes& result);static PlayerTypes ReplaceCvUnit_GetBullyMinorMove(PlayerTypes (*original)(const CvUnit*, const CvPlot*), const CvUnit* self, const CvPlot* pPlot);CivRegisterBefore<CivHooks::CvUnit_GetBullyMinorMove>(host, &BeforeCvUnit_GetBullyMinorMove);CivRegisterAfter<CivHooks::CvUnit_GetBullyMinorMove>(host, &AfterCvUnit_GetBullyMinorMove);CivRegisterReplace<CivHooks::CvUnit_GetBullyMinorMove>(host, &ReplaceCvUnit_GetBullyMinorMove);

Code

2971/// Returns the ID of the minor we'd be bullying with this move2972PlayerTypes CvUnit::GetBullyMinorMove(const CvPlot* pPlot) const2973{2974	VALIDATE_OBJECT2975	PlayerTypes eMinor;29762977	CvAssert(isHuman());29782979	if(getDomainType() != DOMAIN_AIR)2980	{2981		eMinor = pPlot->getRevealedOwner(getTeam());29822983		if(eMinor != NO_PLAYER)2984		{2985			if(GET_PLAYER(eMinor).isMinorCiv())2986			{2987				if(!canEnterTerritory(GET_PLAYER(eMinor).getTeam(), false /*bIgnoreRightOfPassage*/, pPlot->isCity()))2988				{2989					return eMinor;2990				}2991			}2992		}2993	}29942995	return NO_PLAYER;2996}

Calls