anchor.diff:  var
     G: TKMUnitGroup;
     DefPos: TAIDefencePosition;
  +  DefPosNewAI: TKMDefencePosition;
   begin
     try
       Result := False;
  
positive.code:       and InRange(aType, 0, 3) then
      begin
        gt := TKMGroupType(aType);
        aCount := gHands[aPlayer].AI.General.DefencePositions.TroopFormations[gt].NumUnits;
        aColumns := gHands[aPlayer].AI.General.DefencePositions.TroopFormations[gt].UnitsPerRow;
      end
      else
        LogParamWarning('Actions.AIGroupsFormationGet', [aPlayer, aType]);
  
negative.code:   KM_AI, KM_Terrain, KM_Game, KM_FogOfWar, KM_UnitWarrior,
    KM_HouseBarracks, KM_HouseSchool, KM_ResUnits, KM_Log, KM_CommonUtils, KM_HouseMarket,
    KM_Resource, KM_UnitTaskSelfTrain, KM_Sound, KM_Hand, KM_AIDefensePos, KM_CommonClasses,
    KM_UnitsCollection, KM_PathFindingRoad, KM_HouseWoodcutters, KM_HouseTownHall,
    KM_ArmyDefence;
  
  
    //We need to check all input parameters as could be wildly off range due to
  