Beispiel #1
0
protected func Initialize()
{
  // Anfangsgeldwert
  value=GetWealth(GetOwner());
  if(Local(CheckTeam(GetOwner()), FindObject(TACC))) value = Local(CheckTeam(GetOwner()), FindObject(TACC));
  else Local(CheckTeam(GetOwner()), FindObject(TACC)) = value;
  SetWealth(GetOwner(), value);
}
int BrigadeClass::CheckTactic (int tid)
	{
	Objective	o;

	if (tid < 1)
		return 0;
	if (haveWeaps < 0)
		{
		FalconEntity	*e;
		GridIndex		x,y,dx,dy;

		e = GetTarget();
		if (Engaged() && !e)
			SetEngaged(0);
		if (GetUnitSupply() > 20)
			haveWeaps = 1;
		else
			haveWeaps = 0;
		GetLocation(&x,&y);
		o = GetUnitObjective();
		ourObjOwner = 0;
		if (o && o->GetTeam() == GetTeam())
			ourObjOwner = 1;
		if (o)
			o->GetLocation(&dx,&dy);
		else
			GetUnitDestination(&dx,&dy);
		ourObjDist = FloatToInt32(Distance(x,y,dx,dy));
		}
	if (!CheckUnitType(tid, GetDomain(), GetType()))
		return 0;
	if (!CheckTeam(tid,GetTeam()))
		return 0;
	if (!CheckEngaged(tid,Engaged()))
		return 0;
	if (!CheckCombat(tid,Combat()))
		return 0;
	if (!CheckLosses(tid,Losses()))
		return 0;
	if (!CheckRetreating(tid,Retreating()))
		return 0;
	if (!CheckAction(tid,GetUnitOrders()))
		return 0;
	if (!CheckOwned(tid,ourObjOwner))
		return 0;
	if (TeamInfo[GetTeam()]->GetGroundAction()->actionType != GACTION_OFFENSIVE && !CheckRole(tid,0))
		return 0;
	if (!CheckRange(tid,ourObjDist))
		return 0;
//	if (!CheckDistToFront(tid,ourFrontDist))
//		return 0;
	if (!CheckStatus(tid,Broken()))
		return 0;
//	if (!CheckOdds(tid,odds))
//		return 0;
	return GetTacticPriority(tid);
	}
Beispiel #3
0
// Kopfgeld
global func FxDeathCountingStop(pTarget, iNumber, iReason, fTmp)
{
  if(fTmp) return();
  if(iReason!=4) return(-1);
  if(GetAlive(pTarget)) return(-1);
  var i = -1;
  if(CheckTeam(GetOwner(pTarget))==1)
  {
    killWOLF++;
    ActualizeScoreboard();
  }
  else if(CheckTeam(GetOwner(pTarget))==2)
  {
    killTRPR++;
    ActualizeScoreboard();
  }
  else
  {
    killBEAR++;
    ActualizeScoreboard();
  }
}