anchor.diff:      Result := U.IsIdle and KMSamePoint(U.CurrPosition, P.Loc) and (U.Direction = Dir);
       if not Result then Exit;
     end;
  +end;
  +
  +
  +function TKMUnitGroup.IsAllyTo(aUnit: TKMUnit): Boolean;
  +begin
  +  Result := gHands[fOwner].Alliances[aUnit.Owner] = atAlly;
  +end;
  +
  +
  +function TKMUnitGroup.IsAllyTo(aUnitGroup: TKMUnitGroup): Boolean;
  +begin
  +  Result := gHands[fOwner].Alliances[aUnitGroup.Owner] = atAlly;
  +end;
  +
  +
  +function TKMUnitGroup.IsAllyTo(aHouse: TKMHouse): Boolean;
  +begin
  +  Result := gHands[fOwner].Alliances[aHouse.Owner] = atAlly;
   end;
   
   
  
positive.code: 
  
                          //If Enemy was killed, but target Group still exists
                          if (OrderTargetUnit = nil) and (OrderTargetGroup <> nil) then
                          begin
                            //Old enemy has died, change target to his comrades
                            U := OrderTargetGroup.GetNearestMember(Members[0].CurrPosition);
  
negative.code:     function IsAttackingUnit: Boolean;
      function IsIdleToAI(aOrderWalkKindSet: TKMOrderWalkKindSet = []): Boolean;
      function IsPositioned(const aLoc: TKMPoint; Dir: TKMDirection): Boolean;
      function IsAllyTo(aUnit: TKMUnit): Boolean; overload;
      function IsAllyTo(aUnitGroup: TKMUnitGroup): Boolean; overload;
      function IsAllyTo(aHouse: TKMHouse): Boolean; overload;
      function CanTakeOrders: Boolean;
      function CanWalkTo(const aTo: TKMPoint; aDistance: Single): Boolean;
      function FightMaxRange: Single;
  