anchor.diff:      // Avoid building
       procedure InitAvoidBuilding();
       // Army presence
  -    function GetAllPresences(const aPL: TKMHandIndex; aIdx: Word): Word; inline;
       function GetPresence(const aPL: TKMHandIndex; const aIdx: Word; const aGT: TGroupType): Word; inline;
       procedure SetPresence(const aPL: TKMHandIndex; const aIdx: Word; const aGT: TGroupType; const aPresence: Word); inline;
       procedure SetIncPresence(const aPL: TKMHandIndex; aIdx: Word; const aGT: TGroupType; const aPresence: Word); inline;
  +    function GetAllPresences(const aPL: TKMHandIndex; aIdx: Word): Word; inline;
  +    function GetEnemyGroupPresence(const aPL: TKMHandIndex; const aIdx: Word; const aGT: TGroupType): Word;
  +    //function GetAlliancePresence(const aPL: TKMHandIndex; aIdx: Word; const aAllianceType: TAllianceType): Word;
       procedure UpdateMilitaryPresence(const aPL: TKMHandIndex);
       // City influence
       function GetOwnership(const aPL: TKMHandIndex; const aIdx: Word): Byte; inline;
       procedure SetOwnership(const aPL: TKMHandIndex; const aIdx: Word; const aOwnership: Byte); inline;
  -    function GetOwnershipFromPoint(const aPL: TKMHandIndex; aY, aX: Word): Byte; inline; // For property -> aY, aX are switched!
  -    procedure SetOwnershipFromPoint(const aPL: TKMHandIndex; aY, aX: Word; const aOwnership: Byte); inline; // For property -> aY, aX are switched!
  +    function GetOwnershipFromPoint(const aPL: TKMHandIndex; const aY, aX: Word): Byte; inline; // For property -> aY, aX are switched!
  +    procedure SetOwnershipFromPoint(const aPL: TKMHandIndex; const aY, aX: Word; const aOwnership: Byte); inline; // For property -> aY, aX are switched!
       procedure UpdateOwnership(const aPL: TKMHandIndex);
       // Common
       procedure InitArrays();
  
positive.code: end;
  
  
  function TKMInfluences.GetOwnershipFromPoint(const aPL: TKMHandIndex; aY, aX: Word): Byte;
  var
    POM: Word;
  begin
    POM := fNavMesh.FindClosestPolygon(KMPoint(aX,aY));
    Result := GetOwnership(aPL, POM);
  end;
  
  
  procedure TKMInfluences.SetOwnershipFromPoint(const aPL: TKMHandIndex; aY, aX: Word; const aOwnership: Byte);
  begin
    aX := fNavMesh.FindClosestPolygon(KMPoint(aX,aY));
    SetOwnership(aPL, aX, aOwnership);
  end;
  
  
  function TKMInfluences.GetBestOwner(aX,aY: Word): TKMHandIndex;
  begin
    aX := fNavMesh.FindClosestPolygon(KMPoint(aX,aY));
    Result := GetBestOwner(aX);
  end;
  
  
  
negative.code:     procedure RemAvoidBuilding(aArea: TKMRect);
      // Army presence
      // City influence
      function GetBestOwner(const aX,aY: Word): TKMHandIndex; overload;
      function GetBestOwner(const aIdx: Word): TKMHandIndex; overload;
      function GetBestAllianceOwnership(const aPL: TKMHandIndex; const aIdx: Word; const aAllianceType: TAllianceType): Byte;
      function GetOtherOwnerships(const aPL: TKMHandIndex; const aX, aY: Word): Word;
  
      procedure AfterMissionInit();
      procedure UpdateState(aTick: Cardinal);
  